STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
test_packet_roundtrip.cpp File Reference
#include <unity.h>
#include <cstring>
#include <vector>
#include "DiabloEnums.h"
#include "DiabloPacketUtils.h"
#include "DiabloPackets.h"
#include "DiabloPacketUtils.cpp"
Include dependency graph for test_packet_roundtrip.cpp:

Go to the source code of this file.

Functions

void test_board_heartbeat_roundtrip ()
 Packet round-trip unit tests — DAQv2-Comms serialization / parsing.
void test_board_heartbeat_buffer_too_small ()
void test_board_heartbeat_parse_wrong_type ()
void test_server_heartbeat_roundtrip ()
void test_sensor_data_roundtrip ()
void test_sensor_data_buffer_too_small ()
void test_actuator_command_roundtrip ()
void test_actuator_command_empty_list ()
void test_pwm_actuator_roundtrip ()
void test_sensor_config_roundtrip_with_abort ()
void test_sensor_config_roundtrip_without_abort ()
void test_sensor_config_empty_sensors ()
void test_actuator_config_roundtrip ()
void test_actuator_config_no_pts ()
void test_self_test_roundtrip ()
void test_self_test_adc_bad ()
void test_abort_done_roundtrip ()
void test_abort_done_buffer_too_small ()
void test_parse_null_buffer ()
void test_log_packet_layout ()
void test_log_packet_buffer_too_small ()
void test_log_packet_roundtrip ()
void test_log_packet_parse_truncated ()
void test_log_packet_parse_wrong_type ()
void setUp ()
void tearDown ()
int main (int argc, char **argv)

Function Documentation

◆ main()

◆ setUp()

void setUp ( void )

Definition at line 538 of file test_packet_roundtrip.cpp.

◆ tearDown()

void tearDown ( void )

Definition at line 540 of file test_packet_roundtrip.cpp.

◆ test_abort_done_buffer_too_small()

void test_abort_done_buffer_too_small ( )

Definition at line 430 of file test_packet_roundtrip.cpp.

References daq::create_abort_done_packet().

Referenced by main().

◆ test_abort_done_roundtrip()

void test_abort_done_roundtrip ( )

◆ test_actuator_command_empty_list()

void test_actuator_command_empty_list ( )

Definition at line 182 of file test_packet_roundtrip.cpp.

References daq::create_actuator_command_packet().

Referenced by main().

◆ test_actuator_command_roundtrip()

void test_actuator_command_roundtrip ( )

◆ test_actuator_config_no_pts()

void test_actuator_config_no_pts ( )

◆ test_actuator_config_roundtrip()

void test_actuator_config_roundtrip ( )

◆ test_board_heartbeat_buffer_too_small()

void test_board_heartbeat_buffer_too_small ( )

Definition at line 49 of file test_packet_roundtrip.cpp.

References daq::create_board_heartbeat_packet().

Referenced by main().

◆ test_board_heartbeat_parse_wrong_type()

void test_board_heartbeat_parse_wrong_type ( )

◆ test_board_heartbeat_roundtrip()

void test_board_heartbeat_roundtrip ( )

Packet round-trip unit tests — DAQv2-Comms serialization / parsing.

For each packet type: create → parse → verify all fields match. Also tests buffer-too-small and edge cases.

Definition at line 24 of file test_packet_roundtrip.cpp.

References daq::ACTIVE, daq::BOARD_HEARTBEAT, daq::create_board_heartbeat_packet(), daq::FIRING, and daq::parse_board_heartbeat_packet().

Referenced by main().

◆ test_log_packet_buffer_too_small()

void test_log_packet_buffer_too_small ( )

Definition at line 475 of file test_packet_roundtrip.cpp.

References daq::create_log_packet().

Referenced by main().

◆ test_log_packet_layout()

void test_log_packet_layout ( )

Definition at line 456 of file test_packet_roundtrip.cpp.

References daq::create_log_packet(), and daq::LOGS.

Referenced by main().

◆ test_log_packet_parse_truncated()

void test_log_packet_parse_truncated ( )

Definition at line 503 of file test_packet_roundtrip.cpp.

References daq::create_log_packet(), and daq::parse_log_packet().

Referenced by main().

◆ test_log_packet_parse_wrong_type()

void test_log_packet_parse_wrong_type ( )

Definition at line 519 of file test_packet_roundtrip.cpp.

References daq::create_board_heartbeat_packet(), and daq::parse_log_packet().

Referenced by main().

◆ test_log_packet_roundtrip()

void test_log_packet_roundtrip ( )

Definition at line 482 of file test_packet_roundtrip.cpp.

References daq::create_log_packet(), daq::LOGS, and daq::parse_log_packet().

Referenced by main().

◆ test_parse_null_buffer()

void test_parse_null_buffer ( )

◆ test_pwm_actuator_roundtrip()

void test_pwm_actuator_roundtrip ( )

Definition at line 193 of file test_packet_roundtrip.cpp.

References daq::create_pwm_actuator_packet(), and daq::parse_pwm_actuator_packet().

Referenced by main().

◆ test_self_test_adc_bad()

void test_self_test_adc_bad ( )

Definition at line 394 of file test_packet_roundtrip.cpp.

References daq::create_self_test_packet(), and daq::parse_self_test_packet().

Referenced by main().

◆ test_self_test_roundtrip()

void test_self_test_roundtrip ( )

Definition at line 368 of file test_packet_roundtrip.cpp.

References daq::create_self_test_packet(), daq::parse_self_test_packet(), and result.

Referenced by main().

◆ test_sensor_config_empty_sensors()

void test_sensor_config_empty_sensors ( )

◆ test_sensor_config_roundtrip_with_abort()

void test_sensor_config_roundtrip_with_abort ( )

◆ test_sensor_config_roundtrip_without_abort()

void test_sensor_config_roundtrip_without_abort ( )

◆ test_sensor_data_buffer_too_small()

void test_sensor_data_buffer_too_small ( )

◆ test_sensor_data_roundtrip()

void test_sensor_data_roundtrip ( )

◆ test_server_heartbeat_roundtrip()

void test_server_heartbeat_roundtrip ( )