Encodes a u-blox ROS message as a byte array. More...
#include <serialization.h>
Public Types | |
typedef uint8_t * | iterator |
Public Member Functions | |
iterator | end () |
template<typename T > | |
bool | write (const T &message, uint8_t class_id=T::CLASS_ID, uint8_t message_id=T::MESSAGE_ID) |
Encode the u-blox message. More... | |
bool | write (const uint8_t *message, uint32_t length, uint8_t class_id, uint8_t message_id) |
Wrap the encoded message payload with a header and checksum and add it to the buffer. More... | |
Writer (uint8_t *data, uint32_t size, const Options &options=Options()) | |
Construct a Writer with the given buffer. More... | |
Private Attributes | |
iterator | data_ |
The buffer of message bytes. More... | |
Options | options_ |
Options representing the sync char values, etc. More... | |
uint32_t | size_ |
The number of remaining bytes in the buffer. More... | |
Encodes a u-blox ROS message as a byte array.
Definition at line 329 of file serialization.h.
typedef uint8_t* ublox::Writer::iterator |
Definition at line 331 of file serialization.h.
Construct a Writer with the given buffer.
data | a buffer for messages |
size | the size of the buffer |
options | options representing the message sync chars, etc. |
Definition at line 339 of file serialization.h.
|
inline |
Definition at line 407 of file serialization.h.
|
inline |
Encode the u-blox message.
message | the message to encode |
class_id | the u-blox class ID, defaults to the message CLASS_ID |
message_id | the u-blox message ID, defaults to the message MESSAGE_ID |
Definition at line 349 of file serialization.h.
|
inline |
Wrap the encoded message payload with a header and checksum and add it to the buffer.
message | the encoded message payload (no header or checksum) |
length | the length of the message payload |
class_id | the u-blox class ID |
message_id | the u-blox message ID |
Definition at line 374 of file serialization.h.
|
private |
The buffer of message bytes.
Definition at line 413 of file serialization.h.
|
private |
Options representing the sync char values, etc.
Definition at line 418 of file serialization.h.
|
private |
The number of remaining bytes in the buffer.
Decrements as messages are written to the buffer
Definition at line 416 of file serialization.h.