Function rcl_is_enabled_ros_time_override

Function Documentation

rcl_ret_t rcl_is_enabled_ros_time_override(rcl_clock_t *clock, bool *is_enabled)

Check if the RCL_ROS_TIME time source has the override enabled.

This will populate the is_enabled object to indicate if the time overide is enabled. If it is enabled, the set value will be returned. Otherwise this time source will return the equivalent to system time abstraction.

This function is not thread-safe with rcl_enable_ros_time_override() nor rcl_disable_ros_time_override() functions when used on the same clock object.

Attribute

Adherence

Allocates Memory

No

Thread-Safe

No [1]

Uses Atomics

No

Lock-Free

Yes

[1] Function is reentrant, but concurrent calls on the same object are not safe.

Parameters:
  • clock[in] The clock to query.

  • is_enabled[out] Whether the override is enabled..

Returns:

RCL_RET_OK if the time source was queried successfully, or

Returns:

RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or

Returns:

RCL_RET_ERROR an unspecified error occur.