- CpuTiAction() {};
- CpuTiAction(CpuTiModelPtr model, double cost, bool failed)
- : Action(model, cost, failed), CpuAction(model, cost, failed) {
- p_cpuListHookup.next = 0;
- p_cpuListHookup.prev = 0;
- };
-
- void setState(e_surf_action_state_t state);
- int unref();
- void cancel();
- void recycle();
- void updateIndexHeap(int i);
- void suspend();
- void resume();
- bool isSuspended();
- void setMaxDuration(double duration);
- void setPriority(double priority);
- double getRemains();
- CpuTiPtr p_cpu;
- int m_indexHeap;
- s_xbt_swag_hookup_t p_cpuListHookup;
- int m_suspended;
-private:
+ CpuTiModel();
+ ~CpuTiModel();
+ Cpu *createCpu(simgrid::Host *host, xbt_dynar_t speedPeak,
+ int pstate, double speedScale,
+ tmgr_trace_t speedTrace, int core,
+ e_surf_resource_state_t state_initial,
+ tmgr_trace_t state_trace);
+ double shareResources(double now) override;
+ void updateActionsState(double now, double delta) override;
+ void addTraces() override;
+
+ ActionList *p_runningActionSetThatDoesNotNeedBeingChecked;
+ CpuTiList *p_modifiedCpu;
+ xbt_heap_t p_tiActionHeap;
+
+protected:
+ void NotifyResourceTurnedOn(simgrid::surf::Resource*){};
+ void NotifyResourceTurnedOff(simgrid::surf::Resource*){};
+
+ void NotifyActionCancel(Action*){};
+ void NotifyActionResume(Action*){};
+ void NotifyActionSuspend(Action*){};