Function rclc_executor_add_service
Defined in File executor.h
Function Documentation
-
rcl_ret_t rclc_executor_add_service(rclc_executor_t *executor, rcl_service_t *service, void *request_msg, void *response_msg, rclc_service_callback_t callback)
Adds a service to an executor.
An error is returned if rclc_executor_t.handles array is full.
The total number_of_services field of rclc_executor_t.info is incremented by one.
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
- 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