Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill mc::api::get_remote_app()
[simgrid.git] / src / plugins / link_energy.cpp
index e528c0d6c553fec8856bf06fbc75a2dfde55a50b..51bd89c211551f8a2c88ccc62b94498b348f2ef8 100644 (file)
@@ -39,10 +39,9 @@ SIMGRID_REGISTER_PLUGIN(link_energy, "Link energy consumption.", &sg_link_energy
  and then use the following function to retrieve the consumption of a given link: sg_link_get_consumed_energy().
  */
 
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(link_energy, surf, "Logging specific to the SURF LinkEnergy plugin");
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(link_energy, kernel, "Logging specific to the LinkEnergy plugin");
 
-namespace simgrid {
-namespace plugin {
+namespace simgrid::plugin {
 
 class LinkEnergy {
   s4u::Link* link_{};
@@ -138,11 +137,10 @@ double LinkEnergy::get_power() const
 double LinkEnergy::get_consumed_energy()
 {
   if (last_updated_ < simgrid::s4u::Engine::get_clock()) // We need to simcall this as it modifies the environment
-    kernel::actor::simcall(std::bind(&LinkEnergy::update, this));
+    kernel::actor::simcall_answered(std::bind(&LinkEnergy::update, this));
   return this->total_energy_;
 }
-} // namespace plugin
-} // namespace simgrid
+} // namespace simgrid::plugin
 
 using simgrid::plugin::LinkEnergy;