Point Cloud Library (PCL)  1.7.1
List of all members | Public Types | Public Member Functions
pcl::TimeTrigger Class Reference

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

#include <pcl/common/time_trigger.h>

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. More...
 
 TimeTrigger (double interval_seconds=1.0)
 Timer class that calls a callback method periodically. More...
 
 ~TimeTrigger ()
 Destructor. More...
 
boost::signals2::connection registerCallback (const callback_type &callback)
 registeres a callback More...
 
void setInterval (double interval_seconds)
 Resets the timer interval. More...
 
void start ()
 Start the Trigger. More...
 
void stop ()
 Stop the Trigger. More...
 

Detailed Description

Timer class that invokes registered callback methods periodically.

Definition at line 52 of file time_trigger.h.

Member Typedef Documentation

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

Definition at line 55 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
[in]interval_secondsinterval in seconds
[in]callbackcallback 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
[in]interval_secondsinterval in seconds
pcl::TimeTrigger::~TimeTrigger ( )

Destructor.

Member Function Documentation

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

registeres a callback

Parameters
[in]callbackcallback 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
[in]interval_secondsinterval 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: