STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
ubx.c File Reference
#include "ubx.h"
#include <string.h>
Include dependency graph for ubx.c:

Go to the source code of this file.

Functions

size_t ubx_frame (uint8_t *out, size_t cap, uint8_t cls, uint8_t id, const uint8_t *payload, uint16_t len)
size_t ubx_valset (uint8_t *out, size_t cap, const ubx_item_t *items, size_t count)
static uint32_t u32 (const uint8_t *p)
static int32_t i32 (const uint8_t *p)
bool ubx_parse_nav_pvt (const uint8_t *p, uint16_t len, ubx_pvt_t *out)
size_t ubx_poll (uint8_t *out, size_t cap, uint8_t cls, uint8_t id)
static uint16_t u16 (const uint8_t *p)
bool ubx_parse_mon_rf (const uint8_t *p, uint16_t len, ubx_rf_t *out)
bool ubx_sat_summary (const uint8_t *p, uint16_t len, ubx_sats_t *out)

Function Documentation

◆ i32()

int32_t i32 ( const uint8_t * p)
static

Definition at line 62 of file ubx.c.

References p, and u32().

Referenced by ubx_parse_nav_pvt().

◆ u16()

uint16_t u16 ( const uint8_t * p)
static

Definition at line 100 of file ubx.c.

References p.

Referenced by ubx_parse_mon_rf().

◆ u32()

uint32_t u32 ( const uint8_t * p)
static

Definition at line 57 of file ubx.c.

References p.

Referenced by i32(), ubx_parse_nav_pvt(), and ubx_sat_summary().

◆ ubx_frame()

size_t ubx_frame ( uint8_t * out,
size_t cap,
uint8_t cls,
uint8_t id,
const uint8_t * payload,
uint16_t len )

Definition at line 5 of file ubx.c.

References a, and b.

Referenced by ack(), pvt(), test_frame_roundtrip_through_parser(), ubx_poll(), and ubx_valset().

◆ ubx_parse_mon_rf()

bool ubx_parse_mon_rf ( const uint8_t * p,
uint16_t len,
ubx_rf_t * out )

Definition at line 104 of file ubx.c.

References b, p, and u16().

Referenced by on_frame().

◆ ubx_parse_nav_pvt()

bool ubx_parse_nav_pvt ( const uint8_t * p,
uint16_t len,
ubx_pvt_t * out )

Definition at line 66 of file ubx.c.

References i32(), p, u32(), and UBX_NAV_PVT_LEN.

Referenced by on_pvt(), and test_nav_pvt_through_the_frame_parser().

◆ ubx_poll()

size_t ubx_poll ( uint8_t * out,
size_t cap,
uint8_t cls,
uint8_t id )

Definition at line 96 of file ubx.c.

References NULL, and ubx_frame().

Referenced by gnss_core_request_status().

◆ ubx_sat_summary()

bool ubx_sat_summary ( const uint8_t * p,
uint16_t len,
ubx_sats_t * out )

Definition at line 119 of file ubx.c.

References p, and u32().

Referenced by on_frame().

◆ ubx_valset()

size_t ubx_valset ( uint8_t * out,
size_t cap,
const ubx_item_t * items,
size_t count )