Public Member Functions | Private Attributes | List of all members
SimpleProtocolManager Class Reference

A very basic protocol manager. More...

#include <simpleprotocolmanager.h>

Inheritance diagram for SimpleProtocolManager:
Inheritance graph
[legend]

Public Member Functions

XsMessage convertToMessage (XsProtocolType &type, MessageLocation &location, const XsByteArray &raw) override
 Converts raw data using location into a XsMessage object. More...
 
MessageLocation findMessage (XsProtocolType &type, const XsByteArray &raw) override
 Will let all supported protocols attempt finding a raw message in the given raw data. More...
 
bool validateMessage (XsMessage const &msg) const override
 Performs a sanity check on the given message. More...
 
- Public Member Functions inherited from IProtocolManager
virtual ~IProtocolManager ()
 Destructor. More...
 

Private Attributes

ProtocolHandler m_protocolHandler
 Standard protocol handler; used for finding messages. More...
 

Detailed Description

A very basic protocol manager.

This protocol manager supports only the xbus protocol

Definition at line 74 of file simpleprotocolmanager.h.

Member Function Documentation

◆ convertToMessage()

XsMessage SimpleProtocolManager::convertToMessage ( XsProtocolType type,
MessageLocation location,
const XsByteArray raw 
)
inlineoverridevirtual

Converts raw data using location into a XsMessage object.

Parameters
typeThe protocol type to use.
locationThe location of a message to convert from raw data.
rawThe raw byte stream.
Returns
A XsMessage object that was converted from raw byte stream.

Implements IProtocolManager.

Definition at line 86 of file simpleprotocolmanager.h.

◆ findMessage()

MessageLocation SimpleProtocolManager::findMessage ( XsProtocolType type,
const XsByteArray raw 
)
inlineoverridevirtual

Will let all supported protocols attempt finding a raw message in the given raw data.

Parameters
typeThe protocol type to us
rawThe input raw byte array in which to look for a message
Returns
A MessageLocation object describing the best possible found message
See also
MessageLocation

Implements IProtocolManager.

Definition at line 79 of file simpleprotocolmanager.h.

◆ validateMessage()

bool SimpleProtocolManager::validateMessage ( XsMessage const &  msg) const
inlineoverridevirtual

Performs a sanity check on the given message.

Parameters
msgThe message to check
Returns
true if the message passes the protocol managers sanity checks

Implements IProtocolManager.

Definition at line 94 of file simpleprotocolmanager.h.

Member Data Documentation

◆ m_protocolHandler

ProtocolHandler SimpleProtocolManager::m_protocolHandler
private

Standard protocol handler; used for finding messages.

Definition at line 99 of file simpleprotocolmanager.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:22