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

A class that does the message serialization. More...

#include <messageserializer.h>

Public Member Functions

void append (const uint8_t *data, XsSize size)
 Appends the data to the message. More...
 
void finalize ()
 Finalizes the message serialization. More...
 
XsSize index () const
 
 MessageSerializer (XsMessage &message, XsSize offset=0)
 Default constructor. More...
 
MessageSerializeroperator<< (const XsCanOutputConfiguration &cfg)
 Output stream operator that adds a XsCanOutputConfiguration to the stream. More...
 
MessageSerializeroperator<< (const XsCanOutputConfigurationArray &config)
 Output stream operator that adds a XsOutputConfigurationArray to the stream. More...
 
MessageSerializeroperator<< (const XsDeviceId &id)
 Output stream operator that adds a XsDeviceId to the stream. More...
 
MessageSerializeroperator<< (const XsOutputConfiguration &cfg)
 Output stream operator that adds a XsOutputConfiguration to the stream. More...
 
MessageSerializeroperator<< (const XsOutputConfigurationArray &config)
 Output stream operator that adds a XsOutputConfigurationArray to the stream. More...
 
MessageSerializeroperator<< (int16_t value)
 Output stream operator that adds a int16_t to the stream. More...
 
MessageSerializeroperator<< (int32_t value)
 Output stream operator that adds a int32_t to the stream. More...
 
MessageSerializeroperator<< (int64_t value)
 Output stream operator that adds a int64_t to the stream. More...
 
MessageSerializeroperator<< (int8_t value)
 Output stream operator that adds a int8_t to the stream. More...
 
MessageSerializeroperator<< (uint16_t value)
 Output stream operator that adds a uint16_t to the stream. More...
 
MessageSerializeroperator<< (uint32_t value)
 Output stream operator that adds a uint32_t to the stream. More...
 
MessageSerializeroperator<< (uint64_t value)
 Output stream operator that adds a uint64_t to the stream. More...
 
MessageSerializeroperator<< (uint8_t value)
 Output stream operator that adds a uint8_t to the stream. More...
 
MessageSerializeroperator<< (XsCanDataIdentifier value)
 Output stream operator that adds a XsCanDataIdentifier to the stream. More...
 
MessageSerializeroperator<< (XsCanFrameFormat value)
 Output stream operator that adds a XsCanIdLenght to the stream. More...
 
MessageSerializeroperator<< (XsDataIdentifier value)
 Output stream operator that adds a XsDataIdentifier to the stream. More...
 
virtual ~MessageSerializer ()
 Destructor. More...
 

Private Attributes

XsSize m_index
 
XsMessagem_message
 

Detailed Description

A class that does the message serialization.

Definition at line 79 of file messageserializer.h.

Constructor & Destructor Documentation

◆ MessageSerializer()

MessageSerializer::MessageSerializer ( XsMessage message,
XsSize  offset = 0 
)

Default constructor.

Definition at line 80 of file messageserializer.cpp.

◆ ~MessageSerializer()

MessageSerializer::~MessageSerializer ( )
virtual

Destructor.

Definition at line 89 of file messageserializer.cpp.

Member Function Documentation

◆ append()

void MessageSerializer::append ( const uint8_t *  data,
XsSize  size 
)

Appends the data to the message.

Parameters
dataThe value to add to the message
sizeThe size of this value

Definition at line 234 of file messageserializer.cpp.

◆ finalize()

void MessageSerializer::finalize ( )

Finalizes the message serialization.

Definition at line 242 of file messageserializer.cpp.

◆ index()

XsSize MessageSerializer::index ( ) const
inline
Returns
The current index

Definition at line 137 of file messageserializer.h.

◆ operator<<() [1/16]

MessageSerializer & MessageSerializer::operator<< ( const XsCanOutputConfiguration cfg)

Output stream operator that adds a XsCanOutputConfiguration to the stream.

Parameters
cfgThe output configuration
Returns
A reference to this object

Definition at line 224 of file messageserializer.cpp.

◆ operator<<() [2/16]

MessageSerializer & MessageSerializer::operator<< ( const XsCanOutputConfigurationArray config)

Output stream operator that adds a XsOutputConfigurationArray to the stream.

Parameters
configThe output configuration array
Returns
A reference to this object

Definition at line 210 of file messageserializer.cpp.

◆ operator<<() [3/16]

