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... | |
MessageSerializer & | operator<< (const XsCanOutputConfiguration &cfg) |
Output stream operator that adds a XsCanOutputConfiguration to the stream. More... | |
MessageSerializer & | operator<< (const XsCanOutputConfigurationArray &config) |
Output stream operator that adds a XsOutputConfigurationArray to the stream. More... | |
MessageSerializer & | operator<< (const XsDeviceId &id) |
Output stream operator that adds a XsDeviceId to the stream. More... | |
MessageSerializer & | operator<< (const XsOutputConfiguration &cfg) |
Output stream operator that adds a XsOutputConfiguration to the stream. More... | |
MessageSerializer & | operator<< (const XsOutputConfigurationArray &config) |
Output stream operator that adds a XsOutputConfigurationArray to the stream. More... | |
MessageSerializer & | operator<< (int16_t value) |
Output stream operator that adds a int16_t to the stream. More... | |
MessageSerializer & | operator<< (int32_t value) |
Output stream operator that adds a int32_t to the stream. More... | |
MessageSerializer & | operator<< (int64_t value) |
Output stream operator that adds a int64_t to the stream. More... | |
MessageSerializer & | operator<< (int8_t value) |
Output stream operator that adds a int8_t to the stream. More... | |
MessageSerializer & | operator<< (uint16_t value) |
Output stream operator that adds a uint16_t to the stream. More... | |
MessageSerializer & | operator<< (uint32_t value) |
Output stream operator that adds a uint32_t to the stream. More... | |
MessageSerializer & | operator<< (uint64_t value) |
Output stream operator that adds a uint64_t to the stream. More... | |
MessageSerializer & | operator<< (uint8_t value) |
Output stream operator that adds a uint8_t to the stream. More... | |
MessageSerializer & | operator<< (XsCanDataIdentifier value) |
Output stream operator that adds a XsCanDataIdentifier to the stream. More... | |
MessageSerializer & | operator<< (XsCanFrameFormat value) |
Output stream operator that adds a XsCanIdLenght to the stream. More... | |
MessageSerializer & | operator<< (XsDataIdentifier value) |
Output stream operator that adds a XsDataIdentifier to the stream. More... | |
virtual | ~MessageSerializer () |
Destructor. More... | |
Private Attributes | |
XsSize | m_index |
XsMessage & | m_message |
A class that does the message serialization.
Definition at line 79 of file messageserializer.h.
Default constructor.
Definition at line 80 of file messageserializer.cpp.
|
virtual |
Destructor.
Definition at line 89 of file messageserializer.cpp.
void MessageSerializer::append | ( | const uint8_t * | data, |
XsSize | size | ||
) |
Appends the data to the message.
data | The value to add to the message |
size | The size of this value |
Definition at line 234 of file messageserializer.cpp.
void MessageSerializer::finalize | ( | ) |
Finalizes the message serialization.
Definition at line 242 of file messageserializer.cpp.
|
inline |
Definition at line 137 of file messageserializer.h.
MessageSerializer & MessageSerializer::operator<< | ( | const XsCanOutputConfiguration & | cfg | ) |
Output stream operator that adds a XsCanOutputConfiguration to the stream.
cfg | The output configuration |
Definition at line 224 of file messageserializer.cpp.
MessageSerializer & MessageSerializer::operator<< | ( | const XsCanOutputConfigurationArray & | config | ) |
Output stream operator that adds a XsOutputConfigurationArray to the stream.
config | The output configuration array |
Definition at line 210 of file messageserializer.cpp.
MessageSerializer & MessageSerializer::operator<< | ( | const XsDeviceId & | id | ) |
Output stream operator that adds a XsDeviceId to the stream.
id | The device ID |
Definition at line 131 of file messageserializer.cpp.
MessageSerializer & MessageSerializer::operator<< | ( | const XsOutputConfiguration & | cfg | ) |
Output stream operator that adds a XsOutputConfiguration to the stream.
cfg | The output configuration |
Definition at line 201 of file messageserializer.cpp.
MessageSerializer & MessageSerializer::operator<< | ( | const XsOutputConfigurationArray & | config | ) |
Output stream operator that adds a XsOutputConfigurationArray to the stream.
config | The output configuration array |
Definition at line 187 of file messageserializer.cpp.
|
inline |
Output stream operator that adds a int16_t to the stream.
value | The value to add to the stream |
Definition at line 116 of file messageserializer.h.
|
inline |
Output stream operator that adds a int32_t to the stream.
value | The value to add to the stream |
Definition at line 107 of file messageserializer.h.
|
inline |
Output stream operator that adds a int64_t to the stream.
value | The value to add to the stream |
Definition at line 98 of file messageserializer.h.
|
inline |
Output stream operator that adds a int8_t to the stream.
value | The value to add to the stream |
Definition at line 125 of file messageserializer.h.
MessageSerializer & MessageSerializer::operator<< | ( | uint16_t | value | ) |
Output stream operator that adds a uint16_t to the stream.
value | The value to add to the stream |
Definition at line 154 of file messageserializer.cpp.
MessageSerializer & MessageSerializer::operator<< | ( | uint32_t | value | ) |
Output stream operator that adds a uint32_t to the stream.
value | The value to add to the stream |
Definition at line 165 of file messageserializer.cpp.
MessageSerializer & MessageSerializer::operator<< | ( | uint64_t | value | ) |
Output stream operator that adds a uint64_t to the stream.
value | The value to add to the stream |
Definition at line 176 of file messageserializer.cpp.
MessageSerializer & MessageSerializer::operator<< | ( | uint8_t | value | ) |
Output stream operator that adds a uint8_t to the stream.
value | The value to add to the stream |
Definition at line 143 of file messageserializer.cpp.
MessageSerializer & MessageSerializer::operator<< | ( | XsCanDataIdentifier | id | ) |
Output stream operator that adds a XsCanDataIdentifier to the stream.
id | The CAN data identifier |
Definition at line 113 of file messageserializer.cpp.
MessageSerializer & MessageSerializer::operator<< | ( | XsCanFrameFormat | idl | ) |
Output stream operator that adds a XsCanIdLenght to the stream.
idl | The CAN Id length enum value |
Definition at line 122 of file messageserializer.cpp.
MessageSerializer & MessageSerializer::operator<< | ( | XsDataIdentifier | id | ) |
Output stream operator that adds a XsDataIdentifier to the stream.
id | The data identifier |
Definition at line 104 of file messageserializer.cpp.
|
private |
Definition at line 146 of file messageserializer.h.
|
private |
Definition at line 145 of file messageserializer.h.