tf2_ros
master
This package contains the ROS bindings for the tf2 library, for both Python and C++.
|
Abstract interface for creating timers. More...
#include <create_timer_interface.h>
Public Types | |
using | SharedPtr = std::shared_ptr< CreateTimerInterface > |
using | ConstSharedPtr = std::shared_ptr< const CreateTimerInterface > |
using | UniquePtr = std::unique_ptr< CreateTimerInterface > |
Public Member Functions | |
virtual TF2_ROS_PUBLIC | ~CreateTimerInterface ()=default |
virtual TF2_ROS_PUBLIC TimerHandle | createTimer (rclcpp::Clock::SharedPtr clock, const tf2::Duration &period, TimerCallbackType callback)=0 |
Create a new timer. More... | |
virtual TF2_ROS_PUBLIC void | cancel (const TimerHandle &timer_handle)=0 |
Cancel a timer. More... | |
virtual TF2_ROS_PUBLIC void | reset (const TimerHandle &timer_handle)=0 |
Reset the timer. More... | |
virtual TF2_ROS_PUBLIC void | remove (const TimerHandle &timer_handle)=0 |
Remove a timer. More... | |
Abstract interface for creating timers.
|
virtualdefault |
|
pure virtual |
Create a new timer.
After creation, the timer will periodically execute the user-provided callback.
clock | The clock providing the current time |
period | The interval at which the timer fires |
callback | The callback function to execute every interval |
Implemented in tf2_ros::CreateTimerROS.
|
pure virtual |
Cancel a timer.
The timer will stop executing user callbacks.
timer_handle | Handle to the timer to cancel \raises tf2_ros::InvalidTimerHandleException if the timer does not exist |
Implemented in tf2_ros::CreateTimerROS.
|
pure virtual |
Reset the timer.
The timer will reset and continue to execute user callbacks periodically.
timer_handle | Handle to the timer to reset \raises tf2_ros::InvalidTimerHandleException if the timer does not exist |
Implemented in tf2_ros::CreateTimerROS.
|
pure virtual |
Remove a timer.
The timer will be canceled and removed from internal storage.
timer_handle | Handle to the timer to reset \raises tf2_ros::InvalidTimerHandleException if the timer does not exist |
Implemented in tf2_ros::CreateTimerROS.