Class TimerQueue
Defined in File timer_manager.hpp
Nested Relationships
Nested Types
Class Documentation
-
class TimerQueue
A class for managing a queue of timers.
This class holds a queue of timers of one type (RCL_ROS_TIME, RCL_SYSTEM_TIME or RCL_STEADY_TIME). The queue itself manages an internal map of the timers, orders by the next time a timer will be ready. Each time a timer is ready, a callback will be called from the internal thread.
Public Functions
-
inline ~TimerQueue()
-
inline void stop()
Removes a new timer from the queue. This function is thread safe.
Removes a timer, if it was added to this queue. Ignores timers that are not part of this queue
- Parameters:
timer – the timer to remove.
Adds a new timer to the queue. This function is thread safe.
This function will ignore any timer, that has not a matching type
- Parameters:
timer – the timer to add.
timer_ready_callback – callback that should be called when the timer is ready.
-
inline ~TimerQueue()