I'm not sure of how to export it to the user.
XBT_OUT();
}
-simgrid::xbt::signal<void(simgrid::surf::CpuAction*, e_surf_action_state_t, e_surf_action_state_t)> CpuAction::onStateChange;
+simgrid::xbt::signal<void(simgrid::surf::CpuAction*, e_surf_action_state_t)> CpuAction::onStateChange;
void CpuAction::setState(e_surf_action_state_t state){
- e_surf_action_state_t old = getState();
+ e_surf_action_state_t previous = getState();
Action::setState(state);
- onStateChange(this, old, state);
+ onStateChange(this, previous);
}
}
friend XBT_PUBLIC(Cpu*) getActionCpu(CpuAction *action);
public:
/** @brief Callbacks handler which emit the callbacks after CpuAction State changed *
- * @details Callback functions have the following signature: `void(CpuAction *action, e_surf_action_state_t old, e_surf_action_state_t current)`
+ * @details Callback functions have the following signature: `void(CpuAction *action, e_surf_action_state_t previous)`
*/
- static simgrid::xbt::signal<void(simgrid::surf::CpuAction*, e_surf_action_state_t, e_surf_action_state_t)> onStateChange;
+ static simgrid::xbt::signal<void(simgrid::surf::CpuAction*, e_surf_action_state_t)> onStateChange;
/** @brief CpuAction constructor */
CpuAction(simgrid::surf::Model *model, double cost, bool failed)
host.extension_set(new HostEnergy(&host));
}
-static void onActionStateChange(simgrid::surf::CpuAction *action,
- e_surf_action_state_t old, e_surf_action_state_t cur) {
+static void onActionStateChange(simgrid::surf::CpuAction *action, e_surf_action_state_t previous) {
const char *name = getActionCpu(action)->getName();
simgrid::surf::Host *host = sg_host_by_name(name)->extension<simgrid::surf::Host>();
simgrid::surf::VirtualMachine *vm = dynamic_cast<simgrid::surf::VirtualMachine*>(host);