nros C++ API
Lightweight ROS 2 client for embedded real-time systems (C++ headers)
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
rclcpp::TimerOps Class Reference

#include <timer.hpp>

Inheritance diagram for rclcpp::TimerOps:
Inheritance graph
[legend]

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_
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ TimerOps()

constexpr rclcpp::TimerOps::TimerOps ( void *  executor,
size_t  handle_id 
)
inlineconstexprprotected

Member Function Documentation

◆ cancel()

Result rclcpp::TimerOps::cancel ( )
inline

Stop the timer firing. It stays registered; reset() restarts it.

◆ is_canceled()

bool rclcpp::TimerOps::is_canceled ( ) const
inline

Whether the timer is cancelled. A released or empty handle answers true: nothing will fire it.

◆ is_ready()

bool rclcpp::TimerOps::is_ready ( ) const
inline

Would the timer fire on the next spin_once()? — TimerBase::is_ready(). See rclcpp::Timer::is_ready.

◆ reset()

Result rclcpp::TimerOps::reset ( )
inline

Restart the timer from zero elapsed time; un-cancels a cancelled one.

◆ time_until_trigger()

Duration rclcpp::TimerOps::time_until_trigger ( ) const
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.

Member Data Documentation

◆ executor_

void* rclcpp::TimerOps::executor_
protected

◆ handle_id_

size_t rclcpp::TimerOps::handle_id_
protected

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