GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> FILE / V3-11-1 > file_unit_test / rhel4-32


Interface   Data Structures   File List   Data Fields   Globals  

file_unit_test_hdr.c File Reference

FILE package unit tests for file header software. More...

#include <stdio.h>
#include <string.h>
#include <MSG/MSG_pubdefs.h>
#include <ZLIB/zlib.h>
#include <PBS/MBA.h>
#include <FBS/FBS_pubrtos.h>
#include <FBS/FBS_swap.h>
#include <FBS/FBS_msgs.h>
#include <FBS_prvrtos.h>
#include <file_unit_test_private.h>

Functions

int file_hdr_test_sizeof (void)
int file_hdr_test_param (void)
int file_hdr_test_verify (void)
int file_hdr_test_set (void)
int file_hdr_test_get (void)

Variables

const unsigned short file_hdr_buf_1 []
const unsigned short file_hdr_buf_2 []
const unsigned short file_hdr_buf_3 []
const unsigned char file_hdr_buf_4 []
unsigned char * file_hdr_buf_0
static const char * dumpLine


Detailed Description

FILE package unit tests for file header software.

Author:
D.L. Wood

Function Documentation

int file_hdr_test_get ( void   ) 

Test that the file_hdr member get functions correctly extract values for file headers.

Return values:
0 Success.
-1 Failure

References file_hdr_buf_1, and file_hdr_buf_2.

Referenced by file_unit_test().

int file_hdr_test_param ( void   ) 

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

Return values:
0 Success.
-1 Failure

References dumpLine, and file_hdr_buf_0.

Referenced by file_unit_test().

int file_hdr_test_set ( void   ) 

Test that the file_hdr header member set functions correctly create and insert values for file headers.

Return values:
0 Success.
-1 Failure

References dumpLine, and file_hdr_buf_0.

Referenced by file_unit_test().

int file_hdr_test_sizeof ( void   ) 

Performs checks on return values from file_hdr sizeof library functions.

Return values:
0 Success.
-1 Failure

Referenced by file_unit_test().

int file_hdr_test_verify ( void   ) 

Test that the file_hdr verification functions detect valid LAT file headers and reject invalid LAT file headers.

Return values:
0 Success.
-1 Failure

References dumpLine, file_hdr_buf_0, file_hdr_buf_3, and file_hdr_buf_4.

Referenced by file_unit_test().


Variable Documentation

dumpLine [static]

Initial value:

 
        "-------------------------------------------------------------------------------\n"
A separator line for display.

unsigned char* file_hdr_buf_0

A pointer to a scratch file header buffer.

Referenced by file_hdr_test_param(), file_hdr_test_set(), file_hdr_test_verify(), file_swap_test_swap(), and file_unit_test().

const unsigned short file_hdr_buf_1[]

A binary image of known file header for checking header get functions.

header checksum = 0x5c1e0679 compressed = no type = 2 key = 5 file checksum = 0xa5c41861 file length = 41,619 file time = 1,066,684,216 file name = "TEST "

A binary image of known file header for checking header get functions.

Referenced by file_hdr_test_get(), and file_swap_test_swap().

const unsigned short file_hdr_buf_2[]

A binary image of known file header for checking header get functions.

header checksum = 0x71e50837 compressed = yes type = 1 key = 2 file checksum = 0xd575dfbf file length = 225,093 file time = 1,066,685,361 file name = "VXWRTOS "

A binary image of known file header for checking header get functions.

Referenced by file_hdr_test_get(), and file_swap_test_swap().

const unsigned short file_hdr_buf_3[]

A binary image of known file header for checking header get functions.

header checksum = 0x50302000 (incorrect, should be 0x5a2e0710) compressed = no type = 1 key = 1 file checksum = 0x504355a0 file length = 629,968 file time = 1,066,689,114 file name = "FILENAME"

A binary image of known file header for checking header get functions.

Referenced by file_hdr_test_verify().

const unsigned char file_hdr_buf_4[]

A binary image of known file header for checking header verify functions.

header checksum = 0x5c1e0679 compressed = no type = 2 key = 5 file checksum = 0xa5c41861 file length = 41,619 file time = 1,066,684,216 file name = "TEST "

A binary image of known file header for checking header verify functions.

Referenced by file_hdr_test_verify().


Generated on Fri Sep 30 18:57:40 2011 by  doxygen 1.5.8