Skip to content

iox::popo::RpcBaseHeader🔗

Inherited by iox::popo::RequestHeader, iox::popo::ResponseHeader

Public Functions🔗

Name
RpcBaseHeader(const cxx::UniqueId & uniqueClientQueueId, const uint32_t lastKnownClientQueueIndex, const int64_t sequenceId, const uint8_t rpcHeaderVersion)
Constructs and initializes a RpcBaseHeader.
RpcBaseHeader(const RpcBaseHeader & other)
RpcBaseHeader & operator=(const RpcBaseHeader & )
RpcBaseHeader(RpcBaseHeader && rhs) =default
RpcBaseHeader & operator=(RpcBaseHeader && rhs) =default
~RpcBaseHeader() =default
uint8_t getRpcHeaderVersion() const
The RpcBaseHeader version is used to detect incompatibilities for record&replay functionality.
int64_t getSequenceId() const
mepoo::ChunkHeader * getChunkHeader()
Get the pointer to the ChunkHeader.
const mepoo::ChunkHeader * getChunkHeader() const
Get the const pointer to the ChunkHeader.
void * getUserPayload()
Get the pointer to the user-payload.
const void * getUserPayload() const
Get the const pointer to the user-payload.

Public Attributes🔗

Name
constexpr uint8_t RPC_HEADER_VERSION
From the 2.0 release onward, this must be incremented for each incompatible change, e.g.
constexpr uint32_t UNKNOWN_CLIENT_QUEUE_INDEX
constexpr int64_t START_SEQUENCE_ID

Protected Attributes🔗

Name
uint8_t m_rpcHeaderVersion
uint32_t m_lastKnownClientQueueIndex
cxx::UniqueId m_uniqueClientQueueId
int64_t m_sequenceId

Friends🔗

Name
class ServerPortUser

Public Functions Documentation🔗

function RpcBaseHeader🔗

explicit RpcBaseHeader(
    const cxx::UniqueId & uniqueClientQueueId,
    const uint32_t lastKnownClientQueueIndex,
    const int64_t sequenceId,
    const uint8_t rpcHeaderVersion
)

Constructs and initializes a RpcBaseHeader.

Parameters:

  • uniqueClientQueueId is the cxx::UniqueId of the client queue where the response shall be delivered
  • lastKnownClientQueueIndex is the last know index of the client queue in the ChunkDistributor for fast lookup
  • sequenceId is a custom ID to map a response to a request
  • rpcHeaderVersion is set by RequestHeader/ResponseHeader and should be RPC_HEADER_VERSION

function RpcBaseHeader🔗

RpcBaseHeader(
    const RpcBaseHeader & other
)

function operator=🔗

RpcBaseHeader & operator=(
    const RpcBaseHeader & 
)

function RpcBaseHeader🔗

RpcBaseHeader(
    RpcBaseHeader && rhs
) =default

function operator=🔗

RpcBaseHeader & operator=(
    RpcBaseHeader && rhs
) =default

function ~RpcBaseHeader🔗

~RpcBaseHeader() =default

function getRpcHeaderVersion🔗

uint8_t getRpcHeaderVersion() const

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

Return: the RpcBaseHeader version

function getSequenceId🔗

int64_t getSequenceId() const

Return: the sequenceId of the RPC message

@briet Obtains the sequence ID of the RPC message

function getChunkHeader🔗

mepoo::ChunkHeader * getChunkHeader()

Get the pointer to the ChunkHeader.

Return: the pointer to the ChunkHeader

function getChunkHeader🔗

const mepoo::ChunkHeader * getChunkHeader() const

Get the const pointer to the ChunkHeader.

Return: the const pointer to the ChunkHeader

function getUserPayload🔗

void * getUserPayload()

Get the pointer to the user-payload.

Return: the pointer to the user-payload

function getUserPayload🔗

const void * getUserPayload() const

Get the const pointer to the user-payload.

Return: the const pointer to the user-payload

Public Attributes Documentation🔗

variable RPC_HEADER_VERSION🔗

static constexpr uint8_t RPC_HEADER_VERSION {1U};

From the 2.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 in any of RpcBaseHeader, RequestHeader or ResponseHeader!

variable UNKNOWN_CLIENT_QUEUE_INDEX🔗

static constexpr uint32_t UNKNOWN_CLIENT_QUEUE_INDEX {std::numeric_limits<uint32_t>::max()};

variable START_SEQUENCE_ID🔗

static constexpr int64_t START_SEQUENCE_ID {0};

Protected Attributes Documentation🔗

variable m_rpcHeaderVersion🔗

uint8_t m_rpcHeaderVersion {[RPC_HEADER_VERSION](/v2.0.1/API-reference/posh/Classes/classiox_1_1popo_1_1RpcBaseHeader/#variable-rpc_header_version)};

variable m_lastKnownClientQueueIndex🔗

uint32_t m_lastKnownClientQueueIndex {UNKNOWN_CLIENT_QUEUE_INDEX};

variable m_uniqueClientQueueId🔗

cxx::UniqueId m_uniqueClientQueueId;

variable m_sequenceId🔗

int64_t m_sequenceId {0};

Friends🔗

friend ServerPortUser🔗

friend class ServerPortUser(
    ServerPortUser 
);

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