GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > SIIS / V0-0-1
Constituent: siis_moc_test     Tag: sun-gcc
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "CCSDS/CCSDS_pkt.h"
#include "CCSDS/CCSDS_pri.h"
#include "MSG/MSG_pubdefs.h"
#include "MSG/MSG_printProc.h"
#include "PBS/PBS.h"
#include "PBS/TASK.h"
#include "SIIS/SIIS_moc.h"
Include dependency graph for siis_moc_test.c:
Data Structures | |
struct | _Pdu_Buf_Wrapper |
struct | _Pdu_Hdr_Wrapper |
struct | _test_Test_Descriptor |
Description of a test state. More... | |
Defines | |
#define | DIM(a) (sizeof (a) / sizeof ((a)[0])) |
Dimension of an array. | |
Typedefs | |
typedef _test_Test_Descriptor | test_Test_Descriptor |
Typedef for _test_Test_Descriptor. | |
typedef _Pdu_Hdr_Wrapper | Pdu_Hdr_Wrapper |
typedef _Pdu_Buf_Wrapper | Pdu_Buf_Wrapper |
Functions | |
void | show_banner (const char *desc_1, const char *desc_2) |
Display a message as a banner. | |
void | show_at_level (const int level, const char *item_1, const char *item_2) |
Display text with indentation. | |
void | test_Push_State (test_Test_Descriptor *td_p, const char *desc) |
Enter a new test state. | |
void | test_Pop_State (test_Test_Descriptor *td_p) |
Return for a test state. | |
void | show_desc_stack (const test_Test_Descriptor *td_p) |
Display the current state decription stack. | |
unsigned int | start_message_system (void) |
unsigned int | stop_message_system (void) |
int | test_Status_Compare (const test_Test_Descriptor *td_p, const unsigned int expect, const unsigned int actual, const char *func) |
Check a status value returned from a library function. | |
int | test_Value32_Compare (const test_Test_Descriptor *td_p, const unsigned int expect, const unsigned int actual, const char *desc) |
Check a 32-bit value. | |
int | test_String_Compare (const test_Test_Descriptor *td_p, const unsigned int expect_bytes, const char *expect, const unsigned int actual_bytes, const char *actual, const char *desc) |
Check a string. | |
int | test_Memory_Compare (const test_Test_Descriptor *td_p, const void *expect, const void *actual, const size_t num_bytes) |
Verify the contents of a buffer in memory. | |
int | test_pdu_get_hdr (test_Test_Descriptor *td_p, const unsigned char *hdr_buf, const unsigned int hdr_buf_bytes, Pdu_Hdr_Wrapper *wrapper, const unsigned int exp_status, const unsigned int exp_frame_version, const unsigned int exp_frame_spacecraft, const unsigned int exp_frame_channel, const unsigned int exp_frame_err_enabled, const unsigned int exp_frame_crc_error, const unsigned int exp_frame_hdr_error, const unsigned int exp_frame_seq_error, const unsigned int exp_rs_err_enabled, const unsigned int exp_rs_error, const unsigned int exp_rs_corrected, const unsigned int exp_pkt_hdr_error, const unsigned int exp_pkt_seq_error, const unsigned int exp_pkt_incomplete, const unsigned int exp_fill_offset, const unsigned int exp_direction, const unsigned int exp_time_format, const unsigned int exp_rcv_time_hi, const unsigned int exp_rcv_time_lo, const char *test_name) |
void | siis_mocGetHdr_test (test_Test_Descriptor *td_p, const unsigned int bit_mask) |
SIIS_mocGetHdr subtest. | |
int | test_pdu_put_hdr (test_Test_Descriptor *td_p, Pdu_Buf_Wrapper *wrapper, const unsigned int hdr_buf_bytes, const SIIS_Pdu_Hdr *hdr_info, const unsigned int exp_status, const unsigned char *exp_hdr_buf, const char *test_name) |
void | siis_mocPutHdr_test (test_Test_Descriptor *td_p, const unsigned int bit_mask) |
SIIS_mocPutHdr subtest. | |
int | siis_moc_test () |
The test entry point. | |
int | main (void) |
The application entry point. |
CVS $Id: siis_moc_test.c,v 1.1.1.1 2004/12/01 20:57:09 dmay Exp $
Test the functions within the SIIS_moc constituient. Included in this file is the test 'main', which configures the test environment, invokes individual subtests, and reports status. The actual subtests are also included in this file, but should be moved to separate source files if their number increases.
This file includes some support functions that can be used by the subtests to compare actual and expected values, and to display various types of information and status. By passing all user output through these support functions, the output mechanism can be modified without affecting the subtest source code (e.g. changing printf to fprintf).
|
The typedef for _Pdu_Buf_Wrapper. |
|
The typedef for _Pdu_Hdr_Wrapper. |
|
The application entry point.
|
Here is the call graph for this function:
|
Display text with indentation. Display test with indentation appropriate for the specified test state level.
|
|
Display a message as a banner.
|
|
Display the current state decription stack. Display all the state descriptions on the test's state stack.
|
Here is the call graph for this function:
|
The test entry point. Configures the test environment, runs the various subtests, collects the status values, and displays the results.
|
Here is the call graph for this function:
|
SIIS_mocGetHdr subtest. Test the SIIS_mocGetHdr function.
|
Here is the call graph for this function:
|
SIIS_mocPutHdr subtest. Test the SIIS_mocPutHdr function.
|
Here is the call graph for this function:
|
Start the messaging system.
|
|
Stop the messaging system.
|
|
Verify the contents of a buffer in memory. This function verifies the contents of a memory buffer and reports an error if the values are not as expected.
|
Here is the call graph for this function:
|
Call the SIIS_mocGetHdr library function and verify the status and returned record values.
|
Here is the call graph for this function:
|
Call the SIIS_mocPutHdr library function and verify the status and returned buffer values.
|
Here is the call graph for this function:
|
Return for a test state. Pop a test state description from a test's state stack.
|
Here is the call graph for this function:
|
Enter a new test state. Push a new test state description onto a test's state stack. This state stack provides a trace of the execution of the test.
|
Here is the call graph for this function:
|
Check a status value returned from a library function. Compare actual and expected status values returned from a function and display a message if they differ.
|
Here is the call graph for this function:
|
Check a string. Compare actual and expected strings and display a message if they differ.
|
Here is the call graph for this function:
|
Check a 32-bit value. Compare actual and expected 32-bit values and display a message if they differ.
|
Here is the call graph for this function: