GNSS receiver tools  1
Tools for use with GNSS receivers
UBX Namespace Reference

Namespaces

 Ack
 
 Cfg
 

Classes

struct  checksum_t
 
class  ChecksumMismatch
 Exception class for when checksums don't match. More...
 
class  Input_message
 Base class for messages that go to the GPS receiver. More...
 
class  Input_Output_message
 Base class for messages than be both sent and received. More...
 
class  Message
 Base class for a binary message. More...
 
class  Output_message
 Base class for messages that come from the GPS receiver. More...
 
class  UnknownMessageID
 Exception class for when we can't find the message ID in our list. More...
 

Typedefs

typedef uint16_t Length
 Type for the binary message length, limited to 64 KiB. More...
 
typedef std::function< Output_message::ptr(uint8_t *, Length)> output_message_factory
 

Enumerations

enum  GNSS_ID : uint8_t {
  GNSS_ID::GPS = 0, GNSS_ID::SBAS, GNSS_ID::Galileo, GNSS_ID::BeiDou,
  GNSS_ID::IMES, GNSS_ID::QZSS, GNSS_ID::GLONASS
}
 
enum  Class_ID : uint8_t {
  Class_ID::NAV = 1, Class_ID::RXM = 2, Class_ID::INF = 4, Class_ID::ACK = 5,
  Class_ID::CFG = 6, Class_ID::UPD = 9, Class_ID::MON = 10, Class_ID::AID = 11,
  Class_ID::TIM = 13, Class_ID::MGA = 19, Class_ID::LOG = 33
}
 
enum  PortID : uint8_t {
  PortID::DDC = 0, PortID::I2C = 0, PortID::UART = 1, PortID::USB = 3,
  PortID::SPI = 4
}
 

Functions

Output_message::ptr parse_message (unsigned char *buffer, std::size_t len)
 Parser. More...
 
checksum_t checksum (unsigned char *buffer, Length len)
 

Variables

const uint8_t SyncChar [2] = { 0xB5, 0x62 }
 
const Length SyncChar_len = 2
 
const Length Length_len = 2
 
const Length ClassID_len = 2
 
const Length Checksum_len = 2
 
std::map< uint16_t, output_message_factoryoutput_message_factories
 

Typedef Documentation

typedef uint16_t UBX::Length

Type for the binary message length, limited to 64 KiB.

Definition at line 48 of file UBX.hh.

typedef std::function<Output_message::ptr(uint8_t*, Length)> UBX::output_message_factory

Definition at line 73 of file UBX.cc.

Enumeration Type Documentation

enum UBX::Class_ID : uint8_t
strong
Enumerator
NAV 
RXM 
INF 
ACK 
CFG 
UPD 
MON 
AID 
TIM 
MGA 
LOG 

Definition at line 67 of file UBX.hh.

enum UBX::GNSS_ID : uint8_t
strong
Enumerator
GPS 
SBAS 
Galileo 
BeiDou 
IMES 
QZSS 
GLONASS 

Definition at line 57 of file UBX.hh.

enum UBX::PortID : uint8_t
strong
Enumerator
DDC 
I2C 
UART 
USB 
SPI 

Definition at line 81 of file UBX.hh.

Function Documentation

checksum_t UBX::checksum ( unsigned char *  buffer,
Length  len 
)

Definition at line 41 of file UBX.cc.

Output_message::ptr UBX::parse_message ( unsigned char *  buffer,
std::size_t  len 
)

Parser.

Definition at line 86 of file UBX.cc.

Variable Documentation

const Length UBX::Checksum_len = 2

Definition at line 54 of file UBX.hh.

const Length UBX::ClassID_len = 2

Definition at line 53 of file UBX.hh.

const Length UBX::Length_len = 2

Definition at line 52 of file UBX.hh.

std::map<uint16_t, output_message_factory> UBX::output_message_factories
Initial value:
= {
std::make_pair<uint16_t, output_message_factory>(((uint8_t) Class_ID::ACK << 8) | ( 0x00 ), [](uint8_t* payload, Length len) { return std::make_shared< Ack::Nak >(payload, len); }),
std::make_pair<uint16_t, output_message_factory>(((uint8_t) Class_ID::ACK << 8) | ( 0x01 ), [](uint8_t* payload, Length len) { return std::make_shared< Ack::Ack >(payload, len); }),
std::make_pair<uint16_t, output_message_factory>(((uint8_t) Class_ID::CFG << 8) | ( 0x00 ), [](uint8_t* payload, Length len) { return std::make_shared< Cfg::Prt >(payload, len); }),
std::make_pair<uint16_t, output_message_factory>(((uint8_t) Class_ID::CFG << 8) | ( 0x01 ), [](uint8_t* payload, Length len) { return std::make_shared< Cfg::Msg >(payload, len); }),
std::make_pair<uint16_t, output_message_factory>(((uint8_t) Class_ID::CFG << 8) | ( 0x3e ), [](uint8_t* payload, Length len) { return std::make_shared< Cfg::GNSS >(payload, len); }),
}
uint16_t Length
Type for the binary message length, limited to 64 KiB.
Definition: UBX.hh:48
Class_ID
Definition: UBX.hh:67

Definition at line 75 of file UBX.cc.

const uint8_t UBX::SyncChar[2] = { 0xB5, 0x62 }

Definition at line 50 of file UBX.hh.

const Length UBX::SyncChar_len = 2

Definition at line 51 of file UBX.hh.