Fixposition SDK 0.0.0-heads/main-0-g6666cac
Collection of c++ libraries and apps for use with Fixposition products on Linux
Loading...
Searching...
No Matches
fpsdk::common::parser::qgc Namespace Reference

Parser QGC routines and types. More...

Functions

constexpr uint8_t QgcGrpId (const uint8_t *msg)
 Get group ID from message.
constexpr uint8_t QgcMsgId (const uint8_t *msg)
 Get message ID from message.
bool QgcGetMessageName (char *name, const std::size_t size, const uint8_t *msg, const std::size_t msg_size)
 Get QGC message name.
bool QgcGetMessageInfo (char *info, const std::size_t size, const uint8_t *msg, const std::size_t msg_size)
 Get QGC message info.

Variables

static constexpr uint8_t QGC_SYNC_1 = 0x51
 Sync char 1 ('Q')
static constexpr uint8_t QGC_SYNC_2 = 0x47
 Sync char 2 ('G')
static constexpr std::size_t QGC_HEAD_SIZE = 6
 Size of the QGC header.
static constexpr std::size_t QGC_FRAME_SIZE = 8
 Size (in bytes) of QGC frame.
QGC groups and messages (names and IDs)
static constexpr uint8_t QGC_RAW_GRPID = 0x0a
 QGC-RAW group ID.
static constexpr const char * QGC_RAW_STRID = "QGC-RAW"
 QGC-RAW group name.
static constexpr uint8_t QGC_RAW_PPPB2B_MSGID = 0xb2
 QGC-RAW-PPPB2B message ID.
static constexpr const char * QGC_RAW_PPPB2B_STRID = "QGC-RAW-PPPB2B"
 QGC-RAW-PPPB2B message name.
static constexpr uint8_t QGC_RAW_QZSSL6_MSGID = 0xb6
 QGC-RAW-QZSSL6 message ID.
static constexpr const char * QGC_RAW_QZSSL6_STRID = "QGC-RAW-QZSSL6"
 QGC-RAW-QZSSL6 message name.
static constexpr uint8_t QGC_RAW_HASE6_MSGID = 0xe6
 QGC-RAW-HASE6 message ID.
static constexpr const char * QGC_RAW_HASE6_STRID = "QGC-RAW-HASE6"
 QGC-RAW-HASE6 message name.

Detailed Description

Parser QGC routines and types.

Function Documentation

◆ QgcGrpId()

uint8_t fpsdk::common::parser::qgc::QgcGrpId ( const uint8_t * msg)
constexpr

Get group ID from message.

Parameters
[in]msgPointer to the start of the message
Note
No check on the data provided is done. This is meant for use as a helper in other functions. Checks on the msg and its data should be carried out there.
Returns
the QGC group ID

Definition at line 56 of file qgc.hpp.

◆ QgcMsgId()

uint8_t fpsdk::common::parser::qgc::QgcMsgId ( const uint8_t * msg)
constexpr

Get message ID from message.

Parameters
[in]msgPointer to the start of the message
Note
No check on the data provided is done. This is meant for use as a helper in other functions. Checks on the msg and its data should be carried out there.
Returns
the QGC message ID

Definition at line 71 of file qgc.hpp.

◆ QgcGetMessageName()

bool fpsdk::common::parser::qgc::QgcGetMessageName ( char * name,
const std::size_t size,
const uint8_t * msg,
const std::size_t msg_size )

Get QGC message name.

