Function rclc_executor_spin_period

Function Documentation

rcl_ret_t rclc_executor_spin_period(rclc_executor_t *executor, const uint64_t period)

The spin_period function checks for new data at DDS queue as long as ros context is available. It is called every period nanoseconds. It calls rclc_executor_spin_some() as long as rcl_context_is_valid() returns true.

Memory is dynamically allocated within rcl-layer, when DDS queue is accessed with rcl_wait_set_init() (in spin_some function)

Attribute

Adherence

Allocates Memory

Yes

Thread-Safe

No

Uses Atomics

No

Lock-Free

Yes

Parameters:
  • executor[inout] pointer to initialized executor

  • period[in] in nanoseconds

Returns:

RCL_RET_OK if spin operation was successful

Returns:

RCL_RET_INVALID_ARGUMENT if executor is a null pointer

Returns:

RCL_RET_ERROR if any other error occured