Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
roswrap::WallTimer Class Reference

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 isValid ()
 
 operator void * ()
 
bool operator!= (const WallTimer &rhs)
 
bool operator< (const WallTimer &rhs)
 
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 std::shared_ptr< ImplImplPtr
 
typedef std::weak_ptr< ImplImplWPtr
 

Private Member Functions

 WallTimer (const WallTimerOptions &ops)
 

Private Attributes

ImplPtr impl_
 

Friends

class NodeHandle
 

Detailed Description

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 47 of file wall_timer.h.

Member Typedef Documentation

◆ ImplPtr

typedef std::shared_ptr<Impl> roswrap::WallTimer::ImplPtr
private

Definition at line 119 of file wall_timer.h.

◆ ImplWPtr

typedef std::weak_ptr<Impl> roswrap::WallTimer::ImplWPtr
private

Definition at line 120 of file wall_timer.h.

Constructor & Destructor Documentation

◆ WallTimer() [1/3]

roswrap::WallTimer::WallTimer ( )
inline

Definition at line 50 of file wall_timer.h.

◆ WallTimer() [2/3]

roswrap::WallTimer::WallTimer ( const WallTimer rhs)

◆ ~WallTimer()

roswrap::WallTimer::~WallTimer ( )

◆ WallTimer() [3/3]

roswrap::WallTimer::WallTimer ( const WallTimerOptions ops)
private

Member Function Documentation

◆ hasPending()

bool roswrap::WallTimer::hasPending ( )

Returns whether or not the timer has any pending events to call.

◆ isValid()

bool roswrap::WallTimer::isValid ( )
inline

Definition at line 75 of file wall_timer.h.

◆ operator void *()

roswrap::WallTimer::operator void * ( )
inline

Definition at line 76 of file wall_timer.h.

◆ operator!=()

bool roswrap::WallTimer::operator!= ( const WallTimer rhs)
inline

Definition at line 88 of file wall_timer.h.

◆ operator<()

bool roswrap::WallTimer::operator< ( const WallTimer rhs)
inline

Definition at line 78 of file wall_timer.h.

◆ operator==()

bool roswrap::WallTimer::operator== ( const WallTimer rhs)
inline

Definition at line 83 of file wall_timer.h.

◆ setPeriod()

void roswrap::WallTimer::setPeriod ( const WallDuration period,
bool  reset = true 
)

Set the period of this timer.

Parameters
resetWhether to reset the timer. If true, timer ignores elapsed time and next cb occurs at now()+period

◆ start()

void roswrap::WallTimer::start ( )

Start the timer. Does nothing if the timer is already started.

◆ stop()

void roswrap::WallTimer::stop ( )

Stop the timer. Once this call returns, no more callbacks will be called. Does nothing if the timer is already stopped.

Friends And Related Function Documentation

◆ NodeHandle

friend class NodeHandle
friend

Definition at line 124 of file wall_timer.h.

Member Data Documentation

◆ impl_

ImplPtr roswrap::WallTimer::impl_
private

Definition at line 122 of file wall_timer.h.


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


sick_scan_xd
Author(s): Michael Lehning , Jochen Sprickerhof , Martin Günther
autogenerated on Fri Oct 25 2024 02:47:15