Parser QGC routines and types.
More...
|
| 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.
|
Parser QGC routines and types.
◆ QgcGrpId()
| uint8_t fpsdk::common::parser::qgc::QgcGrpId |
( |
const uint8_t * | msg | ) |
|
|
constexpr |
Get group ID from message.
- Parameters
-
| [in] | msg | Pointer 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] | msg | Pointer 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] | name | String to write the name to |
| [in] | size | Size of name (incl. nul termination) |
| [in] | msg | Pointer to the QGC message |
| [in] | msg_size | Size 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] | info | String to write the info to |
| [in] | size | Size of name (incl. nul termination) |
| [in] | msg | Pointer to the QGC message |
| [in] | msg_size | Size 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
◆ 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.