Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Compile trace_mgr with g++. Next step: objectification
[simgrid.git] / src / surf / cpu_ti.hpp
index d8df612..d6d3159 100644 (file)
@@ -6,8 +6,8 @@
 
 #include <xbt/base.h>
 
-#include "cpu_interface.hpp"
-#include "trace_mgr_private.h"
+#include "src/surf/cpu_interface.hpp"
+#include "src/surf/trace_mgr.hpp"
 #include "surf/surf_routing.h"
 
 /* Epsilon */
@@ -113,12 +113,12 @@ typedef boost::intrusive::list<
  ************/
 class CpuTi : public Cpu {
 public:
-  CpuTi(CpuTiModel *model, simgrid::Host *host, xbt_dynar_t speedPeak,
+  CpuTi(CpuTiModel *model, simgrid::s4u::Host *host, xbt_dynar_t speedPeak,
         int pstate, double speedScale, tmgr_trace_t speedTrace, int core,
         int initiallyOn, tmgr_trace_t stateTrace) ;
   ~CpuTi();
 
-  void updateState(tmgr_trace_event_t event_type, double value, double date) override;
+  void updateState(tmgr_trace_iterator_t event_type, double value, double date) override;
   void updateActionsFinishTime(double now);
   bool isUsed() override;
   CpuAction *execute(double size) override;
@@ -128,8 +128,8 @@ public:
   void modified(bool modified);
 
   CpuTiTgmr *p_availTrace;       /*< Structure with data needed to integrate trace file */
-  tmgr_trace_event_t p_stateEvent = NULL; /*< trace file with states events (ON or OFF) */
-  tmgr_trace_event_t p_speedEvent = NULL; /*< trace file with availability events */
+  tmgr_trace_iterator_t p_stateEvent = NULL; /*< trace file with states events (ON or OFF) */
+  tmgr_trace_iterator_t p_speedEvent = NULL; /*< trace file with availability events */
   ActionTiList *p_actionSet;        /*< set with all actions running on cpu */
   double m_sumPriority;          /*< the sum of actions' priority that are running on cpu */
   double m_lastUpdate = 0;       /*< last update of actions' remaining amount done */
@@ -152,11 +152,11 @@ class CpuTiModel : public CpuModel {
 public:
   CpuTiModel();
   ~CpuTiModel();
-  Cpu *createCpu(simgrid::Host *host,  xbt_dynar_t speedPeak,
+  Cpu *createCpu(simgrid::s4u::Host *host,  xbt_dynar_t speedPeak,
                           int pstate, double speedScale,
                           tmgr_trace_t speedTrace, int core,
                           int initiallyOn,
-                          tmgr_trace_t state_trace);
+                          tmgr_trace_t state_trace) override;
   double shareResources(double now) override;
   void updateActionsState(double now, double delta) override;
   void addTraces() override;