Class TimerBase

Inheritance Relationships

Derived Type

Class Documentation

class TimerBase

Base class for Agnocast timers providing periodic callback execution.

Defines the common interface for all timer types, including callback execution, clock access, and period storage.

Subclassed by agnocast::GenericTimer< FunctorT >

Public Functions

virtual ~TimerBase()
inline virtual AGNOCAST_PUBLIC bool is_steady () const

Return whether this timer uses a steady clock.

Returns:

True if the clock is steady.

virtual AGNOCAST_PUBLIC rclcpp::Clock::SharedPtr get_clock () const =0

Get the clock associated with this timer.

Returns:

Shared pointer to the clock.

virtual void execute_callback() = 0

Protected Functions

inline TimerBase(uint32_t timer_id, std::chrono::nanoseconds period)

Protected Attributes

uint32_t timer_id_
std::chrono::nanoseconds period_