Class CConnection::CMessage#

Nested Relationships#

This class is a nested type of Class CConnection.

Inheritance Relationships#

Base Type#

Class Documentation#

class CMessage : public CAccessorRxPacket#

Message context structure used when receiving data.

Public Functions

CMessage(CAccessorRxPacket &&rPacket)#

Constructor moving the packet content into the message.

Parameters:

rPacket[in] Reference to the packet to assign.

~CMessage()#

Destructor accepting the packet if not previously rejected by calling Reset.

bool IsValid() const#

Returns whether the message is valid (has at least the size of the required header).

Returns:

SMsgHdr GetMsgHdr() const#

Get the message header if the data is at least the size of the header.

Returns:

The message header or an empty header.

SConnectMsg GetConnectHdr() const#

Get the connect header if the data is at least the size of the header and has type connect header.

Returns:

The connect header or an empty header.

SFragmentedMsgHdr GetFragmentedHdr() const#

Get the fragmented message header. if the data is at least the size of the header and has type fragmented header.

Returns:

The fragmented message header or an empty header.

void PrintHeader(const CConnection &rConnection) const#

Trace the protocol data (dependent on ENABLE_REPORTING setting).

Parameters:

rConnection[in] Reference to the connection class containing the connection information.