47 #ifndef _MIRA_CHANNELINTERVAL_H_ 48 #define _MIRA_CHANNELINTERVAL_H_ 86 mInterval(
Duration::microseconds(0)),
87 mLast(
Time::unixEpoch())
92 mLast(
Time::unixEpoch())
103 const std::string& channelID,
113 template<
typename Class>
115 const std::string& channelID,
118 return subscribe(authority, channelID, boost::bind(f, obj, _1));
140 if (ts - mLast < mInterval || !mFunction)
147 boost::function<void (ChannelRead<T>)> mFunction;
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
void setInterval(Duration iv)
Definition: ChannelInterval.h:121
Class object which supports some kind of class reflection.
Definition: Class.h:97
Time last() const
Definition: ChannelInterval.h:131
Channel< T > subscribe(Authority &authority, const std::string &channelID, void(Class::*f)(ChannelRead< T >), Class *obj)
Same as above but with a function and object pointer.
Definition: ChannelInterval.h:114
An object that allows read access to data of a channel.
Definition: ChannelReadWrite.h:440
Wrapper class for boost::posix_time::ptime for adding more functionality to it.
Definition: Time.h:416
Classes for automatic locking/unlocking when reading and writing to channels.
Use this class to represent time durations.
Definition: Time.h:104
Authorities act as a facade to the framework.
Definition: Authority.h:94
ChannelInterval(Duration iv)
Definition: ChannelInterval.h:90
Class that can be registered as a filter when subscribing to channels to only get a callback in a spe...
Definition: ChannelInterval.h:82
Duration interval() const
Definition: ChannelInterval.h:126
Channel< T > subscribe(Authority &authority, const std::string &channelID, boost::function< void(ChannelRead< T >)> fn)
Call this instead of Authority::subscribe()
Definition: ChannelInterval.h:102
static Time now() static Time eternity()
Returns the current utc based time.
Definition: Time.h:479
ChannelInterval()
Definition: ChannelInterval.h:85
void callback(ChannelRead< T > value)
Called when channel has new data.
Definition: ChannelInterval.h:137
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.