Generates a name (string) in the form "QGC-GRPID-MSGID", where GRPID and MSGID are suitable stringifications of the class ID and message ID if known (for example, "QGC-RAW-HASE6", respectively %02X formatted IDs if unknown (for example, "QGC-0A-FF").

Parameters
[out]nameString to write the name to
[in]sizeSize of name (incl. nul termination)
[in]msgPointer to the QGC message
[in]msg_sizeSize of the msg
Note
No check on the data provided is done. The caller must ensure that the data is a valid QGC message.
Returns
true if message name was generated, false if name buffer was too small

◆ QgcGetMessageInfo()

bool fpsdk::common::parser::qgc::QgcGetMessageInfo ( char * info,
const std::size_t size,
const uint8_t * msg,
const std::size_t msg_size )

Get QGC message info.

This stringifies the content of some QGC messages, for debugging.

Parameters
[out]infoString to write the info to
[in]sizeSize of name (incl. nul termination)
[in]msgPointer to the QGC message
[in]msg_sizeSize of the msg
Note
No check on the data provided is done. The caller must ensure that the data is a valid QGC message.
Returns
true if message info was generated (even if info is empty), false if name buffer was too small

Variable Documentation

◆ QGC_SYNC_1

uint8_t fpsdk::common::parser::qgc::QGC_SYNC_1 = 0x51
staticconstexpr

Sync char 1 ('Q')

Definition at line 41 of file qgc.hpp.

◆ QGC_SYNC_2

uint8_t fpsdk::common::parser::qgc::QGC_SYNC_2 = 0x47
staticconstexpr

Sync char 2 ('G')

Definition at line 42 of file qgc.hpp.

◆ QGC_HEAD_SIZE

std::size_t fpsdk::common::parser::qgc::QGC_HEAD_SIZE = 6
staticconstexpr

Size of the QGC header.

Definition at line 43 of file qgc.hpp.

◆ QGC_FRAME_SIZE

std::size_t fpsdk::common::parser::qgc::QGC_FRAME_SIZE = 8
staticconstexpr

Size (in bytes) of QGC frame.

Definition at line 44 of file qgc.hpp.

◆ QGC_RAW_GRPID

uint8_t fpsdk::common::parser::qgc::QGC_RAW_GRPID = 0x0a
staticconstexpr

QGC-RAW group ID.

Definition at line 119 of file qgc.hpp.

◆ QGC_RAW_STRID

const char* fpsdk::common::parser::qgc::QGC_RAW_STRID = "QGC-RAW"
staticconstexpr

QGC-RAW group name.

Definition at line 120 of file qgc.hpp.

◆ QGC_RAW_PPPB2B_MSGID

uint8_t fpsdk::common::parser::qgc::QGC_RAW_PPPB2B_MSGID = 0xb2
staticconstexpr

QGC-RAW-PPPB2B message ID.

Definition at line 126 of file qgc.hpp.

◆ QGC_RAW_PPPB2B_STRID

const char* fpsdk::common::parser::qgc::QGC_RAW_PPPB2B_STRID = "QGC-RAW-PPPB2B"
staticconstexpr

QGC-RAW-PPPB2B message name.

Definition at line 127 of file qgc.hpp.

◆ QGC_RAW_QZSSL6_MSGID

uint8_t fpsdk::common::parser::qgc::QGC_RAW_QZSSL6_MSGID = 0xb6
staticconstexpr

QGC-RAW-QZSSL6 message ID.

Definition at line 128 of file qgc.hpp.

◆ QGC_RAW_QZSSL6_STRID

const char* fpsdk::common::parser::qgc::QGC_RAW_QZSSL6_STRID = "QGC-RAW-QZSSL6"
staticconstexpr

QGC-RAW-QZSSL6 message name.

Definition at line 129 of file qgc.hpp.

◆ QGC_RAW_HASE6_MSGID

uint8_t fpsdk::common::parser::qgc::QGC_RAW_HASE6_MSGID = 0xe6
staticconstexpr

QGC-RAW-HASE6 message ID.

Definition at line 130 of file qgc.hpp.

◆ QGC_RAW_HASE6_STRID

const char* fpsdk::common::parser::qgc::QGC_RAW_HASE6_STRID = "QGC-RAW-HASE6"
staticconstexpr

QGC-RAW-HASE6 message name.

Definition at line 131 of file qgc.hpp.