Function rclc_executor_add_subscription
Defined in File executor.h
Function Documentation
- 
rcl_ret_t rclc_executor_add_subscription(rclc_executor_t *executor, rcl_subscription_t *subscription, void *msg, rclc_subscription_callback_t callback, rclc_executor_handle_invocation_t invocation)
 Adds a subscription to an executor.
An error is returned, if rclc_executor_t.handles array is full.
The total number_of_subscriptions 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
subscription – [in] pointer to an allocated subscription
msg – [in] pointer to an allocated message
callback – [in] function pointer to a callback
invocation – [in] invocation type for the callback (ALWAYS or only ON_NEW_DATA)
- Returns:
 RCL_RET_OKif add-operation was successful- Returns:
 RCL_RET_INVALID_ARGUMENTif any parameter is a null pointer- Returns:
 RCL_RET_ERRORif any other error occured