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

Manages a steady-clock timer callback. More...

#include <steady_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 SteadyTimer &rhs)
 
bool operator< (const SteadyTimer &rhs)
 
SteadyTimeroperator= (const SteadyTimer &other)=default
 
bool operator== (const SteadyTimer &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...
 
 SteadyTimer ()
 
 SteadyTimer (const SteadyTimer &rhs)
 
void stop ()
 Stop the timer. Once this call returns, no more callbacks will be called. Does nothing if the timer is already stopped. More...
 
 ~SteadyTimer ()
 

Private Types

typedef boost::shared_ptr< ImplImplPtr
 
typedef boost::weak_ptr< ImplImplWPtr
 

Private Member Functions

 SteadyTimer (const SteadyTimerOptions &ops)
 

Private Attributes

ImplPtr impl_
 

Friends

class NodeHandle
 

Detailed Description

Manages a steady-clock timer callback.

A SteadyTimer should always be created through a call to NodeHandle::createSteadyTimer(), or copied from one that was. Once all copies of a specific SteadyTimer go out of scope, the callback associated with that handle will stop being called.

Definition at line 46 of file steady_timer.h.

Member Typedef Documentation

◆ ImplPtr

Definition at line 121 of file steady_timer.h.

◆ ImplWPtr

typedef boost::weak_ptr<Impl> ros::SteadyTimer::ImplWPtr
private

Definition at line 122 of file steady_timer.h.

Constructor & Destructor Documentation

◆ SteadyTimer() [1/3]

ros::SteadyTimer::SteadyTimer ( )
inline

Definition at line 49 of file steady_timer.h.

◆ SteadyTimer() [2/3]

ros::SteadyTimer::SteadyTimer ( const SteadyTimer rhs)

Definition at line 107 of file steady_timer.cpp.

◆ ~SteadyTimer()

ros::SteadyTimer::~SteadyTimer ( )

Definition at line 112 of file steady_timer.cpp.

◆ SteadyTimer() [3/3]

ros::SteadyTimer::SteadyTimer ( const SteadyTimerOptions ops)
private

Definition at line 96 of file steady_timer.cpp.

Member Function Documentation

◆ hasPending()

bool ros::SteadyTimer::hasPending ( )

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

Definition at line 132 of file steady_timer.cpp.

◆ hasStarted()

bool ros::SteadyTimer::hasStarted ( ) const
inline

Definition at line 75 of file steady_timer.h.

◆ isValid()

bool ros::SteadyTimer::isValid ( )
inline

Definition at line 76 of file steady_timer.h.

◆ operator void *()

ros::SteadyTimer::operator void * ( )
inline

Definition at line 77 of file steady_timer.h.

◆ operator!=()

bool ros::SteadyTimer::operator!= ( const SteadyTimer rhs)
inline

Definition at line 89 of file steady_timer.h.

◆ operator<()

bool ros::SteadyTimer::operator< ( const SteadyTimer rhs)
inline

Definition at line 79 of file steady_timer.h.

◆ operator=()

SteadyTimer& ros::SteadyTimer::operator= ( const SteadyTimer other)
default

◆ operator==()

bool ros::SteadyTimer::operator== ( const SteadyTimer rhs)
inline

Definition at line 84 of file steady_timer.h.

◆ setPeriod()

void ros::SteadyTimer::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

Definition at line 142 of file steady_timer.cpp.

◆ start()

void ros::SteadyTimer::start ( )

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

Definition at line 116 of file steady_timer.cpp.

◆ stop()

void ros::SteadyTimer::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 steady_timer.cpp.

Friends And Related Function Documentation

◆ NodeHandle

friend class NodeHandle
friend

Definition at line 126 of file steady_timer.h.

Member Data Documentation

◆ impl_

ImplPtr ros::SteadyTimer::impl_
private

Definition at line 124 of file steady_timer.h.


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


roscpp
Author(s): Morgan Quigley, Josh Faust, Brian Gerkey, Troy Straszheim, Dirk Thomas , Jacob Perron
autogenerated on Sat Sep 14 2024 02:59:36