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

Go to the source code of this file.

Functions

void test_empty_queue_never_sends ()
void test_full_packet_sends_regardless_of_age ()
void test_fast_board_still_batches ()
void test_slow_board_sends_single_old_chunk ()
void test_age_boundary ()
void test_age_survives_millis_wrap ()
void setUp ()
void tearDown ()
int main (int argc, char **argv)

Variables

static const size_t kMax = 9
 sensorBatchReady: when a sensor board ships its queued chunks.
static const uint32_t kAge = 250

Function Documentation

◆ main()

◆ setUp()

void setUp ( void )

Definition at line 43 of file test_send_policy.cpp.

◆ tearDown()

void tearDown ( void )

Definition at line 45 of file test_send_policy.cpp.

◆ test_age_boundary()

void test_age_boundary ( )

Definition at line 32 of file test_send_policy.cpp.

References kAge, kMax, and sensorBatchReady().

Referenced by main().

◆ test_age_survives_millis_wrap()

void test_age_survives_millis_wrap ( )

Definition at line 37 of file test_send_policy.cpp.

References kAge, kMax, and sensorBatchReady().

Referenced by main().

◆ test_empty_queue_never_sends()

void test_empty_queue_never_sends ( )

Definition at line 14 of file test_send_policy.cpp.

References kAge, kMax, and sensorBatchReady().

Referenced by main().

◆ test_fast_board_still_batches()

void test_fast_board_still_batches ( )

Definition at line 22 of file test_send_policy.cpp.

References kAge, kMax, and sensorBatchReady().

Referenced by main().

◆ test_full_packet_sends_regardless_of_age()

void test_full_packet_sends_regardless_of_age ( )

Definition at line 18 of file test_send_policy.cpp.

References kAge, kMax, and sensorBatchReady().

Referenced by main().

◆ test_slow_board_sends_single_old_chunk()

void test_slow_board_sends_single_old_chunk ( )

Definition at line 27 of file test_send_policy.cpp.

References kAge, kMax, and sensorBatchReady().

Referenced by main().

Variable Documentation

◆ kAge

◆ kMax

const size_t kMax = 9
static

sensorBatchReady: when a sensor board ships its queued chunks.

The bug it guards: an LC board at SINC4 / 20 SPS takes ~0.8 s per chunk, and waiting for a full packet of 9 held every reading back 7-12 s.

Definition at line 11 of file test_send_policy.cpp.

Referenced by main(), test_age_boundary(), test_age_survives_millis_wrap(), test_empty_queue_never_sends(), test_fast_board_still_batches(), test_full_packet_sends_regardless_of_age(), and test_slow_board_sends_single_old_chunk().