Function rclc_executor_add_service_with_request_id

Function Documentation

rcl_ret_t rclc_executor_add_service_with_request_id(rclc_executor_t *executor, rcl_service_t *service, void *request_msg, void *response_msg, rclc_service_callback_with_request_id_t callback)

Adds a service to an executor.

Attribute

Adherence

Allocates Memory

No

Thread-Safe

No

Uses Atomics

No

Lock-Free

Yes

Parameters:
  • executor[inout] pointer to initialized executor

  • service[in] pointer to an allocated and initialized service

  • request_msg[in] type-erased ptr to an allocated request message

  • response_msg[in] type-erased ptr to an allocated response message

  • callback[in] function pointer to a callback function with request_id

Returns:

RCL_RET_OK if add-operation was successful

Returns:

RCL_RET_INVALID_ARGUMENT if any parameter is a null pointer

Returns:

RCL_RET_ERROR if any other error occured