GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > FILE / V3-10-1

Constituent: file_unit_test     Tag: linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

file_unit_test_upl.c File Reference

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

#include "stdio.h"
#include "string.h"
#include "ZLIB/zlib.h"
#include "MSG/MSG_pubdefs.h"
#include "FBS/FBS_pubrtos.h"
#include "FILE/FILE_upl.h"
#include "FILE/FILE_upl_msg.h"
#include "file_unit_test_private.h"

Include dependency graph for file_unit_test_upl.c:


Functions

static void file_upl_info (FILE_Upl_Info *info, const char *str)
static void file_upl_print (FILE_Upl_Info *info, const char *str)
int file_upl_test_param (void)
int file_upl_test_func (void)
int file_upl_test_err (void)

Variables

unsigned short file_upl_data_0 []
const unsigned int file_upl_data_0_size
const unsigned short file_upl_start_0 []
const unsigned short file_upl_data_0_A []
const unsigned short file_upl_data_0_B []
const unsigned short file_upl_data_0_C []
const unsigned short file_upl_data_0_D []
const unsigned short file_upl_data_0_E []
const unsigned short file_upl_commit_0 []
unsigned short file_upl_data_1 []
const unsigned int file_upl_data_1_size
const unsigned short file_upl_start_1 []
const unsigned short file_upl_data_1_A []
const unsigned short file_upl_data_1_B []
const unsigned short file_upl_data_1_C []
const unsigned short file_upl_data_1_D []
const unsigned short file_upl_data_1_E []
const unsigned short file_upl_data_1_F []
const unsigned short file_upl_data_1_G []
const unsigned short file_upl_commit_1 []
const unsigned short file_upl_cancel_0 []
const unsigned short file_upl_start_2 []
const unsigned short file_upl_start_3 []
const unsigned short file_upl_data_3_A []
const unsigned short file_upl_data_3_B []
const unsigned short file_upl_start_4 []
const unsigned short file_upl_start_5 []
const unsigned short file_upl_start_6 []
const unsigned short file_upl_data_6_A []
const unsigned short file_upl_data_6_B []
const unsigned short file_upl_data_6_C []
const unsigned short file_upl_data_6_D []
const unsigned short file_upl_data_6_E []
const unsigned short file_upl_start_7 []
const unsigned short file_upl_data_7_A []
const unsigned short file_upl_data_7_B []
const unsigned short file_upl_data_7_C []
const unsigned short file_upl_data_7_E []
const unsigned short file_upl_commit_7 []
const unsigned short file_upl_start_8 []
const unsigned short file_upl_cancel_1 []
const unsigned short file_upl_commit_8 []
FILE_Uplfile_upl_desc
unsigned char * file_upl_buf
unsigned char file_upl_bad_desc [256]
static const char * dumpLine

Detailed Description

FILE package unit tests for file upload software.

Author:
D.L. Wood

Function Documentation

static void file_upl_info FILE_Upl_Info info,
const char *  str
[static]
 

Prints the current state of the file upload state machine.

Parameters:
info The state machine public information structure.
str A message to display at top of printout.
Return values:
0 Success.
-1 Failure.

static void file_upl_print FILE_Upl_Info info,
const char *  str
[static]
 

Displays the data held in the file upload assembly buffer.

Parameters:
info The state machine public information structure.
str A message to display at top of printout.
Return values:
0 Success.
-1 Failure.

int file_upl_test_err void   ) 
 

Tests the error handling capabilities of the file upload state machine. A number of state, sequence, and formatting errors are induced, and the appropriate reaction checked for.

Return values:
0 Success.
-1 Failure.

int file_upl_test_func void   ) 
 

Tests the basic functionality of the file upload state machine by invoking the library using some nominal file upload packet sample data sets.

Return values:
0 Success.
-1 Failure.

int file_upl_test_param void   ) 
 

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

Return values:
0 Success.
-1 Failure


Variable Documentation

dumpLine [static]
 

Initial value:

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

file_upl_bad_desc
 

A bad upload object for error testing.

unsigned char* file_upl_buf
 

A pointer to the file upload assembly buf.

const unsigned short file_upl_cancel_0[]
 

A binary image of an upload cancel telecommand packet.

const unsigned short file_upl_cancel_1[]
 

A binary image of an upload cancel telecommand packet.

CCSDS size = 10 (too small)

const unsigned short file_upl_commit_0[]
 

A binary image of an upload commit telecommand packet.

file ID = 0x20c1941f

const unsigned short file_upl_commit_1[]
 

A binary image of an upload commit telecommand packet.

file ID = 0x49800016

const unsigned short file_upl_commit_7[]
 

A binary image of an upload commit telecommand packet.

file ID = 0x20c1941f

const unsigned short file_upl_commit_8[]
 

