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

Go to the source code of this file.

Classes

struct  sink_t
struct  rig_t

Macros

#define CHECK(c)

Functions

static void truth (uint32_t t, ubx_pvt_t *v)
static void record (void *ctx, uint8_t type, const void *data, uint8_t len)
static void rig (rig_t *r, uint32_t module_baud)
static void run (rig_t *r, uint32_t until)
static void test_cold_start_at_9600_reaches_10hz (void)
static void test_warm_module_at_115200_needs_no_baud_change (void)
static void test_nak_restarts_and_recovers (void)
static void test_silence_then_power_cycle_reconfigures (void)
static void test_pps_is_stamped (void)
int main (void)

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 9 of file test_gnss_core.c.

Referenced by test_cold_start_at_9600_reaches_10hz(), test_nak_restarts_and_recovers(), test_pps_is_stamped(), test_silence_then_power_cycle_reconfigures(), and test_warm_module_at_115200_needs_no_baud_change().

Function Documentation

◆ main()

◆ record()

void record ( void * ctx,
uint8_t type,
const void * data,
uint8_t len )
static

◆ rig()

◆ run()

void run ( rig_t * r,
uint32_t until )
static

Definition at line 63 of file test_gnss_core.c.

References fake_gnss_emit(), gnss_core_feed(), gnss_core_poll(), r, and until().

◆ test_cold_start_at_9600_reaches_10hz()

void test_cold_start_at_9600_reaches_10hz ( void )
static

◆ test_nak_restarts_and_recovers()

void test_nak_restarts_and_recovers ( void )
static

Definition at line 103 of file test_gnss_core.c.

References CHECK, GNSS_RUN, r, and rig().

Referenced by main().

◆ test_pps_is_stamped()

void test_pps_is_stamped ( void )
static

Definition at line 127 of file test_gnss_core.c.

References CHECK, gnss_core_set_pps(), r, and rig().

Referenced by main().

◆ test_silence_then_power_cycle_reconfigures()

void test_silence_then_power_cycle_reconfigures ( void )
static

Definition at line 112 of file test_gnss_core.c.

References CHECK, fake_gnss_power_cycle(), GNSS_RUN, r, and rig().

Referenced by main().

◆ test_warm_module_at_115200_needs_no_baud_change()

void test_warm_module_at_115200_needs_no_baud_change ( void )
static

Definition at line 93 of file test_gnss_core.c.

References CHECK, GNSS_RUN, r, and rig().

Referenced by main().

◆ truth()