- /** @brief Add a callback fired when the state of a Link changes (when it is turned on or off) */
- static void on_state_change_cb(const std::function<void(Link const&)>& cb) { on_state_change.connect(cb); }
- /** @brief Add a callback fired when the bandwidth of a Link changes */
+ /** \static @brief Add a callback fired when any Link is turned on or off */
+ static void on_onoff_cb(const std::function<void(Link const&)>& cb)
+ {
+ on_onoff.connect(cb);
+ }
+ /** @brief Add a callback fired when this specific Link is turned on or off */
+ void on_this_onoff_cb(const std::function<void(Link const&)>& cb)
+ {
+ on_this_onoff.connect(cb);
+ }
+ /** \static @brief Add a callback fired when the bandwidth of any Link changes */