Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make room for the upcoming network energy plugin
[simgrid.git] / src / surf / surf_interface.cpp
index dad5cb0..7db2906 100644 (file)
@@ -46,8 +46,8 @@ simgrid::xbt::signal<void(void)> surfExitCallbacks;
 #include <simgrid/plugins/energy.h> // FIXME: this plugin should not be linked to the core
 
 s_surf_model_description_t surf_plugin_description[] = {
-    {"Energy", "Cpu energy consumption.", &sg_energy_plugin_init},
-     {nullptr, nullptr,  nullptr}      /* this array must be nullptr terminated */
+    {"Energy", "Cpu energy consumption.", &sg_host_energy_plugin_init},
+    {nullptr, nullptr, nullptr} /* this array must be nullptr terminated */
 };
 
 /* Don't forget to update the option description in smx_config when you change this */
@@ -647,13 +647,13 @@ void Action::finish() {
 
 Action::State Action::getState()
 {
-  if (stateSet_ ==  getModel()->getReadyActionSet())
+  if (stateSet_ == model_->getReadyActionSet())
     return Action::State::ready;
-  if (stateSet_ ==  getModel()->getRunningActionSet())
+  if (stateSet_ == model_->getRunningActionSet())
     return Action::State::running;
-  if (stateSet_ ==  getModel()->getFailedActionSet())
+  if (stateSet_ == model_->getFailedActionSet())
     return Action::State::failed;
-  if (stateSet_ ==  getModel()->getDoneActionSet())
+  if (stateSet_ == model_->getDoneActionSet())
     return Action::State::done;
   return Action::State::not_in_the_system;
 }
@@ -663,16 +663,16 @@ void Action::setState(Action::State state)
   stateSet_->erase(stateSet_->iterator_to(*this));
   switch (state) {
   case Action::State::ready:
-    stateSet_ = getModel()->getReadyActionSet();
+    stateSet_ = model_->getReadyActionSet();
     break;
   case Action::State::running:
-    stateSet_ = getModel()->getRunningActionSet();
+    stateSet_ = model_->getRunningActionSet();
     break;
   case Action::State::failed:
-    stateSet_ = getModel()->getFailedActionSet();
+    stateSet_ = model_->getFailedActionSet();
     break;
   case Action::State::done:
-    stateSet_ = getModel()->getDoneActionSet();
+    stateSet_ = model_->getDoneActionSet();
     break;
   default:
     stateSet_ = nullptr;