/* max_power is the power consumed at 100% link load */
try {
idle_ = std::stod(current_power_values.front());
- } catch (std::invalid_argument& ia) {
+ } catch (const std::invalid_argument&) {
throw std::invalid_argument(std::string("Invalid idle power value for link ") + this->link_->get_cname());
}
try {
busy_ = std::stod(current_power_values.back());
- } catch (std::invalid_argument& ia) {
+ } catch (const std::invalid_argument&) {
throw std::invalid_argument(std::string("Invalid busy power value for link ") + this->link_->get_cname());
}
}
double LinkEnergy::get_consumed_energy()
{
if (last_updated_ < surf_get_clock()) // We need to simcall this as it modifies the environment
- simgrid::simix::simcall(std::bind(&LinkEnergy::update, this));
+ simgrid::kernel::actor::simcall(std::bind(&LinkEnergy::update, this));
return this->total_energy_;
}
} // namespace plugin
*/
void sg_link_energy_plugin_init()
{
-
if (LinkEnergy::EXTENSION_ID.valid())
return;
LinkEnergy::EXTENSION_ID = simgrid::s4u::Link::extension_create<LinkEnergy>();
});
simgrid::s4u::Link::on_communicate.connect(&on_communicate);
- simgrid::s4u::on_simulation_end.connect(&on_simulation_end);
+ simgrid::s4u::Engine::on_simulation_end.connect(&on_simulation_end);
}
/** @ingroup plugin_energy