GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> CTDB / V5-5-5 > ctdb_unit_test / mv2304
#include <stdio.h>
#include <string.h>
#include <CTDB/CO1553_rt.h>
#include <CTDB/CO1553_util.h>
#include <CCSDS/CCSDS_pkt.h>
#include <CCSDS/CCSDS_dump.h>
#include <PBS/TOC.h>
#include <PBS/MBA.h>
#include <MSG/MSG_pubdefs.h>
#include <ctdb_unit_test_private.h>
Functions | |
static unsigned int | co1553_hkp_0 (void *buf, void *arg) |
static unsigned int | co1553_hkp_1 (void *buf, void *arg) |
static void | co1553_diag (CO1553_RT_Diag *diag, int count) |
int | co1553_rt_test_sizeof (void) |
int | co1553_rt_test_param (void) |
int | co1553_rt_test_cmd_rx (void) |
int | co1553_rt_test_cmd_tx (void) |
int | co1553_rt_test_telem (void) |
int | co1553_rt_test_err (void) |
static void co1553_diag | ( | CO1553_RT_Diag * | diag, | |
int | count | |||
) | [static] |
Prints out diagnostics counters.
diag | A pointer to the diagnostics structure. | |
count | The count number to display. |
References _CO1553_RT_Diag::cmd_rx_byte_count, _CO1553_RT_Diag::cmd_rx_pkt_count, _CO1553_RT_Diag::cmd_tx_byte_count, _CO1553_RT_Diag::cmd_tx_pkt_count, _CO1553_RT_Diag::error_count, _CO1553_RT_Diag::hkp_byte_count, _CO1553_RT_Diag::hkp_pkt_count, sepStr, _CO1553_RT_Diag::telem_byte_count, and _CO1553_RT_Diag::telem_pkt_count.
Referenced by co1553_rt_test_cmd_rx(), co1553_rt_test_cmd_tx(), co1553_rt_test_err(), and co1553_rt_test_telem().
static unsigned int co1553_hkp_0 | ( | void * | buf, | |
void * | arg | |||
) | [static] |
HKP insertion callback function used for the unit tests.
buf | A pointer to the HKP packet buffer. | |
arg | A user defined argument. |
References CO1553_ARG_VALUE_0, co1553_hkp_pkt_0, and co1553_hkp_pkt_0_size.
Referenced by co1553_rt_test_param(), and co1553_rt_test_telem().
static unsigned int co1553_hkp_1 | ( | void * | buf, | |
void * | arg | |||
) | [static] |
HKP insertion callback function used for the unit tests.
buf | A pointer to the HKP packet buffer. | |
arg | A user defined argument. |
References CO1553_ARG_VALUE_1, co1553_hkp_pkt_1, and co1553_hkp_pkt_1_size.
Referenced by co1553_rt_test_telem().
int co1553_rt_test_cmd_rx | ( | void | ) |
Performs functional test of telecommand receive interface.
0 | Success. | |
-1 | Failure |
References co1553_cmd_rx_msg_0, co1553_cmd_rx_msg_1, co1553_cmd_rx_msg_2, co1553_cmd_rx_pkt_0, co1553_cmd_rx_pkt_1, co1553_cmd_rx_pkt_2, co1553_diag(), co1553_mem_copy(), CO1553_rtCmdRxExit(), CO1553_rtCmdRxInit(), CO1553_rtCmdRxMsg(), CO1553_rtCmdRxPktFree(), CO1553_rtCmdRxPktRecv(), CO1553_rtCmdRxSizeof(), diagLock, sepStr, and sepStr2.
Referenced by ctdb_unit_test().
int co1553_rt_test_cmd_tx | ( | void | ) |
Performs functional test of telecommand transmit interface.
0 | Success. | |
-1 | Failure |
References CO1553_ARG_VALUE_0, co1553_cmd_tx_msg_0, co1553_cmd_tx_msg_1, co1553_cmd_tx_msg_2, co1553_cmd_tx_pkt_0, co1553_cmd_tx_pkt_0_size, co1553_cmd_tx_pkt_1, co1553_cmd_tx_pkt_1_size, co1553_cmd_tx_pkt_2, co1553_cmd_tx_pkt_2_size, co1553_diag(), co1553_mem_copy(), CO1553_MSG_WORDS, co1553_pkt_free(), CO1553_rtCmdTxExit(), CO1553_rtCmdTxInit(), CO1553_rtCmdTxMsg(), CO1553_rtCmdTxPktSend(), CO1553_rtCmdTxSizeof(), diagLock, sepStr, and sepStr2.
Referenced by ctdb_unit_test().
int co1553_rt_test_err | ( | void | ) |
Performs test of telecommand receive exception conditions.
0 | Success. | |
-1 | Failure |
References co1553_cmd_rx_msg_3, co1553_cmd_rx_msg_4, co1553_diag(), co1553_mem_copy(), CO1553_rtCmdRxExit(), CO1553_rtCmdRxInit(), CO1553_rtCmdRxMsg(), CO1553_rtCmdRxPktRecv(), CO1553_rtCmdRxSizeof(), diagLock, sepStr, and sepStr2.
Referenced by ctdb_unit_test().
int co1553_rt_test_param | ( | void | ) |
Performs invalid and out of range tests on parameters for co1553_rt library functions.
0 | Success. | |
-1 | Failure |
References CO1553_ARG_VALUE_0, co1553_hkp_0(), co1553_pkt_free(), CO1553_RT_PRIORITY_HIGH, CO1553_rtCmdRxExit(), CO1553_rtCmdRxInit(), CO1553_rtCmdRxPktFree(), CO1553_rtCmdRxPktRecv(), CO1553_rtCmdRxSizeof(), CO1553_rtCmdTxExit(), CO1553_rtCmdTxInit(), CO1553_rtCmdTxPktSend(), CO1553_rtCmdTxSizeof(), CO1553_rtTelemExit(), CO1553_rtTelemHkpGet(), CO1553_rtTelemHkpSet(), CO1553_rtTelemInit(), CO1553_rtTelemPktSend(), CO1553_rtTelemSizeof(), and sepStr.
Referenced by ctdb_unit_test().
int co1553_rt_test_sizeof | ( | void | ) |
Performs checks on return values from co1553_rt sizeof library functions.
0 | Success. | |
-1 | Failure |
References CO1553_rtCmdRxSizeof(), CO1553_rtCmdTxSizeof(), and CO1553_rtTelemSizeof().
Referenced by ctdb_unit_test().
int co1553_rt_test_telem | ( | void | ) |
Performs functional test of telemetry interface.
0 | Success. | |
-1 | Failure |
References CO1553_ARG_VALUE_0, CO1553_ARG_VALUE_1, co1553_diag(), co1553_hkp_0(), co1553_hkp_1(), co1553_mem_copy(), CO1553_MSG_WORDS, co1553_pkt_free(), CO1553_RT_PRIORITY_HIGH, CO1553_RT_PRIORITY_LOW, CO1553_rtTelemExit(), CO1553_rtTelemHkpGet(), CO1553_rtTelemHkpSet(), CO1553_rtTelemInit(), CO1553_rtTelemMsg(), CO1553_rtTelemPktSend(), CO1553_rtTelemSizeof(), co1553_telem_msg_0, co1553_telem_msg_1, co1553_telem_msg_2, co1553_telem_msg_3, co1553_telem_pkt_0, co1553_telem_pkt_0_size, co1553_telem_pkt_1, co1553_telem_pkt_1_size, co1553_telem_pkt_2, co1553_telem_pkt_2_size, diagLock, sepStr, and sepStr2.
Referenced by ctdb_unit_test().