|
| WallTimer (std::chrono::nanoseconds period, FunctorT &&callback, rclcpp::Context::SharedPtr context, bool autostart=true) |
| Wall timer constructor. More...
|
|
| GenericTimer (Clock::SharedPtr clock, std::chrono::nanoseconds period, FunctorT &&callback, rclcpp::Context::SharedPtr context, bool autostart=true) |
| Default constructor. More...
|
|
virtual | ~GenericTimer () |
| Default destructor.
|
|
std::shared_ptr< void > | call () override |
|
void | execute_callback (const std::shared_ptr< void > &data) override |
|
template<typename CallbackT = FunctorT, typename std::enable_if< rclcpp::function_traits::same_arguments< CallbackT, VoidCallbackType >::value >::type * = nullptr> |
void | execute_callback_delegate (const rcl_timer_call_info_t &) |
|
template<typename CallbackT = FunctorT, typename std::enable_if< rclcpp::function_traits::same_arguments< CallbackT, TimerCallbackType >::value >::type * = nullptr> |
void | execute_callback_delegate (const rcl_timer_call_info_t &) |
|
template<typename CallbackT = FunctorT, typename std::enable_if< rclcpp::function_traits::same_arguments< CallbackT, TimerInfoCallbackType >::value >::type * = nullptr> |
void | execute_callback_delegate (const rcl_timer_call_info_t &timer_call_info) |
|
bool | is_steady () override |
| Is the clock steady (i.e. is the time between ticks constant?) More...
|
|
RCLCPP_PUBLIC | TimerBase (Clock::SharedPtr clock, std::chrono::nanoseconds period, rclcpp::Context::SharedPtr context, bool autostart=true) |
| TimerBase constructor. More...
|
|
virtual RCLCPP_PUBLIC | ~TimerBase () |
| TimerBase destructor.
|
|
RCLCPP_PUBLIC void | cancel () |
| Cancel the timer. More...
|
|
RCLCPP_PUBLIC bool | is_canceled () |
| Return the timer cancellation state. More...
|
|
RCLCPP_PUBLIC void | reset () |
| Reset the timer. More...
|
|
RCLCPP_PUBLIC std::shared_ptr< const rcl_timer_t > | get_timer_handle () |
|
RCLCPP_PUBLIC std::chrono::nanoseconds | time_until_trigger () |
| Check how long the timer has until its next scheduled callback. More...
|
|
RCLCPP_PUBLIC bool | is_ready () |
| Check if the timer is ready to trigger the callback. More...
|
|
RCLCPP_PUBLIC bool | exchange_in_use_by_wait_set_state (bool in_use_state) |
| Exchange the "in use by wait set" state for this timer. More...
|
|
RCLCPP_PUBLIC void | set_on_reset_callback (std::function< void(size_t)> callback) |
| Set a callback to be called when the timer is reset. More...
|
|
RCLCPP_PUBLIC void | clear_on_reset_callback () |
| Unset the callback registered for reset timer.
|
|
template<typename FunctorT, typename std::enable_if< rclcpp::function_traits::same_arguments< FunctorT, VoidCallbackType >::value||rclcpp::function_traits::same_arguments< FunctorT, TimerCallbackType >::value||rclcpp::function_traits::same_arguments< FunctorT, TimerInfoCallbackType >::value >::type * = nullptr>
class rclcpp::WallTimer< FunctorT, >
Definition at line 358 of file timer.hpp.
template<typename FunctorT , typename std::enable_if< rclcpp::function_traits::same_arguments< FunctorT, VoidCallbackType >::value||rclcpp::function_traits::same_arguments< FunctorT, TimerCallbackType >::value||rclcpp::function_traits::same_arguments< FunctorT, TimerInfoCallbackType >::value >::type * = nullptr>
rclcpp::WallTimer< FunctorT, >::WallTimer |
( |
std::chrono::nanoseconds |
period, |
|
|
FunctorT && |
callback, |
|
|
rclcpp::Context::SharedPtr |
context, |
|
|
bool |
autostart = true |
|
) |
| |
|
inline |
Wall timer constructor.
- Parameters
-
period | The interval at which the timer fires |
callback | The callback function to execute every interval |
context | node context |
autostart | timer state on initialization |
Definition at line 370 of file timer.hpp.