Decodes byte messages into u-blox ROS messages.
More...
#include <serialization.h>
Decodes byte messages into u-blox ROS messages.
Definition at line 172 of file serialization.h.
◆ Reader()
ublox::Reader::Reader |
( |
const uint8_t * |
data, |
|
|
uint32_t |
count, |
|
|
const Options & |
options = Options() |
|
) |
| |
|
inline |
- Parameters
-
data | a buffer containing u-blox messages |
count | the size of the buffer |
options | A struct containing the parameters sync_a and sync_b
which represent the sync bytes indicating the beginning of the message |
Definition at line 180 of file serialization.h.
◆ checksum()
uint16_t ublox::Reader::checksum |
( |
| ) |
|
|
inline |
Get the checksum of the u-blox message.
- Returns
- the checksum of the u-blox message
Definition at line 287 of file serialization.h.
◆ classId()
uint8_t ublox::Reader::classId |
( |
| ) |
|
|
inline |
◆ data()
const uint8_t* ublox::Reader::data |
( |
| ) |
|
|
inline |
◆ end()
◆ found()
bool ublox::Reader::found |
( |
| ) |
|
|
inline |
Has a u-blox message been found in the buffer?
- Returns
- true if A message with the correct header & length has been found
Definition at line 222 of file serialization.h.
◆ getUnusedData()
const std::string& ublox::Reader::getUnusedData |
( |
| ) |
const |
|
inline |
◆ hasType()
template<typename T >
bool ublox::Reader::hasType |
( |
| ) |
|
|
inline |
Can the given message type decode the current message in the buffer?
- Returns
- whether the given message type can decode the current message in the buffer
Definition at line 322 of file serialization.h.
◆ isMessage()
bool ublox::Reader::isMessage |
( |
uint8_t |
class_id, |
|
|
uint8_t |
message_id |
|
) |
| |
|
inline |
Does the u-blox message have the given class and message ID?
- Returns
- Whether or not the u-blox message has the given class and message ID
Definition at line 332 of file serialization.h.
◆ length()
uint32_t ublox::Reader::length |
( |
| ) |
|
|
inline |
Get the length of the u-blox message payload.
Payload length does not include the header or checksum length. Determines the length from the header of the u-blox message.
- Returns
- the length of the message payload
Definition at line 276 of file serialization.h.
◆ messageId()
uint8_t ublox::Reader::messageId |
( |
| ) |
|
|
inline |
◆ next()
Go to the start of the next message based on the received message length.
Warning: Does not go to the correct byte location if the received message length is incorrect. If this is the case, search must be called.
Definition at line 245 of file serialization.h.
◆ pos()
Get the current position in the read buffer.
- Returns
- the current position of the read buffer
Definition at line 258 of file serialization.h.
◆ read()
template<typename T >
bool ublox::Reader::read |
( |
typename boost::call_traits< T >::reference |
message, |
|
|
bool |
search = false |
|
) |
| |
|
inline |
Decode the given message.
- Parameters
-
message | the output message |
search | whether or not to skip to the next message in the buffer |
Definition at line 298 of file serialization.h.
◆ search()
Search the buffer for the beginning of the next u-blox message.
- Returns
- a pointer to the start of the next u-blox message
Definition at line 193 of file serialization.h.
◆ count_
uint32_t ublox::Reader::count_ |
|
private |
the number of bytes in the buffer, //! decrement as the buffer is read
Definition at line 345 of file serialization.h.
◆ data_
const uint8_t* ublox::Reader::data_ |
|
private |
◆ found_
bool ublox::Reader::found_ |
|
private |
◆ iterator
const typedef uint8_t* ublox::Reader::iterator |
◆ options_
◆ unused_data_
std::string ublox::Reader::unused_data_ |
|
private |
Unused data from the read buffer, contains nmea messages.
Definition at line 343 of file serialization.h.
The documentation for this class was generated from the following file: