Structure SerializedPayload_t.
More...
#include <SerializedPayload.hpp>
|
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.
|
|
IPayloadPool * | payload_owner = nullptr |
| Pool that created the payload.
|
|
|
static constexpr size_t | representation_header_size = 4u |
| Size in bytes of the representation header as specified in the RTPS 2.3 specification chapter 10.
|
|
◆ SerializedPayload_t() [1/4]
◆ SerializedPayload_t() [2/4]
- Parameters
-
len | Maximum size of the payload |
◆ SerializedPayload_t() [3/4]
◆ SerializedPayload_t() [4/4]
◆ ~SerializedPayload_t()
Destructor It is expected to release the payload if the payload owner is not nullptr before destruction.
◆ copy()
Copy another structure (including allocating new space for the data).
- Parameters
-
[in] | serData | Pointer to the structure to copy |
| with_limit | if true, the function will fail when providing a payload too big |
- Returns
- True if correct
◆ empty()
Empty the payload.
- Precondition
- payload_owner must be nullptr
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ operator==()
◆ reserve()
void reserve |
( |
uint32_t | new_size | ) |
|
◆ reserve_fragmented()
Allocate new space for fragmented data.
- Parameters
-
[in] | serData | Pointer to the structure to copy |
- Returns
- True if correct
◆ data
◆ encapsulation
Encapsulation of the data as suggested in the RTPS 2.1 specification chapter 10.
◆ length
Actual length of the data.
◆ max_size
Maximum size of the payload.
◆ payload_owner
Pool that created the payload.
◆ pos
◆ representation_header_size
size_t representation_header_size = 4u |
|
staticconstexpr |
Size in bytes of the representation header as specified in the RTPS 2.3 specification chapter 10.
The documentation for this struct was generated from the following file: