Function rcl_event_set_callback
Defined in File event.h
Function Documentation
-
rcl_ret_t rcl_event_set_callback(const rcl_event_t *event, rcl_event_callback_t callback, const void *user_data)
Set the callback function for the event.
This API sets the callback function to be called whenever the event is notified about a new instance of the event.
Attribute
Adherence
Allocates Memory
No
Thread-Safe
Yes
Uses Atomics
Maybe [1]
Lock-Free
Maybe [1]
See also
rmw_event_set_callback for more details about this function.
- Parameters:
event – [in] The event on which to set the callback
callback – [in] The callback to be called when new events occur, may be NULL
user_data – [in] Given to the callback when called later, may be NULL
- Returns:
RCL_RET_OK
if callback was set to the listener, or- Returns:
RCL_RET_INVALID_ARGUMENT
ifevent
is NULL, or- Returns:
RCL_RET_UNSUPPORTED
if the API is not implemented in the dds implementation