rcl
master
C API providing common ROS client library functionality.
|
23 #include "rcl/allocator.h"
24 #include "rcl/macros.h"
25 #include "rcl/types.h"
26 #include "rcl/visibility_control.h"
30 #define RCL_S_TO_NS RCUTILS_S_TO_NS
31 #define RCL_MS_TO_NS RCUTILS_MS_TO_NS
33 #define RCL_US_TO_NS RCUTILS_US_TO_NS
37 #define RCL_NS_TO_S RCUTILS_NS_TO_S
38 #define RCL_NS_TO_MS RCUTILS_NS_TO_MS
40 #define RCL_NS_TO_US RCUTILS_NS_TO_US
59 typedef enum rcl_clock_type_t
61 RCL_CLOCK_UNINITIALIZED = 0,
75 typedef enum rcl_clock_change_t
78 RCL_ROS_TIME_NO_CHANGE = 1,
80 RCL_ROS_TIME_ACTIVATED = 2,
82 RCL_ROS_TIME_DEACTIVATED = 3,
84 RCL_SYSTEM_TIME_NO_CHANGE = 4
101 typedef void (* rcl_jump_callback_t)(
215 enum rcl_clock_type_t clock_type,
rcl_clock_t * clock,
339 rcl_steady_clock_init(
374 rcl_steady_clock_fini(
405 rcl_system_clock_init(
439 rcl_system_clock_fini(
469 rcl_difference_times(
496 rcl_clock_get_now(
rcl_clock_t * clock, rcl_time_point_value_t * time_point_value);
559 rcl_disable_ros_time_override(
rcl_clock_t * clock);
590 rcl_is_enabled_ros_time_override(
624 rcl_set_ros_time_override(
625 rcl_clock_t * clock, rcl_time_point_value_t time_value);
662 rcl_clock_add_jump_callback(
695 rcl_clock_remove_jump_callback(
696 rcl_clock_t * clock, rcl_jump_callback_t callback,
void * user_data);
702 #endif // RCL__TIME_H_
int64_t rcutils_duration_value_t
rcl_jump_callback_info_t * jump_callbacks
An array of added jump callbacks.
Definition: time.h:136
enum rcl_clock_type_t type
Clock type.
Definition: time.h:134
rcl_time_point_value_t nanoseconds
Nanoseconds of the point in time.
Definition: time.h:152
rcl_clock_change_t clock_change
Indicate whether or not the source of time changed.
Definition: time.h:91
rcl_duration_value_t nanoseconds
Duration in nanoseconds and its source.
Definition: time.h:71
void * data
Clock storage.
Definition: time.h:143
rcl_jump_callback_t callback
Callback to fucntion.
Definition: time.h:123
Struct to describe a jump in time.
Definition: time.h:88
rcl_duration_t min_backward
Definition: time.h:116
rcl_jump_threshold_t threshold
Threshold to decide when to call the callback.
Definition: time.h:125
rcl_ret_t(* get_now)(void *data, rcl_time_point_value_t *now)
Pointer to get_now function.
Definition: time.h:140
A single point in time, measured in nanoseconds, the reference point is based on the source.
Definition: time.h:149
Describe the prerequisites for calling a time jump callback.
Definition: time.h:107
rcl_clock_type_t clock_type
Clock type of the point in time.
Definition: time.h:154
int64_t rcutils_time_point_value_t
bool on_clock_change
True to call callback when the clock type changes.
Definition: time.h:110
Encapsulation of a time source.
Definition: time.h:131
rcl_allocator_t allocator
Custom allocator used for internal allocations.
Definition: time.h:145
void * user_data
Pointer passed to the callback.
Definition: time.h:127
rcl_duration_t delta
The new time minus the last time before the jump.
Definition: time.h:93
rcl_duration_t min_forward
Definition: time.h:113
size_t num_jump_callbacks
Number of callbacks in jump_callbacks.
Definition: time.h:138
Struct to describe an added callback.
Definition: time.h:120
A duration of time, measured in nanoseconds and its source.
Definition: time.h:68