14.2.2.18.2. SerializedPayload_t

struct eprosima::fastrtps::rtps::SerializedPayload_t

Structure SerializedPayload_t.

Public Functions

SerializedPayload_t()

Default constructor.

SerializedPayload_t(uint32_t len)

Parameters
  • len: Maximum size of the payload

bool copy(const SerializedPayload_t *serData, bool with_limit = true)

Copy another structure (including allocating new space for the data.)

Return

True if correct

Parameters
  • [in] serData: Pointer to the structure to copy

  • with_limit: if true, the function will fail when providing a payload too big

bool reserve_fragmented(SerializedPayload_t *serData)

Allocate new space for fragmented data.

Return

True if correct

Parameters
  • [in] serData: Pointer to the structure to copy

void empty()

Empty the payload.

Public Members

uint16_t encapsulation

Encapsulation of the data as suggested in the RTPS 2.1 specification chapter 10.

uint32_t length

Actual length of the data.

octet *data

Pointer to the data.

uint32_t max_size

Maximum size of the payload.

uint32_t pos

Position when reading.