Define rmw_serialized_message_fini

Define Documentation

rmw_serialized_message_fini(serialized_message)

Initialize a serialized message, zero initializing its contents.

Given serialized message must have been zero initialized.

Finalize a serialized message. /** Given serialized message must have been initialized with rmw_serialized_message_init().

Remark

If serialized message is zero initialized, then RMW_RET_INVALID_ARGUMENT is returned.

Parameters:
  • serialized_message[inout] a pointer to the serialized message to initialize

  • message_capacity[in] the size of the memory to allocate

  • allocator[in] the allocator to use for the memory allocation

  • serialized_message[in] pointer to the serialized message to be cleaned up

Returns:

RMW_RET_OK if successful, or

Returns:

RMW_RET_INVALID_ARGUMENT if any arguments are invalid, or

Returns:

‘RMW_RET_BAD_ALLOC if no memory could be allocated correctly, or \return RMW_RET_ERROR` if an unexpected error occurs */ #define rmw_serialized_message_init(serialized_message, message_capacity, allocator) \

Returns:

RMW_RET_OK if successful, or

Returns:

RMW_RET_INVALID_ARGUMENT if serialized_message is invalid, or

Returns:

RMW_RET_ERROR if an unexpected error occurs