iceoryx_posh 2.0.8
Loading...
Searching...
No Matches
iox::popo::RequestHeader Class Reference
Inheritance diagram for iox::popo::RequestHeader:
Collaboration diagram for iox::popo::RequestHeader:

Public Member Functions

 RequestHeader (const cxx::UniqueId &uniqueClientQueueId, const uint32_t lastKnownClientQueueIndex) noexcept
 Constructs and initializes a RpcBaseHeader.
 RequestHeader (const RequestHeader &other)=delete
RequestHeaderoperator= (const RequestHeader &)=delete
 RequestHeader (RequestHeader &&rhs) noexcept=default
RequestHeaderoperator= (RequestHeader &&rhs) noexcept=default
void setSequenceId (const int64_t sequenceId) noexcept
 Sets the sequence ID which is used to match a response to a request.
Public Member Functions inherited from iox::popo::RpcBaseHeader
 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.
void * getUserPayload () noexcept
 Get the pointer to the user-payload.
const void * getUserPayload () const noexcept
 Get the const pointer to the user-payload.

Static Public Member Functions

static RequestHeaderfromPayload (void *const payload) noexcept
static const RequestHeaderfromPayload (const void *const payload) noexcept

Additional Inherited Members

Static Public Attributes inherited from iox::popo::RpcBaseHeader
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 inherited from iox::popo::RpcBaseHeader
uint8_t m_rpcHeaderVersion {RPC_HEADER_VERSION}
uint32_t m_lastKnownClientQueueIndex {UNKNOWN_CLIENT_QUEUE_INDEX}
cxx::UniqueId m_uniqueClientQueueId
int64_t m_sequenceId {0}

Constructor & Destructor Documentation

◆ RequestHeader()

iox::popo::RequestHeader::RequestHeader ( const cxx::UniqueId & uniqueClientQueueId,
const uint32_t lastKnownClientQueueIndex )
explicitnoexcept

Constructs and initializes a RpcBaseHeader.

Parameters
[in]uniqueClientQueueIdis the cxx::UniqueId of the client queue to which the response shall be delivered
[in]lastKnownClientQueueIndexis the last know index of the client queue in the ChunkDistributor for fast lookup

Member Function Documentation

◆ setSequenceId()

void iox::popo::RequestHeader::setSequenceId ( const int64_t sequenceId)
noexcept

Sets the sequence ID which is used to match a response to a request.

Parameters
[in]sequenceIdis a consecutive number set by the user
Note
The user has to set this manually if multiple requests are sent before a response is read since a server might drop a requests or process the requests out of order and therefore the responses might also be out of order

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