Function rcl_return_loaned_message_from_subscription

Function Documentation

rcl_ret_t rcl_return_loaned_message_from_subscription(const rcl_subscription_t *subscription, void *loaned_message)

Return a loaned message from a topic using a rcl subscription.

If a loaned message was previously obtained from the middleware with a call to

Attribute

Adherence

Allocates Memory

No

Thread-Safe

No

Uses Atomics

No

Lock-Free

Yes

See also

rcl_take_loaned_message, this message has to be returned to indicate to the middleware that the user no longer needs that memory. The user must not delete the message.

Parameters:
  • subscription[in] the handle to the subscription from which to take

  • loaned_message[in] a pointer to the loaned messages.

Returns:

RCL_RET_OK if the message was published, or

Returns:

RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or

Returns:

RCL_RET_SUBSCRIPTION_INVALID if the subscription is invalid, or

Returns:

RCL_RET_UNSUPPORTED if the middleware does not support that feature, or

Returns:

RCL_RET_ERROR if an unspecified error occurs.