47 #ifndef _MIRA_CHANNELHYSTERESIS_H_ 48 #define _MIRA_CHANNELHYSTERESIS_H_ 87 mHysteresis(lower, upper)
98 const std::string& channelID,
109 template<
typename Class>
111 const std::string& channelID,
115 return subscribe(authority, channelID, boost::bind(f, obj, _1, _2));
121 if (mHysteresis.update(value->value()))
122 mFunction(mHysteresis.getState(), value);
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.
Definition: ChannelHysteresis.h:110
void callback(ChannelRead< T > value)
Called when channel has new data.
Definition: ChannelHysteresis.h:119
Class realizing a Schmitt trigger.
Definition: SchmittTriggerHysteresis.h:65
An exception that occurs whenever a channel has no data.
Definition: Channel.h:88
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
Class object which supports some kind of class reflection.
Definition: Class.h:97
An object that allows read access to data of a channel.
Definition: ChannelReadWrite.h:494
Authorities act as a facade to the framework.
Definition: Authority.h:94
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()
Definition: ChannelHysteresis.h:97
ChannelHysteresis(const T &lower, const T &upper)
Definition: ChannelHysteresis.h:86
Class that can be registered as a filter when subscribing to channels to only get a callback when the...
Definition: ChannelHysteresis.h:83
typename Reflector::ReflectState State
Definition: ReflectorMacros.h:59
The framework that holds all manager classes and provides startup and shutdown of all framework relat...
Channel< T > subscribe(const std::string &channelID, const Duration &storageDuration=Duration::seconds(0))
Subscribes authority to a given channel.
State
State of the trigger.
Definition: SchmittTriggerHysteresis.h:71
Dual threshold hysteresis trigger class.