GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> CCSDS / dev > ccsds_pkt_test / rhel4-32
#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>
Classes | |
struct | _Pkt_Test_Config |
Typedefs | |
typedef enum _Pkt_Test_State | Pkt_Test_State |
typedef struct _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 |
The typedef for _Pkt_Test_Config.
The typedef for _Pkt_Test_State.
enum _Pkt_Test_State |
int main | ( | int | argc, | |
char ** | argv | |||
) |
The application entry point.
argc | The number of command line args. | |
argv | The list of command line args. |
0 | Success. | |
-1 | Failure. |
References PKT_TEST_STATE_EMPTY, pt_create(), pt_dump(), pt_exit(), pt_get(), pt_help(), pt_set(), and _Pkt_Test_Config::state.
static unsigned int pt_create | ( | CLI_Control * | control, | |
Pkt_Test_Config * | config | |||
) | [static] |
Creates a new packet in response to the "create" command.
control | The CLI control structure. | |
config | A pointer to the application configuration info. |
CLI_SUCCESS | Success. | |
CLI_BADSNTX | The command did not have proper syntax. |
References CCSDS_PKT_SEQ_FIRST, CCSDS_PKT_SEQ_LAST, CCSDS_PKT_SEQ_MID, CCSDS_PKT_SEQ_NONE, CCSDS_PKT_TYPE_CMD, CCSDS_PKT_TYPE_TELEM, CCSDS_pktHdrCreate(), CCSDS_pktHdrSizeof(), _Pkt_Test_Config::pkt, PKT_TEST_STATE_CREATED, PKT_TEST_STATE_EMPTY, pt_print(), _Pkt_Test_Config::state, and _Pkt_Test_Config::type.
Referenced by main().
static unsigned int pt_dump | ( | CLI_Control * | control, | |
Pkt_Test_Config * | config | |||
) | [static] |
Displays the contents of the entiere packet header.
control | The CLI control structure. | |
config | A pointer to the application configuration info. |
CLI_SUCCESS | Success. | |
CLI_BADSNTX | The command did not have proper syntax or the test packet has not been created. |
References CCSDS_dumpPktHdr(), _Pkt_Test_Config::pkt, PKT_TEST_STATE_CREATED, and _Pkt_Test_Config::state.
Referenced by main().
static unsigned int pt_exit | ( | CLI_Control * | control, | |
Pkt_Test_Config * | config | |||
) | [static] |
Quits the application in reponse to the "exit" command.
control | The CLI control structure. | |
config | A pointer to the application configuration info. |
References _Pkt_Test_Config::pkt, PKT_TEST_STATE_CREATED, and _Pkt_Test_Config::state.
Referenced by main().
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.
control | The CLI control structure. | |
config | A pointer to the application configuration info. |
CLI_SUCCESS | Success. | |
CLI_BADSNTX | The command did not have proper syntax or the test packet has not been created. |
References CCSDS_PKT_SEQ_FIRST, CCSDS_PKT_SEQ_LAST, CCSDS_PKT_SEQ_MID, CCSDS_PKT_SEQ_NONE, CCSDS_PKT_TYPE_CMD, CCSDS_PKT_TYPE_TELEM, CCSDS_pktHdrGetApid(), CCSDS_pktHdrGetFuncCode(), CCSDS_pktHdrGetLength(), CCSDS_pktHdrGetSeqCount(), CCSDS_pktHdrGetSeqFlags(), CCSDS_pktHdrGetTime(), CCSDS_pktHdrGetType(), _Pkt_Test_Config::pkt, PKT_TEST_STATE_CREATED, and _Pkt_Test_Config::state.
Referenced by main().
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.
control | The CLI control structure. | |
config | A pointer to the application configuration info. |
Referenced by main().
static void pt_print | ( | Pkt_Test_Config * | config | ) | [static] |
Displays the hex dump of the test packet contents.
config | A pointer to the application configuration info. |
References CCSDS_pktHdrSizeof(), _Pkt_Test_Config::pkt, and _Pkt_Test_Config::type.
Referenced by pt_create(), and pt_set().
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.
control | The CLI control structure. | |
config | A pointer to the application configuration info. |
CLI_SUCCESS | Success. | |
CLI_BADSNTX | The command did not have proper syntax or the test packet has not been created. |
References CCSDS_PKT_SEQ_FIRST, CCSDS_PKT_SEQ_LAST, CCSDS_PKT_SEQ_MID, CCSDS_PKT_SEQ_NONE, CCSDS_pktHdrSetApid(), CCSDS_pktHdrSetFuncCode(), CCSDS_pktHdrSetLength(), CCSDS_pktHdrSetSeqCount(), CCSDS_pktHdrSetSeqFlags(), CCSDS_pktHdrSetTime(), _Pkt_Test_Config::pkt, PKT_TEST_STATE_CREATED, pt_print(), and _Pkt_Test_Config::state.
Referenced by main().
ptconfig [static] |
The test application global configuration info.