Function eprosima::fastrtps::rtps::CDRMessage::initCDRMsg

Function Documentation

inline bool eprosima::fastrtps::rtps::CDRMessage::initCDRMsg(CDRMessage_t *msg, uint32_t data_size = RTPSMESSAGE_COMMON_DATA_PAYLOAD_SIZE)

Initialize given CDR message with default size. It frees the memory already allocated and reserves new one.

Parameters:
  • msg[inout] Pointer to the message to initialize.

  • data_size – Size of the data the message is suppose to carry

Returns:

True if correct.