Skip to content

iox::mepoo::ChunkHeader🔗

Public Types🔗

Name
using uint32_t UserPayloadOffset_t

Public Functions🔗

Name
ChunkHeader(const uint32_t chunkSize, const ChunkSettings & chunkSettings)
constructs and initializes a ChunkHeader
ChunkHeader(const ChunkHeader & )
ChunkHeader(ChunkHeader && )
ChunkHeader & operator=(const ChunkHeader & )
ChunkHeader & operator=(ChunkHeader && )
uint8_t chunkHeaderVersion() const
The ChunkHeader version is used to detect incompatibilities for record&replay functionality.
uint16_t userHeaderId() const
The id of the user-header used by the chunk; if no user-header is used, this is set to NO_USER_HEADER.
void * userHeader()
Get the pointer to the user-header.
const void * userHeader() const
Get the const pointer to the user-header.
void * userPayload()
Get a pointer to the user-payload carried by the chunk.
const void * userPayload() const
Get a const pointer to the user-payload carried by the chunk.
uint32_t usedSizeOfChunk() const
Calculates the used size of the chunk with the ChunkHeader, user-heander and user-payload.
uint32_t chunkSize() const
The size of the whole chunk, including the header.
uint32_t userHeaderSize() const
The size of the chunk occupied by the user-header.
uint32_t userPayloadSize() const
The size of the chunk occupied by the user-payload.
uint32_t userPayloadAlignment() const
The alignment of the chunk occupied by the user-payload.
popo::UniquePortId originId() const
The unique identifier of the publisher the chunk was sent from.
uint64_t sequenceNumber() const
A serial number for the sent chunks.
ChunkHeader * fromUserPayload(void *const userPayload)
Get a pointer to the [ChunkHeader](/v2.0.1/API-reference/posh/Classes/structiox_1_1mepoo_1_1ChunkHeader/) associated to the user-payload of the chunk.
const ChunkHeader * fromUserPayload(const void *const userPayload)
Get a const pointer to the [ChunkHeader](/v2.0.1/API-reference/posh/Classes/structiox_1_1mepoo_1_1ChunkHeader/) associated to the user-payload of the chunk.
ChunkHeader * fromUserHeader(void *const userHeader)
Get a pointer to the [ChunkHeader](/v2.0.1/API-reference/posh/Classes/structiox_1_1mepoo_1_1ChunkHeader/) associated to the user-header of the chunk.
const ChunkHeader * fromUserHeader(const void *const userHeader)
Get a const pointer to the [ChunkHeader](/v2.0.1/API-reference/posh/Classes/structiox_1_1mepoo_1_1ChunkHeader/) associated to the user-header of the chunk.

Public Attributes🔗

Name
constexpr uint8_t CHUNK_HEADER_VERSION
From the 1.0 release onward, this must be incremented for each incompatible change, e.g.
constexpr uint16_t NO_USER_HEADER
User-Header id for no user-header.
constexpr uint16_t UNKNOWN_USER_HEADER
User-Header id for an unknown user-header.

Friends🔗

Name
class popo::ChunkSender

Public Types Documentation🔗

using UserPayloadOffset_t🔗

using iox::mepoo::ChunkHeader::UserPayloadOffset_t =  uint32_t;

Public Functions Documentation🔗

function ChunkHeader🔗

ChunkHeader(
    const uint32_t chunkSize,
    const ChunkSettings & chunkSettings
)

constructs and initializes a ChunkHeader

Parameters:

  • chunkSize is the size of the chunk the ChunkHeader is constructed
  • chunkSettings are the settings like user-payload size and user-header alignment

function ChunkHeader🔗

ChunkHeader(
    const ChunkHeader & 
)

function ChunkHeader🔗

ChunkHeader(
    ChunkHeader && 
)

function operator=🔗

ChunkHeader & operator=(
    const ChunkHeader & 
)

function operator=🔗

ChunkHeader & operator=(
    ChunkHeader && 
)

function chunkHeaderVersion🔗

uint8_t chunkHeaderVersion() const

The ChunkHeader version is used to detect incompatibilities for record&replay functionality.

Return: the ChunkHeader version

function userHeaderId🔗

uint16_t userHeaderId() const

The id of the user-header used by the chunk; if no user-header is used, this is set to NO_USER_HEADER.

Return: the user-header id of the chunk

function userHeader🔗

void * userHeader()

Get the pointer to the user-header.

Return: the pointer to the user-header

function userHeader🔗

const void * userHeader() const

