C12Adapter Opensource C++ Interface
MLogFile::PacketHeader Struct Reference

Packet header structure. More...

Public Member Functions

 PacketHeader ()
 Default constructor that initializes fields to zeros.
 
 PacketHeader (unsigned length, unsigned code)
 Constructor that initializes the header with the length, code, and timestamp gotten from the system tick clock. More...
 
unsigned GetPacketBodyLength () const
 Get the length of the packet body.
 

Public Attributes

Muint32 m_length
 Total number of bytes in the packet, header and message included.
 
Muint32 m_timeStamp
 Time stamp of the message in milliseconds.
 
Muint16 m_code
 Message code, as defined by MMonitor::MessageType, but stored in two bytes.
 

Detailed Description

Packet header structure.

The body of the packet has dummy size, and the body follows the header.

Constructor & Destructor Documentation

MLogFile::PacketHeader::PacketHeader ( unsigned  length,
unsigned  code 
)
inline

Constructor that initializes the header with the length, code, and timestamp gotten from the system tick clock.

Precondition
The code fits into a short word, there is a debug check.