- /** Add a callback fired when the machine is turned on or off (called AFTER the change) */
- static void on_state_change_cb(const std::function<void(Host const&)>& cb) { on_state_change.connect(cb); }
- /** Add a callback fired when the speed of the machine is changed (called AFTER the change)
+ /** \static Add a callback fired when any machine is turned on or off (called AFTER the change) */
+ static void on_onoff_cb(const std::function<void(Host const&)>& cb)
+ {
+ on_onoff.connect(cb);
+ }
+ XBT_ATTRIB_DEPRECATED_v338("Please use on_onoff_cb() instead") static void on_state_change_cb(
+ const std::function<void(Host const&)>& cb)
+ {
+ on_onoff.connect(cb);
+ }
+ /** Add a callback fired when this specific machine is turned on or off (called AFTER the change) */
+ void on_this_onoff_cb(const std::function<void(Host const&)>& cb)
+ {
+ on_this_onoff.connect(cb);
+ }
+ /** \static Add a callback fired when the speed of any machine is changed (called AFTER the change)