Get the const pointer to the user-header.

Return: the const pointer to the user-header

function userPayload🔗

void * userPayload()

Get a pointer to the user-payload carried by the chunk.

Return: the pointer to the user-payload

function userPayload🔗

const void * userPayload() const

Get a const pointer to the user-payload carried by the chunk.

Return: the const pointer to the user-payload

function usedSizeOfChunk🔗

uint32_t usedSizeOfChunk() const

Calculates the used size of the chunk with the ChunkHeader, user-heander and user-payload.

Return: the used size of the chunk

function chunkSize🔗

uint32_t chunkSize() const

The size of the whole chunk, including the header.

Return: the chunk size

function userHeaderSize🔗

uint32_t userHeaderSize() const

The size of the chunk occupied by the user-header.

Return: the user-header size

function userPayloadSize🔗

uint32_t userPayloadSize() const

The size of the chunk occupied by the user-payload.

Return: the user-payload size

function userPayloadAlignment🔗

uint32_t userPayloadAlignment() const

The alignment of the chunk occupied by the user-payload.

Return: the user-payload alignment

function originId🔗

popo::UniquePortId originId() const

The unique identifier of the publisher the chunk was sent from.

Return: the id of the publisher the chunk was sent from

function sequenceNumber🔗

uint64_t sequenceNumber() const

A serial number for the sent chunks.

the serquence number of the chunk

function fromUserPayload🔗

static ChunkHeader * fromUserPayload(
    void *const userPayload
)

Get a pointer to the [ChunkHeader](/v2.0.1/API-reference/posh/Classes/structiox_1_1mepoo_1_1ChunkHeader/) associated to the user-payload of the chunk.

Parameters:

  • userPayload is the pointer to the user-payload of the chunk

Return: the pointer to the [ChunkHeader](/v2.0.1/API-reference/posh/Classes/structiox_1_1mepoo_1_1ChunkHeader/) or a nullptr if userPayload is a nullptr

function fromUserPayload🔗

static const ChunkHeader * fromUserPayload(
    const void *const userPayload
)

Get a const pointer to the [ChunkHeader](/v2.0.1/API-reference/posh/Classes/structiox_1_1mepoo_1_1ChunkHeader/) associated to the user-payload of the chunk.

Parameters:

  • userPayload is the const pointer to the user-payload of the chunk

Return: the const pointer to the [ChunkHeader](/v2.0.1/API-reference/posh/Classes/structiox_1_1mepoo_1_1ChunkHeader/) or a nullptr if userPayload is a nullptr

function fromUserHeader🔗

static ChunkHeader * fromUserHeader(
    void *const userHeader
)

Get a pointer to the [ChunkHeader](/v2.0.1/API-reference/posh/Classes/structiox_1_1mepoo_1_1ChunkHeader/) associated to the user-header of the chunk.

Parameters:

  • userHeader is the pointer to the user-header of the chunk

Return: the pointer to the [ChunkHeader](/v2.0.1/API-reference/posh/Classes/structiox_1_1mepoo_1_1ChunkHeader/) or a nullptr if userHeader is a nullptr

function fromUserHeader🔗

static const ChunkHeader * fromUserHeader(
    const void *const userHeader
)

Get a const pointer to the [ChunkHeader](/v2.0.1/API-reference/posh/Classes/structiox_1_1mepoo_1_1ChunkHeader/) associated to the user-header of the chunk.

Parameters:

  • userHeader is the const pointer to the user-header of the chunk

Return: the const pointer to the [ChunkHeader](/v2.0.1/API-reference/posh/Classes/structiox_1_1mepoo_1_1ChunkHeader/) or a nullptr if userPayload is a nullptr

Public Attributes Documentation🔗

variable CHUNK_HEADER_VERSION🔗

static constexpr uint8_t CHUNK_HEADER_VERSION {1U};

From the 1.0 release onward, this must be incremented for each incompatible change, e.g.

  • data width of members changes
  • members are rearranged
  • semantic meaning of a member changes

variable NO_USER_HEADER🔗

static constexpr uint16_t NO_USER_HEADER {0x0000};

User-Header id for no user-header.

variable UNKNOWN_USER_HEADER🔗

static constexpr uint16_t UNKNOWN_USER_HEADER {0xFFFF};

User-Header id for an unknown user-header.

Friends🔗

friend popo::ChunkSender🔗

friend class popo::ChunkSender(
    popo::ChunkSender 
);

Updated on 2 April 2022 at 16:37:47 CEST