GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > CCSDS / V3-5-2

Constituent: ccsds_pkt_test     Tag: sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

ccsds_pkt_test.c File Reference

Function definitions for CCSDS packet format test program. More...

#include "stdio.h"
#include "stdlib.h"
#include "string.h"
#include "CCSDS/CCSDS_pkt.h"
#include "CCSDS/CCSDS_dump.h"
#include "CCSDS/ccsds_pkt_test.h"
#include "CLI/CLI_pubdefs.h"
#include "MSG/MSG_pubdefs.h"
#include "MSG/MSG_printProc.h"
#include "PBS/TASK.h"

Include dependency graph for ccsds_pkt_test.c:


Data Structures

struct  _Pkt_Test_Config

Typedefs

typedef enum _Pkt_Test_State Pkt_Test_State
typedef _Pkt_Test_Config Pkt_Test_Config

Enumerations

enum  _Pkt_Test_State {
  PKT_TEST_STATE_EMPTY,
  PKT_TEST_STATE_CREATED
}

Functions

static unsigned int pt_create (CLI_Control *control, Pkt_Test_Config *config)
static unsigned int pt_set (CLI_Control *control, Pkt_Test_Config *config)
static unsigned int pt_get (CLI_Control *control, Pkt_Test_Config *config)
static unsigned int pt_dump (CLI_Control *control, Pkt_Test_Config *config)
static unsigned int pt_help (CLI_Control *control, Pkt_Test_Config *config)
static unsigned int pt_exit (CLI_Control *control, Pkt_Test_Config *config)
static void pt_print (Pkt_Test_Config *config)
int main (int argc, char **argv)

Variables

static Pkt_Test_Config ptconfig

Detailed Description

Function definitions for CCSDS packet format test program.

Author:
D.L. Wood

Typedef Documentation

Pkt_Test_Config
 

The typedef for _Pkt_Test_Config.

Pkt_Test_State
 

The typedef for _Pkt_Test_State.


Enumeration Type Documentation

enum _Pkt_Test_State
 

Defines the state of the test application.

Enumerator:
PKT_TEST_STATE_EMPTY  A test packet has not yet been created.
PKT_TEST_STATE_CREATED  A test packet has been created.


Function Documentation

int main int  argc,
char **  argv
 

The application entry point.

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

static unsigned int pt_create CLI_Control *  control,
Pkt_Test_Config config
[static]
 

Creates a new packet in response to the "create" command.

Parameters:
control The CLI control structure.
config A pointer to the application configuration info.
Return values:
CLI_SUCCESS Success.
CLI_BADSNTX The command did not have proper syntax.

static unsigned int pt_dump CLI_Control *  control,
Pkt_Test_Config config
[static]
 

Displays the contents of the entiere packet header.

Parameters:
control The CLI control structure.
config A pointer to the application configuration info.
Return values:
CLI_SUCCESS Success.
CLI_BADSNTX The command did not have proper syntax or the test packet has not been created.

static unsigned int pt_exit CLI_Control *  control,
Pkt_Test_Config config
[static]
 

Quits the application in reponse to the "exit" command.

Parameters:
control The CLI control structure.
config A pointer to the application configuration info.
Returns:
CLI_ENDOFCMD to stop the CLI interpreter.

static unsigned int pt_get CLI_Control *  control,
Pkt_Test_Config config
[static]
 

Retrieves a value from the test packet in response to the "get" command.

Parameters:
control The CLI control structure.
config A pointer to the application configuration info.
Return values:
CLI_SUCCESS Success.
CLI_BADSNTX The command did not have proper syntax or the test packet has not been created.

unsigned int pt_help CLI_Control *  control,
Pkt_Test_Config config
[static]
 

Prints a summary of the command syntax in response to the "help" command.

Parameters:
control The CLI control structure.
config A pointer to the application configuration info.
Returns:
CLI_SUCCESS

static void pt_print Pkt_Test_Config config  )  [static]
 

Displays the hex dump of the test packet contents.

Parameters:
config A pointer to the application configuration info.

static unsigned int pt_set CLI_Control *  control,
Pkt_Test_Config config
[static]
 

Sets a value in the test packet in response to the "set" command.

Parameters:
control The CLI control structure.
config A pointer to the application configuration info.
Return values:
CLI_SUCCESS Success.
CLI_BADSNTX The command did not have proper syntax or the test packet has not been created.


Variable Documentation

ptconfig [static]
 

The test application global configuration info.


Generated on Wed Dec 5 08:17:07 2007 by  doxygen 1.4.4