Class to read out Ublox Sensors.
More...
|
static constexpr uint8_t | ASCII_START_CHAR |
| Ascii character which begins a new ascii message.
|
|
static constexpr uint8_t | BINARY_SYNC_CHAR_1 |
| µ - First sync character which begins a new binary message
|
|
static constexpr uint8_t | BINARY_SYNC_CHAR_2 |
| b - Second sync character which begins a new binary message
|
|
|
static bool | checksumFunction (const uart::protocol::Packet &packet) |
| Function which is called to verify packet integrity.
|
|
static bool | isErrorFunction (const uart::protocol::Packet &packet) |
| Function which determines, if the packet is an Error Packet.
|
|
static bool | isResponseFunction (const uart::protocol::Packet &packet) |
| Function which determines, if the packet is a Response.
|
|
static void | packetFinderFunction (const std::vector< uint8_t > &data, const uart::xplat::TimeStamp ×tamp, uart::sensors::UartSensor::ValidPacketFoundHandler dispatchPacket, void *dispatchPacketUserData, void *userData) |
| Function which is called to find packets in the provided data buffer.
|
|
static uart::protocol::Packet::Type | packetTypeFunction (const uart::protocol::Packet &packet) |
| Function which is called to determine the packet type (ascii/binary)
|
|
Class to read out Ublox Sensors.
Definition at line 25 of file UbloxUartSensor.hpp.
◆ UbloxUartSensor() [1/4]
NAV::vendor::ublox::UbloxUartSensor::UbloxUartSensor |
( |
std::string | name | ) |
|
|
explicit |
◆ UbloxUartSensor() [2/4]
NAV::vendor::ublox::UbloxUartSensor::UbloxUartSensor |
( |
| ) |
|
|
default |
◆ ~UbloxUartSensor()
NAV::vendor::ublox::UbloxUartSensor::~UbloxUartSensor |
( |
| ) |
|
|
default |
◆ UbloxUartSensor() [3/4]
NAV::vendor::ublox::UbloxUartSensor::UbloxUartSensor |
( |
const UbloxUartSensor & | | ) |
|
|
delete |
◆ UbloxUartSensor() [4/4]
NAV::vendor::ublox::UbloxUartSensor::UbloxUartSensor |
( |
UbloxUartSensor && | | ) |
|
|
delete |
◆ checksumFunction()
bool NAV::vendor::ublox::UbloxUartSensor::checksumFunction |
( |
const uart::protocol::Packet & | packet | ) |
|
|
staticprivate |
Function which is called to verify packet integrity.
- Parameters
-
[in] | packet | Packet to calculate the checksum for |
- Returns
- True if the packet is fault free
Definition at line 237 of file UbloxUartSensor.cpp.
◆ findPacket()
std::unique_ptr< uart::protocol::Packet > NAV::vendor::ublox::UbloxUartSensor::findPacket |
( |
uint8_t | dataByte | ) |
|
Collects data bytes and searches for packages inside of them.
- Parameters
-
[in] | dataByte | The next data byte |
- Returns
- nullptr if no packet found yet, otherwise a pointer to the packet
Definition at line 52 of file UbloxUartSensor.cpp.
◆ isErrorFunction()
bool NAV::vendor::ublox::UbloxUartSensor::isErrorFunction |
( |
const uart::protocol::Packet & | packet | ) |
|
|
staticprivate |
Function which determines, if the packet is an Error Packet.
- Parameters
-
[in] | packet | The packet to check |
Definition at line 277 of file UbloxUartSensor.cpp.
◆ isResponseFunction()
bool NAV::vendor::ublox::UbloxUartSensor::isResponseFunction |
( |
const uart::protocol::Packet & | packet | ) |
|
|
staticprivate |
Function which determines, if the packet is a Response.
- Parameters
-
[in] | packet | The packet to check |
Definition at line 282 of file UbloxUartSensor.cpp.
◆ operator->()
uart::sensors::UartSensor * NAV::vendor::ublox::UbloxUartSensor::operator-> |
( |
| ) |
|
|
inline |
◆ operator=() [1/2]
Copy assignment operator.
◆ operator=() [2/2]
Move assignment operator.
◆ packetFinderFunction()
void NAV::vendor::ublox::UbloxUartSensor::packetFinderFunction |
( |
const std::vector< uint8_t > & | data, |
|
|
const uart::xplat::TimeStamp & | timestamp, |
|
|
uart::sensors::UartSensor::ValidPacketFoundHandler | dispatchPacket, |
|
|
void * | dispatchPacketUserData, |
|
|
void * | userData ) |
|
staticprivate |
Function which is called to find packets in the provided data buffer.
- Parameters
-
[in] | data | Raw data buffer which has potential packets inside |
[in] | timestamp | Timestamp then the data in the buffer was received |
[in] | dispatchPacket | Function to call when a complete packet was found |
[in] | dispatchPacketUserData | User data to forward to the dispatchPacket function |
[in] | userData | User data provided when regisering this function. Should contain the sensor object |
Definition at line 199 of file UbloxUartSensor.cpp.
◆ packetTypeFunction()
uart::protocol::Packet::Type NAV::vendor::ublox::UbloxUartSensor::packetTypeFunction |
( |
const uart::protocol::Packet & | packet | ) |
|
|
staticprivate |
Function which is called to determine the packet type (ascii/binary)
- Parameters
-
[in] | packet | Packet to check the type of |
- Returns
- The type of the packet
Definition at line 215 of file UbloxUartSensor.cpp.
◆ resetTracking()
void NAV::vendor::ublox::UbloxUartSensor::resetTracking |
( |
| ) |
|
|
private |
◆ _asciiEndChar1Found
bool NAV::vendor::ublox::UbloxUartSensor::_asciiEndChar1Found |
|
private |
◆ _binaryMsgClass
uint8_t NAV::vendor::ublox::UbloxUartSensor::_binaryMsgClass |
|
private |
◆ _binaryMsgClassFound
bool NAV::vendor::ublox::UbloxUartSensor::_binaryMsgClassFound |
|
private |
◆ _binaryMsgId
uint8_t NAV::vendor::ublox::UbloxUartSensor::_binaryMsgId |
|
private |
◆ _binaryMsgIdFound
bool NAV::vendor::ublox::UbloxUartSensor::_binaryMsgIdFound |
|
private |
◆ _binaryPayloadLength
uint16_t NAV::vendor::ublox::UbloxUartSensor::_binaryPayloadLength |
|
private |
◆ _binaryPayloadLength1Found
bool NAV::vendor::ublox::UbloxUartSensor::_binaryPayloadLength1Found |
|
private |
◆ _binaryPayloadLength2Found
bool NAV::vendor::ublox::UbloxUartSensor::_binaryPayloadLength2Found |
|
private |
◆ _binarySyncChar2Found
bool NAV::vendor::ublox::UbloxUartSensor::_binarySyncChar2Found |
|
private |
◆ _buffer
std::vector<uint8_t> NAV::vendor::ublox::UbloxUartSensor::_buffer |
|
private |
◆ _currentlyBuildingAsciiPacket
bool NAV::vendor::ublox::UbloxUartSensor::_currentlyBuildingAsciiPacket |
|
private |
◆ _currentlyBuildingBinaryPacket
bool NAV::vendor::ublox::UbloxUartSensor::_currentlyBuildingBinaryPacket |
|
private |
◆ _name
const std::string NAV::vendor::ublox::UbloxUartSensor::_name |
|
private |
◆ _numOfBytesRemainingForCompletePacket
size_t NAV::vendor::ublox::UbloxUartSensor::_numOfBytesRemainingForCompletePacket |
|
private |
◆ _runningDataIndex
size_t NAV::vendor::ublox::UbloxUartSensor::_runningDataIndex |
|
private |
Used for correlating raw data with where the packet was found for the end user.
Definition at line 126 of file UbloxUartSensor.hpp.
◆ _sensor
uart::sensors::UartSensor NAV::vendor::ublox::UbloxUartSensor::_sensor |
|
private |
◆ _unrecognizedBytes
std::vector<uint8_t> NAV::vendor::ublox::UbloxUartSensor::_unrecognizedBytes |
|
private |
◆ ASCII_END_CHAR_1
uint8_t NAV::vendor::ublox::UbloxUartSensor::ASCII_END_CHAR_1 |
|
staticconstexprprivate |
◆ ASCII_END_CHAR_2
uint8_t NAV::vendor::ublox::UbloxUartSensor::ASCII_END_CHAR_2 |
|
staticconstexprprivate |
◆ ASCII_ESCAPE_CHAR
uint8_t NAV::vendor::ublox::UbloxUartSensor::ASCII_ESCAPE_CHAR |
|
staticconstexprprivate |
◆ ASCII_START_CHAR
uint8_t NAV::vendor::ublox::UbloxUartSensor::ASCII_START_CHAR |
|
staticconstexpr |
◆ BINARY_SYNC_CHAR_1
uint8_t NAV::vendor::ublox::UbloxUartSensor::BINARY_SYNC_CHAR_1 |
|
staticconstexpr |
µ - First sync character which begins a new binary message
Definition at line 52 of file UbloxUartSensor.hpp.
◆ BINARY_SYNC_CHAR_2
uint8_t NAV::vendor::ublox::UbloxUartSensor::BINARY_SYNC_CHAR_2 |
|
staticconstexpr |
b - Second sync character which begins a new binary message
Definition at line 53 of file UbloxUartSensor.hpp.
◆ ENDIANNESS
uart::Endianness NAV::vendor::ublox::UbloxUartSensor::ENDIANNESS |
|
staticconstexprprivate |
◆ PACKET_HEADER_LENGTH
size_t NAV::vendor::ublox::UbloxUartSensor::PACKET_HEADER_LENGTH |
|
staticconstexprprivate |
The documentation for this class was generated from the following files: