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

Expected usage of configuration interface: More...

Topics

 CFG-ANA: AssistNow Autonomous and Offline configuration
 CFG-BATCH: Batched output configuration
 CFG-BDS: BeiDou system configuration
 CFG-HW: Hardware configuration
 CFG-I2C: Configuration of the I2C interface
 CFG-I2CINPROT: I2C input protocol configuration
 CFG-I2COUTPROT: I2C output protocol configuration
 CFG-INFMSG: Information message configuration
 CFG-ITFM: Jamming and interference monitor configuration
 CFG-MOT: Motion detector configuration
 CFG-MSGOUT: Message output configuration
 CFG-NAVSPG: Standard precision navigation configuration
 CFG-NMEA: NMEA protocol configuration
 CFG-ODO: Odometer and low-speed course over ground filter configuration
 CFG-PM: Configuration for receiver power management
 CFG-QZSS: QZSS system configuration
 CFG-RATE: Navigation and measurement rate configuration
 CFG-RINV: Remote inventory
 CFG-SBAS: SBAS configuration
 CFG-SEC: Security configuration
 CFG-SIGNAL: Satellite systems (GNSS) signal configuration
 CFG-SPI: Configuration of the SPI interface
 CFG-SPIINPROT: SPI input protocol configuration
 CFG-SPIOUTPROT: SPI output protocol configuration
 CFG-TP: Time pulse configuration
 CFG-TXREADY: TX ready configuration
 CFG-UART1: Configuration of the UART1 interface
 CFG-UART1INPROT: UART1 input protocol configuration
 CFG-UART1OUTPROT: UART1 output protocol configuration

Data Structures

struct  ubx_cfg_val
 Configuration value structure as returned by parser. More...

Macros

#define UBX_CFG_VALUE_APPEND(buf, key, value)
 Macro to append a configuration value to a buffer.

Functions

static void ubx_msg_prepare_valset (struct net_buf_simple *buf, uint8_t layers)
 Helper to prepare the common CFG-VALSET message.
static void ubx_msg_prepare_valget (struct net_buf_simple *buf, uint8_t layer, uint8_t offset)
 Helper to prepare the common CFG-VALGET message.
static int ubx_cfg_val_parse (const uint8_t **ptr, size_t *remaining, struct ubx_cfg_val *cfg)
 Iteratively parse configuration values from a buffer.

Detailed Description

Expected usage of configuration interface:

struct ubx_msg_cfg_valset_v0 *valset;
NET_BUF_SIMPLE_DEFINE(cfg_buf, 32);
UBX_CFG_VALUE_APPEND(&cfg_buf, UBX_CFG_KEY_RATE_MEAS, fix_interval_ms);
ubx_msg_finalise(&cfg_buf);
@ UBX_CFG_KEY_RATE_MEAS
Definition cfg.h:713
@ UBX_CFG_KEY_RATE_NAV
Definition cfg.h:714
static void ubx_msg_prepare_valset(struct net_buf_simple *buf, uint8_t layers)
Helper to prepare the common CFG-VALSET message.
Definition cfg.h:1061
#define UBX_CFG_VALUE_APPEND(buf, key, value)
Macro to append a configuration value to a buffer.
Definition cfg.h:1125
static void ubx_msg_finalise(struct net_buf_simple *buf)
Finalise a net_buf_simple to be used as a UBX protocol message.
Definition protocol.h:1217
@ UBX_MSG_CFG_VALSET_LAYERS_BBR
Battery backed RAM layer.
Definition protocol.h:467
@ UBX_MSG_CFG_VALSET_LAYERS_RAM
RAM layer.
Definition protocol.h:465
Command for UBX_MSG_ID_CFG_VALSET (version 0, no transaction support)
Definition protocol.h:435

Macro Definition Documentation

◆ UBX_CFG_VALUE_APPEND

#define UBX_CFG_VALUE_APPEND ( buf,
key,
value )

#include </__w/infuse-sdk/infuse-sdk/infuse-sdk/include/infuse/gnss/ubx/cfg.h>

Value:
do { \
net_buf_simple_add_le32(buf, key); \
_UBX_CFG_VALUE_APPEND_FN(((key) & _UBX_CFG_KEY_SIZE_MASK))(buf, value); \
} while (0)

Macro to append a configuration value to a buffer.

Implemented as a macro to allow the type of value to be preserved. As key should always be a compile time constant, only the chosen branch should ever be present in the output binary.

Parameters
bufBuffer to append value to
keyUBX configuration value key
valueValue

Function Documentation

◆ ubx_cfg_val_parse()

int ubx_cfg_val_parse ( const uint8_t ** ptr,
size_t * remaining,
struct ubx_cfg_val * cfg )
inlinestatic

#include </__w/infuse-sdk/infuse-sdk/infuse-sdk/include/infuse/gnss/ubx/cfg.h>

Iteratively parse configuration values from a buffer.

Expected usage:

struct ubx_cfg_val cfg_val;
uint8_t *val_ptr = &buffer;
uint16_t val_len = buffer_len;
while (ubx_cfg_val_parse(&val_ptr, &val_len, &cfg_val) == 0) {
Handle cfg_val here...
}
static int ubx_cfg_val_parse(const uint8_t **ptr, size_t *remaining, struct ubx_cfg_val *cfg)
Iteratively parse configuration values from a buffer.
Definition cfg.h:1178
Configuration value structure as returned by parser.
Definition cfg.h:1132
Parameters
ptrPointer to configuration buffer to parse
remaining
cfg
Returns
int

◆ ubx_msg_prepare_valget()

void ubx_msg_prepare_valget ( struct net_buf_simple * buf,
uint8_t layer,
uint8_t offset )
inlinestatic

#include </__w/infuse-sdk/infuse-sdk/infuse-sdk/include/infuse/gnss/ubx/cfg.h>

Helper to prepare the common CFG-VALGET message.

Parameters
bufBuffer to prepare
layerLayer to query configuration for
offsetStart value offset for query

◆ ubx_msg_prepare_valset()

void ubx_msg_prepare_valset ( struct net_buf_simple * buf,
uint8_t layers )
inlinestatic

#include </__w/infuse-sdk/infuse-sdk/infuse-sdk/include/infuse/gnss/ubx/cfg.h>

Helper to prepare the common CFG-VALSET message.

Parameters
bufBuffer to prepare
layersLayers to set configuration values on