Robot Raconteur Core C++ Library
Public Member Functions | List of all members
RobotRaconteur::Timer Class Referenceabstract

A timer to invoke a callback. More...

Inherits boost::noncopyable.

Inherited by RobotRaconteur::WallTimer.

Public Member Functions

virtual void Start ()=0
 Start the timer. More...
 
virtual void Stop ()=0
 Stop the timer.
 
virtual void TryStop ()=0
 Stop the timer without throwing an exception if the timer is not running.
 
virtual boost::posix_time::time_duration GetPeriod ()=0
 Get the period of the timer. More...
 
virtual void SetPeriod (const boost::posix_time::time_duration &period)=0
 Set the period of the timer. More...
 
virtual bool IsRunning ()=0
 Check if timer is running. More...
 
virtual void Clear ()=0
 Clear the timer.
 

Detailed Description

A timer to invoke a callback.

Timers invoke a callback at a specified rate. The timer can either be one-short, or repeating.

Use RobotRaconteurNode::CreateTimer() to create timers.

Member Function Documentation

◆ GetPeriod()

virtual boost::posix_time::time_duration RobotRaconteur::Timer::GetPeriod ( )
pure virtual

Get the period of the timer.

Returns
boost::posix_time::time_duration

◆ IsRunning()

virtual bool RobotRaconteur::Timer::IsRunning ( )
pure virtual

Check if timer is running.

Returns
true
false

◆ SetPeriod()

virtual void RobotRaconteur::Timer::SetPeriod ( const boost::posix_time::time_duration &  period)
pure virtual

Set the period of the timer.

Parameters
period

◆ Start()

virtual void RobotRaconteur::Timer::Start ( )
pure virtual

Start the timer.

Must be called after RobotRaconteurNode::CreateTimer()


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