Function rcl_return_loaned_message_from_publisher
Defined in File publisher.h
Function Documentation
-
rcl_ret_t rcl_return_loaned_message_from_publisher(const rcl_publisher_t *publisher, void *loaned_message)
Return a loaned message previously borrowed from a publisher.
The ownership of the passed in ros message will be transferred back to the middleware. The middleware might deallocate and destroy the message so that the pointer is no longer guaranteed to be valid after that call.
Attribute
Adherence
Allocates Memory
No
Thread-Safe
No
Uses Atomics
No
Lock-Free
Yes
- Parameters:
publisher – [in] Publisher to which the loaned message is associated.
loaned_message – [in] Loaned message to be deallocated and destroyed.
- Returns:
RCL_RET_OK if successful, or
- Returns:
RCL_RET_INVALID_ARGUMENT if an argument is null, or
- Returns:
RCL_RET_UNSUPPORTED if the middleware does not support that feature, or
- Returns:
RCL_RET_PUBLISHER_INVALID if the publisher is invalid, or
- Returns:
RCL_RET_ERROR if an unexpected error occurs and no message can be initialized.