Expected usage of configuration interface:
More...
|
| 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.
|
Expected usage of configuration interface:
NET_BUF_SIMPLE_DEFINE(cfg_buf, 32);
@ UBX_CFG_KEY_RATE_MEAS
Definition cfg.h:685
@ UBX_CFG_KEY_RATE_NAV
Definition cfg.h:686
@ UBX_MSG_CFG_VALSET_LAYERS_BBR
Definition protocol.h:303
@ UBX_MSG_CFG_VALSET_LAYERS_RAM
Definition protocol.h:302
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:1013
#define UBX_CFG_VALUE_APPEND(buf, key, value)
Macro to append a configuration value to a buffer.
Definition cfg.h:1077
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:868
UBX_MSG_ID_CFG_VALSET
Definition protocol.h:283
◆ 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
-
| buf | Buffer to append value to |
| key | UBX configuration value key |
| value | Value |
◆ 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:
uint8_t *val_ptr = &buffer;
uint16_t val_len = buffer_len;
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:1130
Configuration value structure as returned by parser.
Definition cfg.h:1084
- Parameters
-
| ptr | Pointer 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 |
◆ ubx_msg_prepare_valset()
| void ubx_msg_prepare_valset |
( |
struct net_buf_simple * | buf, |
|
|
uint8_t | layers ) |
|
inlinestatic |