GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> CTDB / V5-5-5 > ctdb_unit_test / mv2304
#include <PBS/RW.h>
#define CO1553_ARG_VALUE_0 (void*) 0x12345678 |
A dummy value passed to the memory allocation callbacks. Used to check that callback arg passing is working correctly.
Referenced by co1553_bc_test_cmd_rx(), co1553_bc_test_param(), co1553_hkp_0(), co1553_pkt_free(), co1553_rt_test_cmd_tx(), co1553_rt_test_param(), and co1553_rt_test_telem().
#define CO1553_ARG_VALUE_1 (void*) 0xabcd0123 |
A dummy value passed to the memory allocation callbacks. Used to check that callback arg passing is working correctly.
Referenced by co1553_hkp_1(), and co1553_rt_test_telem().
int co1553_bc_sim_test_param | ( | void | ) |
Performs invalid and out of range tests on parameters for co1553_bc_sim library functions.
0 | Success. | |
-1 | Failure |
References CO1553_bcSimExit(), CO1553_bcSimInit(), CO1553_bcSimPktCmdRxSend(), CO1553_bcSimPktCmdTxRecv(), CO1553_bcSimPktTelemRecv(), CO1553_bcSimSizeof(), CO1553_bcSimStart(), CO1553_bcSimStop(), and sepStr.
Referenced by ctdb_unit_test().
int co1553_bc_sim_test_sizeof | ( | void | ) |
Performs checks on return values from co1553_bc_sim sizeof library functions.
0 | Success. | |
-1 | Failure |
References CO1553_bcSimSizeof().
Referenced by ctdb_unit_test().
int co1553_bc_test_cmd_rx | ( | void | ) |
Performs functional test of telecommand receive interface.
0 | Success. | |
-1 | Failure |
References CO1553_ARG_VALUE_0, CO1553_bcCmdRxExit(), CO1553_bcCmdRxInit(), CO1553_bcCmdRxMsg(), CO1553_bcCmdRxPktSend(), CO1553_bcCmdRxSizeof(), co1553_cmd_rx_msg_0, co1553_cmd_rx_msg_1, co1553_cmd_rx_msg_2, co1553_cmd_rx_pkt_0, co1553_cmd_rx_pkt_0_size, co1553_cmd_rx_pkt_1, co1553_cmd_rx_pkt_1_size, co1553_cmd_rx_pkt_2, co1553_cmd_rx_pkt_2_size, co1553_mem_copy(), CO1553_MSG_WORDS, co1553_pkt_free(), sepStr, and sepStr2.
Referenced by ctdb_unit_test().
int co1553_bc_test_cmd_tx | ( | void | ) |
Performs functional test of telecommand receive interface.
0 | Success. | |
-1 | Failure |
References CO1553_bcCmdTxExit(), CO1553_bcCmdTxInit(), CO1553_bcCmdTxMsg(), CO1553_bcCmdTxPktFree(), CO1553_bcCmdTxPktRecv(), CO1553_bcCmdTxSizeof(), co1553_cmd_tx_msg_0, co1553_cmd_tx_msg_1, co1553_cmd_tx_msg_2, co1553_cmd_tx_pkt_0, co1553_cmd_tx_pkt_1, co1553_cmd_tx_pkt_2, co1553_mem_copy(), sepStr, and sepStr2.
Referenced by ctdb_unit_test().
int co1553_bc_test_param | ( | void | ) |
Performs invalid and out of range tests on parameters for co1553_bc library functions.
0 | Success. | |
-1 | Failure |
References CO1553_ARG_VALUE_0, CO1553_bcCmdRxExit(), CO1553_bcCmdRxInit(), CO1553_bcCmdRxPktSend(), CO1553_bcCmdRxSizeof(), CO1553_bcCmdTxExit(), CO1553_bcCmdTxInit(), CO1553_bcCmdTxPktFree(), CO1553_bcCmdTxPktRecv(), CO1553_bcCmdTxSizeof(), CO1553_bcTelemExit(), CO1553_bcTelemInit(), CO1553_bcTelemPktFree(), CO1553_bcTelemPktRecv(), CO1553_bcTelemSizeof(), co1553_pkt_free(), and sepStr.
Referenced by ctdb_unit_test().
int co1553_bc_test_sizeof | ( | void | ) |
Performs checks on return values from co1553_bc sizeof library functions.
0 | Success. | |
-1 | Failure |
References CO1553_bcCmdRxSizeof(), CO1553_bcCmdTxSizeof(), and CO1553_bcTelemSizeof().
Referenced by ctdb_unit_test().
int co1553_bc_test_telem | ( | void | ) |
Performs functional test of telemetry interface.
0 | Success. | |
-1 | Failure |
References CO1553_bcTelemExit(), CO1553_bcTelemInit(), CO1553_bcTelemMsg(), CO1553_bcTelemPktFree(), CO1553_bcTelemPktRecv(), CO1553_bcTelemSizeof(), co1553_hkp_pkt_0, co1553_mem_copy(), CO1553_MSG_WORDS, co1553_telem_msg_0, co1553_telem_msg_1, co1553_telem_pkt_0, co1553_telem_pkt_1, co1553_telem_pkt_2, sepStr, and sepStr2.
Referenced by ctdb_unit_test().
void co1553_mem_copy | ( | void * | dest, | |
void * | src, | |||
unsigned int | numWord | |||
) |
Memory copy function used for the unit tests.
dest | The destination address. | |
src | The source address. | |
numWord | The number of 16-bit words to copy. |
Referenced by co1553_bc_test_cmd_rx(), co1553_bc_test_cmd_tx(), co1553_bc_test_telem(), co1553_rt_test_cmd_rx(), co1553_rt_test_cmd_tx(), co1553_rt_test_err(), and co1553_rt_test_telem().
void co1553_pkt_free | ( | void * | pkt, | |
void * | arg | |||
) |
Memory release function used for the unit tests.
pkt | A pointer to the packet buffer to free. | |
arg | A user defined argument. |
References CO1553_ARG_VALUE_0.
Referenced by co1553_bc_test_cmd_rx(), co1553_bc_test_param(), co1553_rt_test_cmd_tx(), co1553_rt_test_param(), and co1553_rt_test_telem().
int co1553_rt_sim_test_param | ( | void | ) |
Performs invalid and out of range tests on parameters for co1553_rt_sim library functions.
0 | Success. | |
-1 | Failure |
References CO1553_rtSimExit(), CO1553_rtSimHkpGet(), CO1553_rtSimHkpSet(), CO1553_rtSimInit(), CO1553_rtSimPktCmdRxRecv(), CO1553_rtSimPktCmdTxSend(), CO1553_rtSimPktTelemSend(), CO1553_rtSimSizeof(), CO1553_rtSimStart(), CO1553_rtSimStop(), and sepStr.
Referenced by ctdb_unit_test().
int co1553_rt_sim_test_sizeof | ( | void | ) |
Performs checks on return values from co1553_rt_sim sizeof library functions.
0 | Success. | |
-1 | Failure |
References CO1553_rtSimSizeof().
Referenced by ctdb_unit_test().
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().
unsigned short co1553_cmd_rx_msg_0[] |
A sample 1553 cmd receive message
Sample 1553 telecommand receive data message. Contains one CCSDS telecommand packet.
APID = 0x640, FC=0, SF=NONE, SC=0, LEN=32
Referenced by co1553_bc_test_cmd_rx(), and co1553_rt_test_cmd_rx().
unsigned short co1553_cmd_rx_msg_1[] |
A sample 1553 cmd receive message
Sample 1553 telecommand receive data message. Contains one CCSDS telecommand packet.
APID = 0x641, FC=3, SF=FIRST, SC=10, LEN=54
Referenced by co1553_bc_test_cmd_rx(), and co1553_rt_test_cmd_rx().
unsigned short co1553_cmd_rx_msg_2[] |
A sample 1553 cmd receive message
Sample 1553 telecommand receive data message. Contains one CCSDS telecommand packet.
APID = 0x642, FC=2, SF=NONE, SC=1, LEN=2
Referenced by co1553_bc_test_cmd_rx(), and co1553_rt_test_cmd_rx().
unsigned short co1553_cmd_rx_msg_3[] |
A sample 1553 cmd receive message
Sample 1553 telecommand receive data message. Contains bogus information - no CCSDS packet header.
Referenced by co1553_rt_test_err().
unsigned short co1553_cmd_rx_msg_4[] |
A sample 1553 cmd receive message
Sample 1553 telecommand receive data message. Contains one CCSDS telecommand packet with out of range length
APID = 0x642, FC=2, SF=NONE, SC=1, LEN=100
Referenced by co1553_rt_test_err().
unsigned short co1553_cmd_rx_pkt_0[] |
A sample 1553 cmd receive packet
Sample CCSDS telecommand packet.
APID = 0x640, FC=0, SF=NONE, SC=0, LEN=32
Referenced by co1553_bc_test_cmd_rx(), and co1553_rt_test_cmd_rx().
unsigned int co1553_cmd_rx_pkt_0_size |
The size in bytes of co1553_cmd_rx_pkt_0.
unsigned short co1553_cmd_rx_pkt_1[] |
A sample 1553 cmd receive packet
Sample CCSDS telecommand packet.
APID = 0x641, FC=3, SF=FIRST, SC=10, LEN=54
Referenced by co1553_bc_test_cmd_rx(), and co1553_rt_test_cmd_rx().
unsigned int co1553_cmd_rx_pkt_1_size |
The size in bytes of co1553_cmd_rx_pkt_1.
unsigned short co1553_cmd_rx_pkt_2[] |
A sample 1553 cmd receive packet
Sample CCSDS telecommand packet.
APID = 0x642, FC=2, SF=NONE, SC=1, LEN=2
Referenced by co1553_bc_test_cmd_rx(), and co1553_rt_test_cmd_rx().
unsigned int co1553_cmd_rx_pkt_2_size |
The size in bytes of co1553_cmd_rx_pkt_2.
unsigned short co1553_cmd_tx_msg_0[] |
A sample cmd transmit msg
Sample 1553 telecommand transmit msg. Contains on CCSDS telecommand packet.
APID = 0x600, FC=0, SF=NONE, SC=0, LEN=32
Referenced by co1553_bc_test_cmd_tx(), and co1553_rt_test_cmd_tx().
unsigned short co1553_cmd_tx_msg_1[] |
A sample cmd transmit msg
Sample 1553 telecommand transmit msg. Contains on CCSDS telecommand packet.
APID = 0x601, FC=3, SF=FIRST, SC=10, LEN=54
Referenced by co1553_bc_test_cmd_tx(), and co1553_rt_test_cmd_tx().
unsigned short co1553_cmd_tx_msg_2[] |
A sample cmd transmit msg
Sample 1553 telecommand transmit msg. Contains on CCSDS telecommand packet.
APID = 0x602, FC=2, SF=NONE, SC=1, LEN=2
Referenced by co1553_bc_test_cmd_tx(), and co1553_rt_test_cmd_tx().
unsigned short co1553_cmd_tx_pkt_0[] |
A sample cmd transmit packet
Sample 1553 telecommand transmit packet.
APID = 0x600, FC=0, SF=NONE, SC=0, LEN=32
Referenced by co1553_bc_test_cmd_tx(), and co1553_rt_test_cmd_tx().
unsigned int co1553_cmd_tx_pkt_0_size |
The size of co1553_cmd_tx_pkt_0
The size in bytes of co1553_cmd_tx_pkt_0.
Referenced by co1553_rt_test_cmd_tx().
unsigned short co1553_cmd_tx_pkt_1[] |
A sample cmd transmit packet
Sample 1553 telecommand transmit packet.
APID = 0x601, FC=3, SF=FIRST, SC=10, LEN=54
Referenced by co1553_bc_test_cmd_tx(), and co1553_rt_test_cmd_tx().
unsigned int co1553_cmd_tx_pkt_1_size |
The size of co1553_cmd_tx_pkt_1
The size in bytes of co1553_cmd_tx_pkt_1.
Referenced by co1553_rt_test_cmd_tx().
unsigned short co1553_cmd_tx_pkt_2[] |
A sample cmd transmit packet
Sample 1553 telecommand transmit packet.
APID = 0x602, FC=2, SF=NONE, SC=1, LEN=2
Referenced by co1553_bc_test_cmd_tx(), and co1553_rt_test_cmd_tx().
unsigned int co1553_cmd_tx_pkt_2_size |
The size of co1553_cmd_tx_pkt_2
The size in bytes of co1553_cmd_tx_pkt_2.
Referenced by co1553_rt_test_cmd_tx().
unsigned short co1553_hkp_pkt_0[] |
A sample houskeeping telemetry packet
Sample 1553 telemetry HKP packet.
APID = 0x210, SF=NONE, SC=1, LEN=102, SEC=100, SSEC=0
Referenced by co1553_bc_test_telem(), and co1553_hkp_0().
unsigned int co1553_hkp_pkt_0_size |
unsigned short co1553_hkp_pkt_1[] |
A sample houskeeping telemetry packet
Sample 1553 telemetry HKP packet.
APID = 0x210, SF=NONE, SC=1, LEN=102, SEC=100, SSEC=0
Referenced by co1553_hkp_1().
unsigned int co1553_hkp_pkt_1_size |
unsigned short co1553_telem_msg_0[] |
A sample telemetry message block.
Sample 1553 telemetry message block. Contains 2 CCSDS telemetry packets.
Referenced by co1553_bc_test_telem(), and co1553_rt_test_telem().
unsigned short co1553_telem_msg_1[] |
A sample telemetry message block.
Sample 1553 telemetry message block. Contains 5 CCSDS telemetry packets.
Referenced by co1553_bc_test_telem(), and co1553_rt_test_telem().
unsigned short co1553_telem_msg_2[] |
A sample telemetry message block.
Sample 1553 telemetry message block. Contains 2 CCSDS telemetry packets.
Referenced by co1553_rt_test_telem().
unsigned short co1553_telem_msg_3[] |
A sample telemetry message block.
Sample 1553 telemetry message block. Contains 2 CCSDS telemetry packets.
Referenced by co1553_rt_test_telem().
unsigned short co1553_telem_pkt_0[] |
A sample diagonostics telemetry packet
Sample 1553 telemetry packet.
APID = 0x260, SF=NONE, SC=5, LEN=800, SEC=400, SSEC=1000
Referenced by co1553_bc_test_telem(), and co1553_rt_test_telem().
unsigned int co1553_telem_pkt_0_size |
The size of co1553_telem_pkt_0
The size in bytes of co1553_telem_pkt_0.
Referenced by co1553_rt_test_telem().
unsigned short co1553_telem_pkt_1[] |
A sample diagonostics telemetry packet
Sample 1553 telemetry packet.
APID = 0x261, SF=MID, SC=20, LEN=20, SEC=500, SSEC=10000
Referenced by co1553_bc_test_telem(), and co1553_rt_test_telem().
unsigned int co1553_telem_pkt_1_size |
The size of co1553_telem_pkt_1
The size in bytes of co1553_telem_pkt_1.
Referenced by co1553_rt_test_telem().
unsigned short co1553_telem_pkt_2[] |
A sample diagonostics telemetry packet
Sample 1553 telemetry packet.
APID = 0x265, SF=LAST, SC=21, LEN=12, SEC=500, SSEC=100004
Referenced by co1553_bc_test_telem(), and co1553_rt_test_telem().
unsigned int co1553_telem_pkt_2_size |
The size of co1553_telem_pkt_2
The size in bytes of co1553_telem_pkt_2.
Referenced by co1553_rt_test_telem().
RW_ctl diagLock |
A RW lock for protecting diagnostics structure.
Referenced by co1553_rt_test_cmd_rx(), co1553_rt_test_cmd_tx(), co1553_rt_test_err(), co1553_rt_test_telem(), and ctdb_unit_test().
const char* sepStr |
A display separator line.
Referenced by co1553_bc_sim_test_param(), co1553_bc_test_cmd_rx(), co1553_bc_test_cmd_tx(), co1553_bc_test_param(), co1553_bc_test_telem(), co1553_diag(), co1553_rt_sim_test_param(), co1553_rt_test_cmd_rx(), co1553_rt_test_cmd_tx(), co1553_rt_test_err(), co1553_rt_test_param(), co1553_rt_test_telem(), and ctdb_unit_test().
const char* sepStr2 |
A display separator line.
Referenced by co1553_bc_test_cmd_rx(), co1553_bc_test_cmd_tx(), co1553_bc_test_telem(), co1553_rt_test_cmd_rx(), co1553_rt_test_cmd_tx(), co1553_rt_test_err(), and co1553_rt_test_telem().