Class template timed_generator
boost::signals::timed_generator — Creates its own thread and periodically sends a signal with the stored value.
Synopsis
template<typename Signature, typename OutSignal = SIGNAL_NETWORK_DEFAULT_OUT, typename SignalArgs = typename default_signal_args<Signature>::type> class timed_generator : public boost::signals::storage< Signature, OutSignal, SignalArgs > { public: // construct/copy/destruct timed_generator(); template<typename T> timed_generator(const T &); ~timed_generator(); // public member functions void enable(double, unsigned = 0) ; void disable() ; void join() ; void wait_until_completed() ; boost::mutex & completion_mutex() ; boost::condition & completion_condition() ; bool completed() ; // private member functions void thread_function() ; };
Description
timed_generator public member functions
-
void enable(double interval, unsigned signal_count = 0) ;
Parameters: intervalSets the time interval (in seconds) at which the signal is sent.
signal_countThe signal will be sent signal_count times, or indefinitelly if signal_count==0.
-
void disable() ;
-
void join() ;
-
void wait_until_completed() ;
If the timed_generator was enabled with a signal count, this function will wait until the specified number of signals was emitted.
-
boost::mutex & completion_mutex() ;
-
boost::condition & completion_condition() ;
-
bool completed() ;