MessageSerializer & MessageSerializer::operator<< ( const XsDeviceId id)

Output stream operator that adds a XsDeviceId to the stream.

Parameters
idThe device ID
Returns
A reference to this object

Definition at line 131 of file messageserializer.cpp.

◆ operator<<() [4/16]

MessageSerializer & MessageSerializer::operator<< ( const XsOutputConfiguration cfg)

Output stream operator that adds a XsOutputConfiguration to the stream.

Parameters
cfgThe output configuration
Returns
A reference to this object

Definition at line 201 of file messageserializer.cpp.

◆ operator<<() [5/16]

MessageSerializer & MessageSerializer::operator<< ( const XsOutputConfigurationArray config)

Output stream operator that adds a XsOutputConfigurationArray to the stream.

Parameters
configThe output configuration array
Returns
A reference to this object

Definition at line 187 of file messageserializer.cpp.

◆ operator<<() [6/16]

MessageSerializer& MessageSerializer::operator<< ( int16_t  value)
inline

Output stream operator that adds a int16_t to the stream.

Parameters
valueThe value to add to the stream
Returns
A reference to this object

Definition at line 116 of file messageserializer.h.

◆ operator<<() [7/16]

MessageSerializer& MessageSerializer::operator<< ( int32_t  value)
inline

Output stream operator that adds a int32_t to the stream.

Parameters
valueThe value to add to the stream
Returns
A reference to this object

Definition at line 107 of file messageserializer.h.

◆ operator<<() [8/16]

MessageSerializer& MessageSerializer::operator<< ( int64_t  value)
inline

Output stream operator that adds a int64_t to the stream.

Parameters
valueThe value to add to the stream
Returns
A reference to this object

Definition at line 98 of file messageserializer.h.

◆ operator<<() [9/16]

MessageSerializer& MessageSerializer::operator<< ( int8_t  value)
inline

Output stream operator that adds a int8_t to the stream.

Parameters
valueThe value to add to the stream
Returns
A reference to this object

Definition at line 125 of file messageserializer.h.

◆ operator<<() [10/16]

MessageSerializer & MessageSerializer::operator<< ( uint16_t  value)

Output stream operator that adds a uint16_t to the stream.

Parameters
valueThe value to add to the stream
Returns
A reference to this object

Definition at line 154 of file messageserializer.cpp.

◆ operator<<() [11/16]

MessageSerializer & MessageSerializer::operator<< ( uint32_t  value)

Output stream operator that adds a uint32_t to the stream.

Parameters
valueThe value to add to the stream
Returns
A reference to this object

Definition at line 165 of file messageserializer.cpp.

◆ operator<<() [12/16]

MessageSerializer & MessageSerializer::operator<< ( uint64_t  value)

Output stream operator that adds a uint64_t to the stream.

Parameters
valueThe value to add to the stream
Returns
A reference to this object

Definition at line 176 of file messageserializer.cpp.

◆ operator<<() [13/16]

MessageSerializer & MessageSerializer::operator<< ( uint8_t  value)

Output stream operator that adds a uint8_t to the stream.

Parameters
valueThe value to add to the stream
Returns
A reference to this object

Definition at line 143 of file messageserializer.cpp.

◆ operator<<() [14/16]

MessageSerializer & MessageSerializer::operator<< ( XsCanDataIdentifier  id)

Output stream operator that adds a XsCanDataIdentifier to the stream.

Parameters
idThe CAN data identifier
Returns
A reference to this object

Definition at line 113 of file messageserializer.cpp.

◆ operator<<() [15/16]

MessageSerializer & MessageSerializer::operator<< ( XsCanFrameFormat  idl)

Output stream operator that adds a XsCanIdLenght to the stream.

Parameters
idlThe CAN Id length enum value
Returns
A reference to this object

Definition at line 122 of file messageserializer.cpp.

◆ operator<<() [16/16]

MessageSerializer & MessageSerializer::operator<< ( XsDataIdentifier  id)

Output stream operator that adds a XsDataIdentifier to the stream.

Parameters
idThe data identifier
Returns
A reference to this object

Definition at line 104 of file messageserializer.cpp.

Member Data Documentation

◆ m_index

XsSize MessageSerializer::m_index
private

Definition at line 146 of file messageserializer.h.

◆ m_message

XsMessage& MessageSerializer::m_message
private

Definition at line 145 of file messageserializer.h.


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


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