Generic UBX frame.
More...
#include <UBXFrame.h>
Generic UBX frame.
Definition at line 51 of file UBXFrame.h.
◆ UBXFrame() [1/2]
| Boardcore::UBXFrame::UBXFrame |
( |
| ) |
|
|
default |
◆ UBXFrame() [2/2]
| Boardcore::UBXFrame::UBXFrame |
( |
UBXMessage |
message, |
|
|
const uint8_t * |
payload, |
|
|
uint16_t |
payloadLength |
|
) |
| |
|
inline |
Construct a new UBXFrame with the specified message and given payload.
Definition at line 203 of file UBXFrame.h.
◆ calcChecksum()
| void Boardcore::UBXFrame::calcChecksum |
( |
uint8_t * |
checksum | ) |
const |
|
inline |
Computes the frame checksum.
- Parameters
-
| checksum | Array of 2 elements where to store the checksum |
Definition at line 256 of file UBXFrame.h.
◆ getLength()
| uint16_t Boardcore::UBXFrame::getLength |
( |
| ) |
const |
|
inline |
Return the total frame length.
Definition at line 213 of file UBXFrame.h.
◆ getMessage()
| UBXMessage Boardcore::UBXFrame::getMessage |
( |
| ) |
const |
|
inline |
◆ getRealPayloadLength()
| uint16_t Boardcore::UBXFrame::getRealPayloadLength |
( |
| ) |
const |
|
inline |
Return the stored payload length.
Definition at line 215 of file UBXFrame.h.
◆ isValid()
| bool Boardcore::UBXFrame::isValid |
( |
| ) |
const |
|
inline |
Tells whether the current frame is valid or not. Checks the preamble and the checksum.
Definition at line 225 of file UBXFrame.h.
◆ readPacked()
| void Boardcore::UBXFrame::readPacked |
( |
const uint8_t * |
frame | ) |
|
|
inline |
Reads a raw frame.
Note that the frame bytes are assumed to start with the preamble.
- Parameters
-
| frame | An array of length at least MAX_FRAME_LENGTH. |
Definition at line 247 of file UBXFrame.h.
◆ writePacked()
| void Boardcore::UBXFrame::writePacked |
( |
uint8_t * |
frame | ) |
const |
|
inline |
Writes the current message into the given array.
- Parameters
-
| frame | Must be an array of the proper length. |
Definition at line 238 of file UBXFrame.h.
◆ checksum
| uint8_t Boardcore::UBXFrame::checksum[2] |
◆ MAX_FRAME_LENGTH
◆ MAX_PAYLOAD_LENGTH
| constexpr uint16_t Boardcore::UBXFrame::MAX_PAYLOAD_LENGTH = 92 |
|
staticconstexpr |
◆ message
| uint16_t Boardcore::UBXFrame::message |
◆ payload
◆ payloadLength
| uint16_t Boardcore::UBXFrame::payloadLength |
◆ preamble
| uint8_t Boardcore::UBXFrame::preamble[2] |
◆ PREAMBLE
| constexpr uint8_t Boardcore::UBXFrame::PREAMBLE = {0xb5, 0x62} |
|
staticconstexpr |
◆ WAIT
| constexpr uint8_t Boardcore::UBXFrame::WAIT = 0xff |
|
staticconstexpr |
The documentation for this struct was generated from the following files: