Function rcl_service_set_on_new_request_callback

Function Documentation

rcl_ret_t rcl_service_set_on_new_request_callback(const rcl_service_t *service, rcl_event_callback_t callback, const void *user_data)

Set the on new request callback function for the service.

This API sets the callback function to be called whenever the service is notified about a new request.

Attribute

Adherence

Allocates Memory

No

Thread-Safe

Yes

Uses Atomics

Maybe [1]

Lock-Free

Maybe [1]

[1] rmw implementation defined

See also

rmw_service_set_on_new_request_callback for details about this function.

Parameters:
  • service[in] The service on which to set the callback

  • callback[in] The callback to be called when new requests arrive, 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 if service is NULL, or

Returns:

RCL_RET_UNSUPPORTED if the API is not implemented in the dds implementation