iceoryx_posh 2.0.5
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Protected Attributes | Friends | List of all members
iox::popo::RpcBaseHeader Class Reference
Inheritance diagram for iox::popo::RpcBaseHeader:
Inheritance graph
[legend]

Public Member Functions

 RpcBaseHeader (const cxx::UniqueId &uniqueClientQueueId, const uint32_t lastKnownClientQueueIndex, const int64_t sequenceId, const uint8_t rpcHeaderVersion) noexcept
 Constructs and initializes a RpcBaseHeader.
 
 RpcBaseHeader (const RpcBaseHeader &other)=delete
 
RpcBaseHeaderoperator= (const RpcBaseHeader &)=delete
 
 RpcBaseHeader (RpcBaseHeader &&rhs) noexcept=default
 
RpcBaseHeaderoperator= (RpcBaseHeader &&rhs) noexcept=default
 
uint8_t getRpcHeaderVersion () const noexcept
 The RpcBaseHeader version is used to detect incompatibilities for record&replay functionality.
 
int64_t getSequenceId () const noexcept
 
mepoo::ChunkHeadergetChunkHeader () noexcept
 Get the pointer to the ChunkHeader.
 
const mepoo::ChunkHeadergetChunkHeader () const noexcept
 Get the const pointer to the ChunkHeader.
 
voidgetUserPayload () noexcept
 Get the pointer to the user-payload.
 
const voidgetUserPayload () const noexcept
 Get the const pointer to the user-payload.
 

Static Public Attributes

static constexpr uint8_t RPC_HEADER_VERSION {1U}
 From the 2.0 release onward, this must be incremented for each incompatible change, e.g.
 
static constexpr uint32_t UNKNOWN_CLIENT_QUEUE_INDEX {std::numeric_limits<uint32_t>::max()}
 
static constexpr int64_t START_SEQUENCE_ID {0}
 

Protected Attributes

uint8_t m_rpcHeaderVersion {RPC_HEADER_VERSION}
 
uint32_t m_lastKnownClientQueueIndex {UNKNOWN_CLIENT_QUEUE_INDEX}
 
cxx::UniqueId m_uniqueClientQueueId
 
int64_t m_sequenceId {0}
 

Friends

class ServerPortUser
 

Constructor & Destructor Documentation

◆ RpcBaseHeader()

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

Constructs and initializes a RpcBaseHeader.

Parameters
[in]uniqueClientQueueIdis the cxx::UniqueId of the client queue where the response shall be delivered
[in]lastKnownClientQueueIndexis the last know index of the client queue in the ChunkDistributor for fast lookup
[in]sequenceIdis a custom ID to map a response to a request
[in]rpcHeaderVersionis set by RequestHeader/ResponseHeader and should be RPC_HEADER_VERSION

Member Function Documentation

◆ getChunkHeader() [1/2]

const mepoo::ChunkHeader * iox::popo::RpcBaseHeader::getChunkHeader ( ) const
noexcept

Get the const pointer to the ChunkHeader.

Returns
the const pointer to the ChunkHeader

◆ getChunkHeader() [2/2]

mepoo::ChunkHeader * iox::popo::RpcBaseHeader::getChunkHeader ( )
noexcept

Get the pointer to the ChunkHeader.

Returns
the pointer to the ChunkHeader

◆ getRpcHeaderVersion()

uint8_t iox::popo::RpcBaseHeader::getRpcHeaderVersion ( ) const
noexcept

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

Returns
the RpcBaseHeader version

◆ getSequenceId()

int64_t iox::popo::RpcBaseHeader::getSequenceId ( ) const
noexcept

@briet Obtains the sequence ID of the RPC message

Returns
the sequenceId of the RPC message

◆ getUserPayload() [1/2]

const void * iox::popo::RpcBaseHeader::getUserPayload ( ) const
noexcept

Get the const pointer to the user-payload.

Returns
the const pointer to the user-payload

◆ getUserPayload() [2/2]

void * iox::popo::RpcBaseHeader::getUserPayload ( )
noexcept

Get the pointer to the user-payload.

Returns
the pointer to the user-payload

Member Data Documentation

◆ RPC_HEADER_VERSION

constexpr uint8_t iox::popo::RpcBaseHeader::RPC_HEADER_VERSION {1U}
staticconstexpr

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!

The documentation for this class was generated from the following file: