rcl
master
C API providing common ROS client library functionality.
|
Go to the documentation of this file.
30 #include "rcl/macros.h"
36 struct rcl_timer_impl_t;
42 struct rcl_timer_impl_t *
impl;
596 #endif // RCL__TIMER_H_
Structure which encapsulates a ROS Timer.
Definition: timer.h:39
rcl_guard_condition_t * rcl_timer_get_guard_condition(const rcl_timer_t *timer)
Retrieve a guard condition used by the timer to wake the waitset when using ROSTime.
struct rcl_timer_impl_t * impl
Private implementation pointer.
Definition: timer.h:42
rcl_ret_t rcl_timer_is_canceled(const rcl_timer_t *timer, bool *is_canceled)
Retrieve the canceled state of a timer.
const rcl_allocator_t * rcl_timer_get_allocator(const rcl_timer_t *timer)
Return the allocator for the timer.
rmw_ret_t rcl_ret_t
The type that holds an rcl return code.
Definition: types.h:23
rcl_ret_t rcl_timer_call(rcl_timer_t *timer)
Call the timer's callback and set the last call time.
rcl_ret_t rcl_timer_cancel(rcl_timer_t *timer)
Cancel a timer.
rcl_ret_t rcl_timer_get_time_until_next_call(const rcl_timer_t *timer, int64_t *time_until_next_call)
Calculate and retrieve the time until the next call in nanoseconds.
Handle for a rcl guard condition.
Definition: guard_condition.h:35
rcl_ret_t rcl_timer_fini(rcl_timer_t *timer)
Finalize a timer.
rcl_ret_t rcl_timer_get_period(const rcl_timer_t *timer, int64_t *period)
Retrieve the period of the timer.
rcl_timer_callback_t rcl_timer_exchange_callback(rcl_timer_t *timer, const rcl_timer_callback_t new_callback)
Exchange the current timer callback and return the current callback.
rcl_ret_t rcl_timer_init(rcl_timer_t *timer, rcl_clock_t *clock, rcl_context_t *context, int64_t period, const rcl_timer_callback_t callback, rcl_allocator_t allocator)
Initialize a timer.
void(* rcl_timer_callback_t)(rcl_timer_t *, int64_t)
User callback signature for timers.
Definition: timer.h:58
rcl_ret_t rcl_timer_exchange_period(const rcl_timer_t *timer, int64_t new_period, int64_t *old_period)
Exchange the period of the timer and return the previous period.
rcl_timer_callback_t rcl_timer_get_callback(const rcl_timer_t *timer)
Return the current timer callback.
struct rcl_timer_t rcl_timer_t
Structure which encapsulates a ROS Timer.
rcl_ret_t rcl_timer_get_time_since_last_call(const rcl_timer_t *timer, int64_t *time_since_last_call)
Retrieve the time since the previous call to rcl_timer_call() occurred.
Encapsulation of a time source.
Definition: time.h:137
Encapsulates the non-global state of an init/shutdown cycle.
Definition: context.h:113
rcl_ret_t rcl_timer_reset(rcl_timer_t *timer)
Reset a timer.
rcl_ret_t rcl_timer_clock(rcl_timer_t *timer, rcl_clock_t **clock)
Retrieve the clock of the timer.
rcl_timer_t rcl_get_zero_initialized_timer(void)
Return a zero initialized timer.
rcl_ret_t rcl_timer_is_ready(const rcl_timer_t *timer, bool *is_ready)
Calculates whether or not the timer should be called.