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

Go to the source code of this file.

Macros

#define CHECK(c)

Functions

static void test_valset_baud (void)
static void test_valset_configuration (void)
static void test_nav_pvt_through_the_frame_parser (void)
static void test_frame_roundtrip_through_parser (void)
int main (void)

Variables

static const uint8_t kBaud []
static const uint8_t kConfig []
static const uint8_t kPvt []

Macro Definition Documentation

◆ CHECK

#define CHECK ( c)
Value:
do { \
if (!(c)) { \
fprintf(stderr, "%s:%d: %s\n", __FILE__, __LINE__, #c); \
exit(1); \
} \
} while (0)

Definition at line 8 of file test_ubx.c.

Referenced by test_frame_roundtrip_through_parser(), test_nav_pvt_through_the_frame_parser(), test_valset_baud(), and test_valset_configuration().

Function Documentation

◆ main()

◆ test_frame_roundtrip_through_parser()

void test_frame_roundtrip_through_parser ( void )
static

◆ test_nav_pvt_through_the_frame_parser()

void test_nav_pvt_through_the_frame_parser ( void )
static

◆ test_valset_baud()

void test_valset_baud ( void )
static

Definition at line 39 of file test_ubx.c.

References CHECK, kBaud, UBX_KEY_UART1_BAUDRATE, and ubx_valset().

Referenced by main().

◆ test_valset_configuration()

void test_valset_configuration ( void )
static

Variable Documentation

◆ kBaud

const uint8_t kBaud[]
static
Initial value:
= {0xB5, 0x62, 0x06, 0x8A, 0x0C, 0x00, 0x00,
0x01, 0x00, 0x00, 0x01, 0x00, 0x52, 0x40,
0x00, 0xC2, 0x01, 0x00, 0xF3, 0xA5}

Definition at line 18 of file test_ubx.c.

Referenced by test_valset_baud().

◆ kConfig

const uint8_t kConfig[]
static
Initial value:
= {
0xB5, 0x62, 0x06, 0x8A, 0x19, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02,
0x00, 0x74, 0x10, 0x00, 0x07, 0x00, 0x91, 0x20, 0x01, 0x01, 0x00,
0x21, 0x30, 0x64, 0x00, 0x21, 0x00, 0x11, 0x20, 0x08, 0xF9, 0x01}

Definition at line 21 of file test_ubx.c.

Referenced by main(), and test_valset_configuration().

◆ kPvt

const uint8_t kPvt[]
static
Initial value:
= {
0xB5, 0x62, 0x01, 0x07, 0x5C, 0x00, 0x15, 0xCD, 0x5B, 0x07, 0xEA, 0x07,
0x0B, 0x05, 0x0E, 0x1E, 0x0F, 0x37, 0x19, 0x00, 0x00, 0x00, 0x0C, 0xFE,
0xFF, 0xFF, 0x03, 0x01, 0x00, 0x0B, 0x58, 0xD5, 0x20, 0xB7, 0x18, 0xCB,
0x92, 0x16, 0xF0, 0x49, 0x02, 0x00, 0xB4, 0xD6, 0x01, 0x00, 0x08, 0x07,
0x00, 0x00, 0xC4, 0x09, 0x00, 0x00, 0xDC, 0x05, 0x00, 0x00, 0x06, 0xFF,
0xFF, 0xFF, 0x33, 0x7E, 0xFE, 0xFF, 0xF0, 0x05, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x2C, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xB7, 0xE9}

Definition at line 28 of file test_ubx.c.

Referenced by test_nav_pvt_through_the_frame_parser().