Doxygen Documentation

Main Index

Package Index

Package:

CCSDS

Version:

V3-2-1

Marked:

(not marked)

Constituent:

ccsds_unit_test

Tag:

sun-gcc


Interface   Compound List   File List   Compound Members   File Members  

ccsds_unit_test.c File Reference

#include "stdio.h"
#include "stdlib.h"
#include "string.h"
#include "CCSDS/ccsds_unit_test.h"
#include "CCSDS/CCSDS_pkt.h"
#include "CCSDS/CCSDS_dump.h"
#include "CCSDS/CCSDS_swap.h"
#include "CCSDS/CCSDS_pri.h"
#include "PBI/Endianness.h"
#include "MSG/MSG_pubdefs.h"
#include "MSG/MSG_printProc.h"
#include "PBS/PBS.h"
#include "PBS/TASK.h"
#include "PBS/MBA.h"
#include "CCSDS_pkt_private.h"

Include dependency graph for ccsds_unit_test.c:

Include dependency graph

Functions

int ccsds_pkt_test_sizeof (void)
int ccsds_pkt_test_param (void)
int ccsds_pkt_test_verify (void)
int ccsds_pkt_test_set (void)
int ccsds_pkt_test_get (void)
int ccsds_pkt_test_chksum (void)
int ccsds_swap_test_swap (void)
int ccsds_pri_test_sizeof (void)
int ccsds_pri_test_param (void)
int ccsds_pri_test_verify (void)
int ccsds_pri_test_get (void)
int ccsds_unit_test (void)
int main (int argc, char **argv)

Variables

unsigned char * ccsds_pkt_cmd_buf_0
unsigned char * ccsds_pkt_telem_buf_0
unsigned short ccsds_pkt_cmd_buf_1 []
unsigned short ccsds_pkt_cmd_buf_2 []
unsigned short ccsds_pkt_cmd_buf_3 []
unsigned short ccsds_pkt_telem_buf_1 []
const char * dumpLine = "----------------------------------------------------------\n"

Detailed Description

Author:
D.L. Wood
CCSDS package unit test program. Tests the following constituents:


Function Documentation

int ccsds_pkt_test_chksum void   )  [static]
 

Test that the ccsds_pkt checksum functions correctly calculate and insert checksum values for produced CCSDS packets. Test that the verify functions detect correct and incorrect checksum values for consumed packets.

Return values:
0 Success.
-1 Failure

Here is the call graph for this function:

int ccsds_pkt_test_get void   )  [static]
 

Test that the ccsds_pkt header member get functions correctly extract values for packet headers.

Return values:
0 Success.
-1 Failure

Here is the call graph for this function:

int ccsds_pkt_test_param void   )  [static]
 

Performs invalid and out of range tests on parameters for ccsds_pkt library functions.

Return values:
0 Success.
-1 Failure

Here is the call graph for this function:

int ccsds_pkt_test_set void   )  [static]
 

Test that the ccsds_pkt header member set functions correctly create and insert values for packet headers.

Return values:
0 Success.
-1 Failure

Here is the call graph for this function:

int ccsds_pkt_test_sizeof void   )  [static]
 

Performs checks on return values from ccsds_pkt library functions.

Return values:
0 Success.
-1 Failure

Here is the call graph for this function:

int ccsds_pkt_test_verify void   )  [static]
 

Test that the ccsds_pkt header verification functions detect valid CCSDS packet headers and reject invalid CCSDS packet headers.

Return values:
0 Success.
-1 Failure

Here is the call graph for this function:

int ccsds_pri_test_get void   )  [static]
 

Test that the ccsds_pri header member get functions correctly extract values for packet headers.

Return values:
0 Success.
-1 Failure

Here is the call graph for this function:

int ccsds_pri_test_param void   )  [static]
 

Performs invalid and out of range tests on parameters for ccsds_pri library functions.

Return values:
0 Success.
-1 Failure

Here is the call graph for this function:

int ccsds_pri_test_sizeof void   )  [static]
 

Performs checks on return values from ccsds_pri library functions.

Return values:
0 Success.
-1 Failure

Here is the call graph for this function:

int ccsds_pri_test_verify void   )  [static]
 

Test that the ccsds_pri header verification functions detect valid CCSDS packet primary headers and reject invalid CCSDS packet primary headers.

Return values:
0 Success.
-1 Failure

Here is the call graph for this function:

int ccsds_swap_test_swap void   )  [static]
 

Test that the ccsds_swap byte swapping functions correctly manipulate CCSDS packet headers from external to local format.

Return values:
0 Success.
-1 Failure

Here is the call graph for this function:

int ccsds_unit_test void   ) 
 

Performs all of the unit tests associated with the CCSDS package. Tests the following constituents:

  • ccsds_pkt
  • ccsds_swap
  • ccsds_pri

Return values:
0 Success.
-1 Failure

Here is the call graph for this function:

int main int  argc,
char **  argv
 

The UNIX application entry point.

Parameters:
argc The number of command line args.
argv The list of command line args.
Return values:
0 Success.
-1 Failure.

Here is the call graph for this function:


Variable Documentation

ccsds_pkt_cmd_buf_0 [static]
 

A pointer to a scratch telecommand header buffer.

ccsds_pkt_cmd_buf_1 [static]
 

Initial value:

{
        0x18b7,
        0x8345,
        0x0101,
        0x0ac7,
}
A binary image of a known telecommand header for checking packet header and checksum functions.

version = 1
type = telecommand
sec header = true
apid = 0xb7
seq flags = last
seq count = 0x345
length = 257
func code = 0xac7

ccsds_pkt_cmd_buf_2 [static]
 

Initial value:

 
{
        0x1801,
        0xc040,
        0x0003,
        0x5634,
        0x01a6,
}
A binary image of a known telecommand header for checking packet header and checksum functions.

version = 1
type = telecommand
sec header = true
apid = 0x1
seq flags = none
seq count = 0x40
length = 2
func code = 0x5634
checksum = 0x01a6

ccsds_pkt_cmd_buf_3 [static]
 

Initial value:

 
{
        0x1804,
        0xf90b,
        0x0001,
        0x1000,
        0x0000,
}
A binary image of a known telecommand header for checking packet header and checksum functions. version = 1
type = telecommand
sec header = true
apid = 0x4
seq flags = none
seq count = 0x390b
length = 0
func code = 0x1000
checksum = 0x0000 (incorrect, actual checksum = 0x131)

ccsds_pkt_telem_buf_0 [static]
 

A pointer to a scratch telemetry header buffer.

ccsds_pkt_telem_buf_1 [static]
 

Initial value:

 
{
        0x0898,
        0x0051,
        0x000f,
        0x3487,
        0xef21,
        0x0002,
        0x432a,
}
A binary image of a known telemetry header for checking packet header and checksum functions.

version = 1
type = telemetry
sec header = true
apid = 0x98
seq flags = middle
seq count = 0x51
length = 15
time sec = 0x3487ef21 time subsec = 0x2432a

dumpLine = "----------------------------------------------------------\n" [static]
 

A separator line for display.


Generated on Sun Apr 11 05:26:45 2004 by doxygen 1.3.3