Class to read out Emlid 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 |
| R - First sync character which begins a new binary message.
|
|
static constexpr uint8_t | BINARY_SYNC_CHAR_2 |
| E - 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 Emlid Sensors.
Definition at line 23 of file EmlidUartSensor.hpp.
◆ EmlidUartSensor() [1/4]
NAV::vendor::emlid::EmlidUartSensor::EmlidUartSensor |
( |
std::string | name | ) |
|
|
explicit |
◆ EmlidUartSensor() [2/4]
NAV::vendor::emlid::EmlidUartSensor::EmlidUartSensor |
( |
| ) |
|
|
default |
◆ ~EmlidUartSensor()
NAV::vendor::emlid::EmlidUartSensor::~EmlidUartSensor |
( |
| ) |
|
|
default |
◆ EmlidUartSensor() [3/4]
NAV::vendor::emlid::EmlidUartSensor::EmlidUartSensor |
( |
const EmlidUartSensor & | | ) |
|
|
delete |
◆ EmlidUartSensor() [4/4]
NAV::vendor::emlid::EmlidUartSensor::EmlidUartSensor |
( |
EmlidUartSensor && | | ) |
|
|
delete |
◆ checksumFunction()
bool NAV::vendor::emlid::EmlidUartSensor::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 195 of file EmlidUartSensor.cpp.
◆ findPacket()
std::unique_ptr< uart::protocol::Packet > NAV::vendor::emlid::EmlidUartSensor::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 38 of file EmlidUartSensor.cpp.
◆ isErrorFunction()
bool NAV::vendor::emlid::EmlidUartSensor::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 219 of file EmlidUartSensor.cpp.
◆ isResponseFunction()
bool NAV::vendor::emlid::EmlidUartSensor::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 224 of file EmlidUartSensor.cpp.
◆ operator->()
uart::sensors::UartSensor * NAV::vendor::emlid::EmlidUartSensor::operator-> |
( |
| ) |
|
|
inline |
◆ operator=() [1/2]
Copy assignment operator.
◆ operator=() [2/2]
Move assignment operator.
◆ packetFinderFunction()
void NAV::vendor::emlid::EmlidUartSensor::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 157 of file EmlidUartSensor.cpp.
◆ packetTypeFunction()
uart::protocol::Packet::Type NAV::vendor::emlid::EmlidUartSensor::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 173 of file EmlidUartSensor.cpp.
◆ resetTracking()
void NAV::vendor::emlid::EmlidUartSensor::resetTracking |
( |
| ) |
|
|
private |
◆ _asciiEndChar1Found
bool NAV::vendor::emlid::EmlidUartSensor::_asciiEndChar1Found |
|
private |
◆ _binaryMsgId
uint8_t NAV::vendor::emlid::EmlidUartSensor::_binaryMsgId |
|
private |
◆ _binaryMsgIdFound
bool NAV::vendor::emlid::EmlidUartSensor::_binaryMsgIdFound |
|
private |
◆ _binaryPayloadLength
uint16_t NAV::vendor::emlid::EmlidUartSensor::_binaryPayloadLength |
|
private |
◆ _binaryPayloadLength1Found
bool NAV::vendor::emlid::EmlidUartSensor::_binaryPayloadLength1Found |
|
private |
◆ _binaryPayloadLength2Found
bool NAV::vendor::emlid::EmlidUartSensor::_binaryPayloadLength2Found |
|
private |
◆ _binarySyncChar2Found
bool NAV::vendor::emlid::EmlidUartSensor::_binarySyncChar2Found |
|
private |
◆ _buffer
std::vector<uint8_t> NAV::vendor::emlid::EmlidUartSensor::_buffer |
|
private |
◆ _currentlyBuildingAsciiPacket
bool NAV::vendor::emlid::EmlidUartSensor::_currentlyBuildingAsciiPacket |
|
private |
◆ _currentlyBuildingBinaryPacket
bool NAV::vendor::emlid::EmlidUartSensor::_currentlyBuildingBinaryPacket |
|
private |
◆ _name
const std::string NAV::vendor::emlid::EmlidUartSensor::_name |
|
private |
◆ _numOfBytesRemainingForCompletePacket
size_t NAV::vendor::emlid::EmlidUartSensor::_numOfBytesRemainingForCompletePacket |
|
private |
◆ _runningDataIndex
size_t NAV::vendor::emlid::EmlidUartSensor::_runningDataIndex |
|
private |
Used for correlating raw data with where the packet was found for the end user.
Definition at line 121 of file EmlidUartSensor.hpp.
◆ _sensor
uart::sensors::UartSensor NAV::vendor::emlid::EmlidUartSensor::_sensor |
|
private |
◆ ASCII_END_CHAR_1
uint8_t NAV::vendor::emlid::EmlidUartSensor::ASCII_END_CHAR_1 |
|
staticconstexprprivate |
◆ ASCII_END_CHAR_2
uint8_t NAV::vendor::emlid::EmlidUartSensor::ASCII_END_CHAR_2 |
|
staticconstexprprivate |
◆ ASCII_ESCAPE_CHAR
uint8_t NAV::vendor::emlid::EmlidUartSensor::ASCII_ESCAPE_CHAR |
|
staticconstexprprivate |
◆ ASCII_START_CHAR
uint8_t NAV::vendor::emlid::EmlidUartSensor::ASCII_START_CHAR |
|
staticconstexpr |
◆ BINARY_SYNC_CHAR_1
uint8_t NAV::vendor::emlid::EmlidUartSensor::BINARY_SYNC_CHAR_1 |
|
staticconstexpr |
R - First sync character which begins a new binary message.
Definition at line 50 of file EmlidUartSensor.hpp.
◆ BINARY_SYNC_CHAR_2
uint8_t NAV::vendor::emlid::EmlidUartSensor::BINARY_SYNC_CHAR_2 |
|
staticconstexpr |
E - Second sync character which begins a new binary message.
Definition at line 51 of file EmlidUartSensor.hpp.
◆ ENDIANNESS
uart::Endianness NAV::vendor::emlid::EmlidUartSensor::ENDIANNESS |
|
staticconstexprprivate |
◆ PACKET_HEADER_LENGTH
size_t NAV::vendor::emlid::EmlidUartSensor::PACKET_HEADER_LENGTH |
|
staticconstexprprivate |
The documentation for this class was generated from the following files: