Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
UBX Message Protocol

Topics

 UBX_MSG_CLASS_ACK
 
 
 UBX_MSG_CLASS_CFG
 
 
 UBX_MSG_CLASS_MON
 
 
 UBX_MSG_CLASS_NAV
 
 
 UBX_MSG_CLASS_RXM
 
 

Data Structures

struct  ubx_frame
 UBX Message Frame. More...
 

Macros

#define UBX_PREAMBLE_SYNC_CHAR_1   0xB5
 
#define UBX_PREAMBLE_SYNC_CHAR_2   0x62
 
#define UBX_MSG_BUF_DEFINE(name, msg_type)
 Create a net_buf_simple large enough to hold a message.
 

Enumerations

enum  ubx_msg_class {
  UBX_MSG_CLASS_ACK = 0x05 , UBX_MSG_CLASS_CFG = 0x06 , UBX_MSG_CLASS_INF = 0x04 , UBX_MSG_CLASS_LOG = 0x21 ,
  UBX_MSG_CLASS_MGA = 0x13 , UBX_MSG_CLASS_MON = 0x0a , UBX_MSG_CLASS_NAV = 0x01 , UBX_MSG_CLASS_RXM = 0x02 ,
  UBX_MSG_CLASS_SEC = 0x27 , UBX_MSG_CLASS_TIM = 0x0d , UBX_MSG_CLASS_UPD = 0x09
}
 UBX Message Classes. More...
 

Functions

static void ubx_msg_prepare (struct net_buf_simple *buf, uint8_t msg_class, uint8_t msg_id)
 Prepare a net_buf_simple to be used as a UBX protocol message.
 
static void ubx_msg_finalise (struct net_buf_simple *buf)
 Finalise a net_buf_simple to be used as a UBX protocol message.
 
static void ubx_msg_simple (struct net_buf_simple *buf, uint8_t msg_class, uint8_t msg_id, const void *msg, size_t msg_len)
 Create a UBX message in a net_buf_simple.
 

Detailed Description

Macro Definition Documentation

◆ UBX_MSG_BUF_DEFINE

#define UBX_MSG_BUF_DEFINE ( name,
msg_type )

#include <infuse/gnss/ubx/protocol.h>

Value:
NET_BUF_SIMPLE_DEFINE(name, \
(sizeof(struct ubx_frame) + sizeof(msg_type) + sizeof(uint16_t)))
UBX Message Frame.
Definition protocol.h:32

Create a net_buf_simple large enough to hold a message.

Warning
Only works for fixed length messages
Parameters
nameName of net_buf_simple
msg_typeUBX message structure

◆ UBX_PREAMBLE_SYNC_CHAR_1

#define UBX_PREAMBLE_SYNC_CHAR_1   0xB5

◆ UBX_PREAMBLE_SYNC_CHAR_2

#define UBX_PREAMBLE_SYNC_CHAR_2   0x62

Enumeration Type Documentation

◆ ubx_msg_class

#include <infuse/gnss/ubx/protocol.h>

UBX Message Classes.

Enumerator
UBX_MSG_CLASS_ACK 
UBX_MSG_CLASS_CFG 
UBX_MSG_CLASS_INF 
UBX_MSG_CLASS_LOG 
UBX_MSG_CLASS_MGA 
UBX_MSG_CLASS_MON 
UBX_MSG_CLASS_NAV 
UBX_MSG_CLASS_RXM 
UBX_MSG_CLASS_SEC 
UBX_MSG_CLASS_TIM 
UBX_MSG_CLASS_UPD 

Function Documentation

◆ ubx_msg_finalise()

static void ubx_msg_finalise ( struct net_buf_simple * buf)
inlinestatic

#include <infuse/gnss/ubx/protocol.h>

Finalise a net_buf_simple to be used as a UBX protocol message.

Populates the header payload size and computes the message checksum.

Parameters
bufBuffer to finalise.

◆ ubx_msg_prepare()

static void ubx_msg_prepare ( struct net_buf_simple * buf,
uint8_t msg_class,
uint8_t msg_id )
inlinestatic

#include <infuse/gnss/ubx/protocol.h>

Prepare a net_buf_simple to be used as a UBX protocol message.

Parameters
bufBuffer to prepare.
msg_classUBX protocol message class (ubx_msg_class)
msg_idUBX protocol message ID (depends on msg_class)

◆ ubx_msg_simple()

static void ubx_msg_simple ( struct net_buf_simple * buf,
uint8_t msg_class,
uint8_t msg_id,
const void * msg,
size_t msg_len )
inlinestatic

#include <infuse/gnss/ubx/protocol.h>

Create a UBX message in a net_buf_simple.

Parameters
bufBuffer to push message into
msg_classUBX protocol message class (ubx_msg_class)
msg_idUBX protocol message ID (depends on msg_class)
msgUBX message payload
msg_lenUBX payload length