host.extension_set(new HostEnergy(&host));
}
-static void onActionStateChange(simgrid::surf::CpuAction* action, simgrid::kernel::resource::Action::State previous)
+static void onActionStateChange(simgrid::surf::CpuAction* action)
{
for (simgrid::surf::Cpu* const& cpu : action->cpus()) {
simgrid::s4u::Host* host = cpu->get_host();
// If it's a VM, take the corresponding PM
simgrid::s4u::VirtualMachine* vm = dynamic_cast<simgrid::s4u::VirtualMachine*>(host);
if (vm) // If it's a VM, take the corresponding PM
- host = vm->getPm();
+ host = vm->get_pm();
// Get the host_energy extension for the relevant host
HostEnergy* host_energy = host->extension<HostEnergy>();
simgrid::s4u::Host::on_speed_change.connect(&onHostChange);
simgrid::s4u::Host::on_destruction.connect(&onHostDestruction);
simgrid::s4u::on_simulation_end.connect(&onSimulationEnd);
- simgrid::surf::CpuAction::onStateChange.connect(&onActionStateChange);
+ simgrid::surf::CpuAction::on_state_change.connect(&onActionStateChange);
}
/** @ingroup plugin_energy