Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[surf] new (abstract) class: PropertyHolder, with only one purpose
[simgrid.git] / src / surf / cpu_cas01.hpp
index e3f03b5..8d53c81 100644 (file)
 /***********
  * Classes *
  ***********/
+
+namespace simgrid {
+namespace surf {
+
 class XBT_PRIVATE CpuCas01Model;
 class XBT_PRIVATE CpuCas01;
 class XBT_PRIVATE CpuCas01Action;
@@ -18,7 +22,8 @@ class XBT_PRIVATE CpuCas01Action;
 /*********
  * Model *
  *********/
-class CpuCas01Model : public CpuModel {
+
+class CpuCas01Model : public simgrid::surf::CpuModel {
 public:
   CpuCas01Model();
   ~CpuCas01Model();
@@ -30,8 +35,7 @@ public:
                    double speedScale,
                           tmgr_trace_t speedTrace, int core,
                           e_surf_resource_state_t state_initial,
-                          tmgr_trace_t state_trace,
-                          xbt_dict_t cpu_properties);
+                          tmgr_trace_t state_trace);
   double shareResourcesFull(double now);
   void addTraces();
   ActionList *p_cpuRunningActionSetThatDoesNotNeedBeingChecked;
@@ -43,10 +47,9 @@ public:
 
 class CpuCas01 : public Cpu {
 public:
-  CpuCas01(CpuCas01Model *model, const char *name, xbt_dynar_t power_peak,
-        int pstate, double powerScale, tmgr_trace_t powerTrace, int core,
-        e_surf_resource_state_t stateInitial, tmgr_trace_t stateTrace,
-       xbt_dict_t properties) ;
+  CpuCas01(CpuCas01Model *model, const char *name, xbt_dynar_t speedPeak,
+        int pstate, double speedScale, tmgr_trace_t speedTrace, int core,
+        e_surf_resource_state_t stateInitial, tmgr_trace_t stateTrace) ;
   ~CpuCas01();
   void updateState(tmgr_trace_event_t event_type, double value, double date);
   CpuAction *execute(double size);
@@ -60,7 +63,7 @@ public:
   bool isUsed();
   void setStateEvent(tmgr_trace_event_t stateEvent);
   void setPowerEvent(tmgr_trace_event_t stateEvent);
-  xbt_dynar_t getPowerPeakList();
+  xbt_dynar_t getSpeedPeakList();
 
   int getPState();
 
@@ -78,8 +81,11 @@ class CpuCas01Action: public CpuAction {
   friend CpuAction *CpuCas01::execute(double size);
   friend CpuAction *CpuCas01::sleep(double duration);
 public:
-  CpuCas01Action(Model *model, double cost, bool failed, double power,
+  CpuCas01Action(Model *model, double cost, bool failed, double speed,
                  lmm_constraint_t constraint);
 
   ~CpuCas01Action() {};
 };
+
+}
+}