A binary image of an upload commit telecommand packet.

CCSDS size = 10 (too small)

unsigned short file_upl_data_0[]
 

A binary image of a sample file. Contained in packets file_upl_data_0_X.

const unsigned short file_upl_data_0_A[]
 

A binary image of an upload data telecommand packet.

offset = 0 data size = 48

const unsigned short file_upl_data_0_B[]
 

A binary image of an upload data telecommand packet.

offset = 48 data size = 48

const unsigned short file_upl_data_0_C[]
 

A binary image of an upload data telecommand packet.

offset = 96 size = 48

const unsigned short file_upl_data_0_D[]
 

A binary image of an upload data telecommand packet.

offset = 144 size = 48

const unsigned short file_upl_data_0_E[]
 

A binary image of an upload data telecommand packet.

offset = 192 size = 16

const unsigned int file_upl_data_0_size
 

The size in bytes of data set file_upl_data_0.

unsigned short file_upl_data_1[]
 

A binary image of a sample file. Contained in packets file_upl_data_1_X.

const unsigned short file_upl_data_1_A[]
 

A binary image of an upload data telecommand packet.

offset = 0 size = 48

const unsigned short file_upl_data_1_B[]
 

A binary image of an upload data telecommand packet.

offset = 48 size = 48

const unsigned short file_upl_data_1_C[]
 

A binary image of an upload data telecommand packet.

offset = 96 size = 48

const unsigned short file_upl_data_1_D[]
 

A binary image of an upload data telecommand packet.

offset = 144 size = 48

const unsigned short file_upl_data_1_E[]
 

A binary image of an upload data telecommand packet.

offset = 192 size = 48

const unsigned short file_upl_data_1_F[]
 

A binary image of an upload data telecommand packet.

offset = 240 size = 48

const unsigned short file_upl_data_1_G[]
 

A binary image of an upload data telecommand packet.

offset = 288 size = 6

const unsigned int file_upl_data_1_size
 

The size in bytes of data set file_upl_data_1.

const unsigned short file_upl_data_3_A[]
 

A binary image of an upload data telecommand packet.

offset = 0 data size = 48

const unsigned short file_upl_data_3_B[]
 

A binary image of an upload data telecommand packet.

offset = 1000 (out of bounds) data size = 48

const unsigned short file_upl_data_6_A[]
 

A binary image of an upload data telecommand packet.

offset = 0 data size = 48

const unsigned short file_upl_data_6_B[]
 

A binary image of an upload data telecommand packet.

offset = 48 data size = 48

const unsigned short file_upl_data_6_C[]
 

A binary image of an upload data telecommand packet.

offset = 96 size = 48

const unsigned short file_upl_data_6_D[]
 

A binary image of an upload data telecommand packet.

offset = 144 size = 48

const unsigned short file_upl_data_6_E[]
 

A binary image of an upload data telecommand packet.

offset = 192 size = 20 (out of bounds)

const unsigned short file_upl_data_7_A[]
 

A binary image of an upload data telecommand packet.

offset = 0 data size = 48

const unsigned short file_upl_data_7_B[]
 

A binary image of an upload data telecommand packet.

offset = 48 data size = 48

const unsigned short file_upl_data_7_C[]
 

A binary image of an upload data telecommand packet.

offset = 96 size = 48

const unsigned short file_upl_data_7_E[]
 

A binary image of an upload data telecommand packet.

offset = 192 size = 16

FILE_Upl* file_upl_desc
 

A pointer to the file upload descriptor.

const unsigned short file_upl_start_0[]
 

A binary image of an upload start telecommand packet.

data pkt count = 5 file size = 208

const unsigned short file_upl_start_1[]
 

A binary image of an upload start telecommand packet.

data pkt count = 7 file size = 294

const unsigned short file_upl_start_2[]
 

A binary image of an upload start telecommand packet.

file size = 1 MB (too large)

const unsigned short file_upl_start_3[]
 

A binary image of an upload start telecommand packet.

data pkt count = 5 file size = 208

const unsigned short file_upl_start_4[]
 

A binary image of an upload start telecommand packet.

APID = 0 (not a file upload telecommand)

const unsigned short file_upl_start_5[]
 

A binary image of an upload start telecommand packet.

Func code = 10 (not a file upload telecommand)

const unsigned short file_upl_start_6[]
 

A binary image of an upload start telecommand packet.

data pkt count = 5 file size = 208

const unsigned short file_upl_start_7[]
 

A binary image of an upload start telecommand packet.

data pkt count = 5 file size = 208

const unsigned short file_upl_start_8[]
 

A binary image of an upload start telecommand packet.

CCSDS size = 4 (too small)


Generated on Wed Aug 30 00:24:02 2006 by  doxygen 1.4.4