Manages a wall-clock timer callback. More...
#include <wall_timer.h>
Classes | |
class | Impl |
Public Member Functions | |
bool | hasPending () |
Returns whether or not the timer has any pending events to call. | |
bool | isValid () |
operator void * () | |
bool | operator!= (const WallTimer &rhs) |
bool | operator< (const WallTimer &rhs) |
bool | operator== (const WallTimer &rhs) |
void | setPeriod (const WallDuration &period) |
Set the period of this timer. | |
void | start () |
Start the timer. Does nothing if the timer is already started. | |
void | stop () |
Stop the timer. Once this call returns, no more callbacks will be called. Does nothing if the timer is already stopped. | |
WallTimer (const WallTimer &rhs) | |
WallTimer () | |
~WallTimer () | |
Private Types | |
typedef boost::shared_ptr< Impl > | ImplPtr |
typedef boost::weak_ptr< Impl > | ImplWPtr |
Private Member Functions | |
WallTimer (const WallTimerOptions &ops) | |
Private Attributes | |
ImplPtr | impl_ |
Friends | |
class | NodeHandle |
Manages a wall-clock timer callback.
A WallTimer should always be created through a call to NodeHandle::createWallTimer(), or copied from one that was. Once all copies of a specific WallTimer go out of scope, the callback associated with that handle will stop being called.
Definition at line 45 of file wall_timer.h.
typedef boost::shared_ptr<Impl> ros::WallTimer::ImplPtr [private] |
Definition at line 117 of file wall_timer.h.
typedef boost::weak_ptr<Impl> ros::WallTimer::ImplWPtr [private] |
Definition at line 118 of file wall_timer.h.
ros::WallTimer::WallTimer | ( | ) | [inline] |
Definition at line 48 of file wall_timer.h.
ros::WallTimer::WallTimer | ( | const WallTimer & | rhs | ) |
Definition at line 105 of file wall_timer.cpp.
ros::WallTimer::~WallTimer | ( | ) |
Definition at line 110 of file wall_timer.cpp.
ros::WallTimer::WallTimer | ( | const WallTimerOptions & | ops | ) | [private] |
Definition at line 94 of file wall_timer.cpp.
bool ros::WallTimer::hasPending | ( | ) |
Returns whether or not the timer has any pending events to call.
Definition at line 130 of file wall_timer.cpp.
bool ros::WallTimer::isValid | ( | ) | [inline] |
Definition at line 72 of file wall_timer.h.
ros::WallTimer::operator void * | ( | ) | [inline] |
Definition at line 73 of file wall_timer.h.
bool ros::WallTimer::operator!= | ( | const WallTimer & | rhs | ) | [inline] |
Definition at line 85 of file wall_timer.h.
bool ros::WallTimer::operator< | ( | const WallTimer & | rhs | ) | [inline] |
Definition at line 75 of file wall_timer.h.
bool ros::WallTimer::operator== | ( | const WallTimer & | rhs | ) | [inline] |
Definition at line 80 of file wall_timer.h.
void ros::WallTimer::setPeriod | ( | const WallDuration & | period | ) |
Set the period of this timer.
Definition at line 140 of file wall_timer.cpp.
void ros::WallTimer::start | ( | ) |
Start the timer. Does nothing if the timer is already started.
Definition at line 114 of file wall_timer.cpp.
void ros::WallTimer::stop | ( | ) |
Stop the timer. Once this call returns, no more callbacks will be called. Does nothing if the timer is already stopped.
Definition at line 122 of file wall_timer.cpp.
friend class NodeHandle [friend] |
Definition at line 122 of file wall_timer.h.
ImplPtr ros::WallTimer::impl_ [private] |
Definition at line 120 of file wall_timer.h.