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. More... | |
| bool | hasStarted () const |
| bool | isValid () |
| operator void * () | |
| bool | operator!= (const WallTimer &rhs) |
| bool | operator< (const WallTimer &rhs) |
| WallTimer & | operator= (const WallTimer &other)=default |
| bool | operator== (const WallTimer &rhs) |
| void | setPeriod (const WallDuration &period, bool reset=true) |
| Set the period of this timer. More... | |
| void | start () |
| Start the timer. Does nothing if the timer is already started. More... | |
| void | stop () |
| Stop the timer. Once this call returns, no more callbacks will be called. Does nothing if the timer is already stopped. More... | |
| WallTimer () | |
| WallTimer (const WallTimer &rhs) | |
| ~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 46 of file wall_timer.h.
|
private |
Definition at line 121 of file wall_timer.h.
|
private |
Definition at line 122 of file wall_timer.h.
|
inline |
Definition at line 49 of file wall_timer.h.
| ros::WallTimer::WallTimer | ( | const WallTimer & | rhs | ) |
Definition at line 107 of file wall_timer.cpp.
| ros::WallTimer::~WallTimer | ( | ) |
Definition at line 112 of file wall_timer.cpp.
|
private |
Definition at line 96 of file wall_timer.cpp.
| bool ros::WallTimer::hasPending | ( | ) |
Returns whether or not the timer has any pending events to call.
Definition at line 132 of file wall_timer.cpp.
|
inline |
Definition at line 75 of file wall_timer.h.
|
inline |
Definition at line 76 of file wall_timer.h.
|
inline |
Definition at line 77 of file wall_timer.h.
|
inline |
Definition at line 89 of file wall_timer.h.
|
inline |
Definition at line 79 of file wall_timer.h.
|
inline |
Definition at line 84 of file wall_timer.h.
| void ros::WallTimer::setPeriod | ( | const WallDuration & | period, |
| bool | reset = true |
||
| ) |
Set the period of this timer.
| reset | Whether to reset the timer. If true, timer ignores elapsed time and next cb occurs at now()+period |
Definition at line 142 of file wall_timer.cpp.
| void ros::WallTimer::start | ( | ) |
Start the timer. Does nothing if the timer is already started.
Definition at line 116 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 124 of file wall_timer.cpp.
|
friend |
Definition at line 126 of file wall_timer.h.
|
private |
Definition at line 124 of file wall_timer.h.