MIRA
|
Class that can be registered as a filter when subscribing to channels to only get a callback when the state of the hysteresis trigger changes. More...
#include <filter/ChannelHysteresis.h>
Public Member Functions | |
ChannelHysteresis (const T &lower, const T &upper) | |
Channel< T > | subscribe (Authority &authority, const std::string &channelID, boost::function< void(typename SchmittTriggerHysteresis< T >::State, ChannelRead< T >)> fn) |
Call this instead of Authority::subscribe() More... | |
template<typename Class > | |
Channel< T > | subscribe (Authority &authority, const std::string &channelID, void(Class::*f)(typename SchmittTriggerHysteresis< T >::State, ChannelRead< T >), Class *obj) |
Same as above but with a function and object pointer. More... | |
void | callback (ChannelRead< T > value) |
Called when channel has new data. More... | |
Class that can be registered as a filter when subscribing to channels to only get a callback when the state of the hysteresis trigger changes.
The constructor takes the function pointer to the proper callback and the class' callback method is registered instead.
|
inline |
|
inline |
Call this instead of Authority::subscribe()
authority | The authority that does the basic subscription |
channelID | The ID of the channel we are subscribing on |
fn | The function that should be called when the filter matches |
|
inline |
Same as above but with a function and object pointer.
Provided for convenience.
|
inline |
Called when channel has new data.