Define rmw_serialized_message_init

Define Documentation

rmw_serialized_message_init(serialized_message, message_capacity, allocator)

Initialize a serialized message, zero initializing its contents.

Given serialized message must have been zero initialized.

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

Returns:

RMW_RET_OK if successful, or

Returns:

RMW_RET_INVALID_ARGUMENT if any arguments are invalid, or

Returns:

‘RMW_RET_BAD_ALLOCif no memory could be allocated correctly, or \returnRMW_RET_ERROR` if an unexpected error occurs