/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "energy.hpp"
-#include "../cpu_cas01.hpp"
-#include "../virtual_machine.hpp"
+#include <src/surf/plugins/energy.hpp>
+#include <src/surf/cpu_cas01.hpp>
+#include <src/surf/virtual_machine.hpp>
/** @addtogroup SURF_plugin_energy
if (simgrid::energy::surf_energy == NULL) {
simgrid::energy::surf_energy =
new std::map<simgrid::surf::Host*, simgrid::energy::HostEnergy*>();
- surf_callback_connect(simgrid::surf::hostCreatedCallbacks, energyHostCreatedCallback);
- surf_callback_connect(simgrid::surf::VMCreatedCallbacks, energyVMCreatedCallback);
- surf_callback_connect(simgrid::surf::hostDestructedCallbacks, energyHostDestructedCallback);
- surf_callback_connect(simgrid::surf::cpuActionStateChangedCallbacks, energyCpuActionStateChangedCallback);
- surf_callback_connect(simgrid::surf::surfExitCallbacks, sg_energy_plugin_exit);
- surf_callback_connect(simgrid::surf::hostStateChangedCallbacks, energyStateChangedCallback);
+ simgrid::surf::VMCreatedCallbacks.connect(energyVMCreatedCallback);
+ simgrid::surf::Host::onCreation.connect(energyHostCreatedCallback);
+ simgrid::surf::Host::onDestruction.connect(energyHostDestructedCallback);
+ simgrid::surf::cpuActionStateChangedCallbacks.connect(
+ energyCpuActionStateChangedCallback);
+ simgrid::surf::surfExitCallbacks.connect(sg_energy_plugin_exit);
+ simgrid::surf::Host::onStateChange.connect(
+ energyStateChangedCallback);
}
}