Main MRPT website > C++ reference for MRPT 1.5.9
Functions
protocolhandler.cpp File Reference
#include "protocolhandler.h"
#include <xsens/xsmessage.h>
#include <xsens/xsresultvalue.h>
#include <iomanip>
Include dependency graph for protocolhandler.cpp:

Go to the source code of this file.

Functions

int expectedMessageSize (const unsigned char *buffer, int sz)
 Compute the expected message size given a possibly incomplete message. More...
 

Function Documentation

◆ expectedMessageSize()

int expectedMessageSize ( const unsigned char *  buffer,
int  sz 
)

Compute the expected message size given a possibly incomplete message.

When analyzing a message with incomplete size information, the function will return the minimum size of the message given the information that is available

Definition at line 36 of file protocolhandler.cpp.

References XsMessageHeader::m_datlen, XsMessageHeader::LengthData::m_extended, XsMessageHeader::LengthData::ExtendedLength::ExtendedParts::m_high, XsMessageHeader::m_length, XsMessageHeader::LengthData::ExtendedLength::m_length, XsMessageHeader::LengthData::ExtendedLength::ExtendedParts::m_low, XS_EXTLENCODE, XS_LEN_MSGEXTHEADERCS, and XS_LEN_MSGHEADERCS.

Referenced by ProtocolHandler::findMessage().




Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020