Public Member Functions | Public Attributes | List of all members
MessageLocation Class Reference

Stores the location of a message in a buffer using a start position and a size. More...

#include <messagelocation.h>

Public Member Functions

bool isValid () const
 Returns whether the stored message information describes a valid message. More...
 
 MessageLocation (int start=-1, int size=0, int incompletePos=-1, int incompleteSize=0)
 Constructor, initializes by default to an invalid message. More...
 

Public Attributes

int m_incompletePos
 
int m_incompleteSize
 
int m_size
 The size of the message, when less than 0 it indicates the expected message size. More...
 
int m_startPos
 The offset of the first byte of the message or -1 if no message. More...
 

Detailed Description

Stores the location of a message in a buffer using a start position and a size.

Definition at line 70 of file messagelocation.h.

Constructor & Destructor Documentation

◆ MessageLocation()

MessageLocation::MessageLocation ( int  start = -1,
int  size = 0,
int  incompletePos = -1,
int  incompleteSize = 0 
)
inline

Constructor, initializes by default to an invalid message.

Parameters
startThe offset of the first byte of the message
sizeThe size of the message
incompletePosThe offset of the first byte of an incomplete but potentially eventually valid message
incompleteSizeThe expected size of the message at incompletePos, if that is not -1
See also
isValid()
m_startPos
m_size
IProtocolHandler::findMessage

Definition at line 98 of file messagelocation.h.

Member Function Documentation

◆ isValid()

bool MessageLocation::isValid ( ) const
inline

Returns whether the stored message information describes a valid message.

Definition at line 107 of file messagelocation.h.

Member Data Documentation

◆ m_incompletePos

int MessageLocation::m_incompletePos

The offset of the first incomplete potentially eventually valid message that has been skipped to reach the first valid and complete message at m_startPos. If no valid complete message has been found (m_startPos == -1), m_incompletePos still contains the offset of the first incomplete message. invariant: m_incompletePos == -1 || m_startPos == -1 || m_incompletePos < m_startPos

Definition at line 82 of file messagelocation.h.

◆ m_incompleteSize

int MessageLocation::m_incompleteSize

The expected size of the first incomplete potentially eventually valid message that has been skipped to reach the first valid and complete message at m_startPos. If a valid complete message has been found at a non-0 start position and m_incompletePos is not -1, m_incompleteSize will contain the expected size of the incomplete message.

Definition at line 89 of file messagelocation.h.

◆ m_size

int MessageLocation::m_size

The size of the message, when less than 0 it indicates the expected message size.

Definition at line 74 of file messagelocation.h.

◆ m_startPos

int MessageLocation::m_startPos

The offset of the first byte of the message or -1 if no message.

Definition at line 73 of file messagelocation.h.


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


xsens_mti_driver
Author(s):
autogenerated on Sun Sep 3 2023 02:43:21