GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> CTDB / V5-5-5 > ctdb_unit_test / rhel4-32


Interface   Data Structures   File List   Data Fields   Globals  

ctdb_unit_test_rt.c File Reference

CTDB package unit tests for RT protocol. More...

#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)


Detailed Description

CTDB package unit tests for RT protocol.

Author:
D.L. Wood

Function Documentation

static void co1553_diag ( CO1553_RT_Diag diag,
int  count 
) [static]

static unsigned int co1553_hkp_0 ( void *  buf,
void *  arg 
) [static]

HKP insertion callback function used for the unit tests.

Parameters:
buf A pointer to the HKP packet buffer.
arg A user defined argument.
Returns:
A pointer to the allocated memory, or NULL on error.

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.

Parameters:
buf A pointer to the HKP packet buffer.
arg A user defined argument.
Returns:
A pointer to the allocated memory, or NULL on error.

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   ) 

int co1553_rt_test_cmd_tx ( void   ) 

int co1553_rt_test_err ( void   ) 

Performs test of telecommand receive exception conditions.

Return values:
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   ) 

int co1553_rt_test_sizeof ( void   ) 

Performs checks on return values from co1553_rt sizeof library functions.

Return values:
0 Success.
-1 Failure

References CO1553_rtCmdRxSizeof(), CO1553_rtCmdTxSizeof(), and CO1553_rtTelemSizeof().

Referenced by ctdb_unit_test().

int co1553_rt_test_telem ( void   ) 


Generated on Sat Apr 9 19:05:35 2011 by  doxygen 1.5.8