X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5ce7954780a1bff9dec8111b835749decb85a158..2c4fb0703efbfb5f53a88cc15827a9e700c0836e:/src/surf/plugins/link_energy.cpp diff --git a/src/surf/plugins/link_energy.cpp b/src/surf/plugins/link_energy.cpp index 32dff1235b..3f28eb864e 100644 --- a/src/surf/plugins/link_energy.cpp +++ b/src/surf/plugins/link_energy.cpp @@ -88,7 +88,7 @@ void LinkEnergy::initWattsRangeList() return; inited_ = true; - const char* all_power_values_str = this->link_->getProperty("watt_range"); + const char* all_power_values_str = this->link_->get_property("watt_range"); if (all_power_values_str == nullptr) return; @@ -126,7 +126,7 @@ double LinkEnergy::getPower() double power_slope = busy_ - idle_; - double normalized_link_usage = link_->getUsage() / link_->bandwidth(); + double normalized_link_usage = link_->get_usage() / link_->get_bandwidth(); double dynamic_power = power_slope * normalized_link_usage; return idle_ + dynamic_power; @@ -135,7 +135,7 @@ double LinkEnergy::getPower() double LinkEnergy::getConsumedEnergy() { if (lastUpdated_ < surf_get_clock()) // We need to simcall this as it modifies the environment - simgrid::simix::kernelImmediate(std::bind(&LinkEnergy::update, this)); + simgrid::simix::simcall(std::bind(&LinkEnergy::update, this)); return this->totalEnergy_; } }