Public Types | Public Member Functions

pcl::TimeTrigger Class Reference
[Module common]

timer class that invokes registered callback methods periodically. More...

#include <pcl/common/time_trigger.h>

List of all members.

Public Types

typedef boost::function< void() > callback_type

Public Member Functions

 TimeTrigger (double interval_seconds, const callback_type &callback)
 timer class that calls a callback method periodically.
 TimeTrigger (double interval_seconds=1.0)
 timer class that calls a callback method periodically.
 ~TimeTrigger ()
 desctructor
boost::signals2::connection registerCallback (const callback_type &callback)
 registeres a callback
void setInterval (double interval_seconds)
 resets the timer interval
void start ()
 start the Trigger
void stop ()
 stop the Trigger

Detailed Description

timer class that invokes registered callback methods periodically.

Parameters:
interval_seconds interval in seconds
callback callback to be invoked periodically

Definition at line 58 of file time_trigger.h.


Member Typedef Documentation

typedef boost::function<void() > pcl::TimeTrigger::callback_type

Definition at line 61 of file time_trigger.h.


Constructor & Destructor Documentation

pcl::TimeTrigger::TimeTrigger ( double  interval_seconds,
const callback_type callback 
)

timer class that calls a callback method periodically.

Due to possible blocking calls, only one callback method can be registered per instance.

Parameters:
interval_seconds interval in seconds
callback callback to be invoked periodically
pcl::TimeTrigger::TimeTrigger ( double  interval_seconds = 1.0  ) 

timer class that calls a callback method periodically.

Due to possible blocking calls, only one callback method can be registered per instance.

Parameters:
interval_seconds interval in seconds
pcl::TimeTrigger::~TimeTrigger (  ) 

desctructor


Member Function Documentation

boost::signals2::connection pcl::TimeTrigger::registerCallback ( const callback_type callback  ) 

registeres a callback

Parameters:
callback callback function to the list of callbacks. signature has to be boost::function<void()>
Returns:
connection the connection, which can be used to disable/enable and remove callback from list
void pcl::TimeTrigger::setInterval ( double  interval_seconds  ) 

resets the timer interval

Parameters:
interval_seconds interval in seconds
void pcl::TimeTrigger::start (  ) 

start the Trigger

void pcl::TimeTrigger::stop (  ) 

stop the Trigger


The documentation for this class was generated from the following file: