|
nros C++ API
Lightweight ROS 2 client for embedded real-time systems (C++ headers)
|
#include <timer.hpp>

Public Member Functions | |
| Result | cancel () |
Stop the timer firing. It stays registered; reset() restarts it. | |
| bool | is_canceled () const |
| bool | is_ready () const |
| Result | reset () |
| Restart the timer from zero elapsed time; un-cancels a cancelled one. | |
| Duration | time_until_trigger () const |
Protected Member Functions | |
| constexpr | TimerOps (void *executor, size_t handle_id) |
Protected Attributes | |
| void * | executor_ |
| size_t | handle_id_ |
What timer_->... reaches on a [TimerHandle]: the operations a timer registration supports, over the same two words — phase-476 W2.
A separate type from the handle because ported code says BOTH timer_->reset() (restart the timer) and timer_.reset() (drop it), and upstream gives them different meanings. Behind one class, operator-> returning this would make the two spellings the same call.
|
inline |
Stop the timer firing. It stays registered; reset() restarts it.
|
inline |
Whether the timer is cancelled. A released or empty handle answers true: nothing will fire it.
|
inline |
Would the timer fire on the next spin_once()? — TimerBase::is_ready(). See rclcpp::Timer::is_ready.
|
inline |
Restart the timer from zero elapsed time; un-cancels a cancelled one.
|
inline |
Time until the timer next fires, NEGATIVE when overdue — TimerBase::time_until_trigger(). See rclcpp::Timer::time_until_trigger for the two recorded differences from rclcpp. Duration() for an empty, released or stale handle.
|
protected |
|
protected |