GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > MEM / V5-7-1

Constituent: mem_unit_test     Tag: sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

mem_util_cmd.c File Reference

Send and handle commands. More...

#include <string.h>
#include "CCSDS/CCSDS_pkt.h"
#include "CCSDS/CCSDS_swap.h"
#include "ITC/ITC_pubdefs.h"
#include "MEM/MEM_msgs.h"
#include "MSG/MSG_pubdefs.h"
#include "PBS/BSWP.h"
#include "PBS/MBA.h"
#include "PBS/TASK.h"
#include "mem_unit_test.h"
#include "mem_util_cmd.h"
#include "mem_util_pool.h"
#include "mem_util_task.h"
#include "mem_util_wrap.h"

Include dependency graph for mem_util_cmd.c:


Defines

#define CMD_APID_MEM_DUMP   (1604)
#define CMD_APID_MEM_LOAD   (1604)
#define CMD_FC_MEM_DUMP   ( 0)
#define CMD_FC_MEM_LOAD   ( 4)
#define CMD_FC_DUMP_NEXT   (100)

Functions

int CMD_init (test_Test_Descriptor *td_p)
 Initialize the command handler.
int CMD_start (test_Test_Descriptor *td_p)
 Start the command handler task.
int CMD_stop (test_Test_Descriptor *td_p)
 Stop the command handler task.
int CMD_shutdown (test_Test_Descriptor *td_p)
 Shutdown the command handler.
static int cmd_send (test_Test_Descriptor *td_p, int id, WRAP_Info *info_p, unsigned int num_parms, unsigned int *parm_bytes, unsigned int *parm_values, unsigned int apid, unsigned int func_code, unsigned int short_bytes)
 Send a command to a task.
int CMD_send_dump_mem (test_Test_Descriptor *td_p, int id, WRAP_Info *info_p, unsigned int lat_unit, unsigned int tran_id, unsigned int address, unsigned int num_words, unsigned int short_bytes)
 Send the Dump-Memory command.
int CMD_send_load_mem (test_Test_Descriptor *td_p, int id, WRAP_Info *info_p, unsigned int lat_unit, unsigned int tran_id, unsigned int address, unsigned int num_words, unsigned int data_start, unsigned int data_delta, unsigned int short_bytes)
 Send the Load-Memory command.

Detailed Description

Send and handle commands.

**  CVS $Id: mem_util_cmd.c,v 1.2 2006/05/10 19:36:18 dmay Exp $
**  

Function Documentation

int CMD_init test_Test_Descriptor td_p  ) 
 

Initialize the command handler.

Parameters:
td_p Pointer to test descriptor.
Return values:
0 Success.
-1 Failure.

int cmd_send test_Test_Descriptor td_p,
int  id,
WRAP_Info info_p,
unsigned int  num_parms,
unsigned int *  parm_bytes,
unsigned int *  parm_values,
unsigned int  apid,
unsigned int  func_code,
unsigned int  short_bytes
[static]
 

Send a command to a task.

Parameters:
td_p Pointer to test descriptor.
id ID to use for user messages.
info_p Pointer to wrap control info.
num_parms Number of command parameters.
parm_bytes Pointer to array of parameter sizes, in bytes.
parm_values Pointer to array of parameter values.
apid APID of the command.
func_code Function code of the command.
short_bytes Number of bytes to remove from the command.
Return values:
0 Success.
-1 Failure.

int CMD_send_dump_mem test_Test_Descriptor td_p,
int  id,
WRAP_Info info_p,
unsigned int  lat_unit,
unsigned int  tran_id,
unsigned int  address,
unsigned int  num_words,
unsigned int  short_bytes
 

Send the Dump-Memory command.

Parameters:
td_p Pointer to test descriptor.
id ID to use for user messages.
info_p Pointer to wrap control info.
lat_unit LAT Unit parameter value.
tran_id Transaction ID parameter value.
address Address parameter value.
num_words Word Count parameter value.
short_bytes Number of bytes to remove from the command.
Return values:
0 Success.
-1 Failure.

int CMD_send_load_mem test_Test_Descriptor td_p,
int  id,
WRAP_Info info_p,
unsigned int  lat_unit,
unsigned int  tran_id,
unsigned int  address,
unsigned int  num_words,
unsigned int  data_start,
unsigned int  data_delta,
unsigned int  short_bytes
 

Send the Load-Memory command.

Parameters:
td_p Pointer to test descriptor.
id ID to use for user messages.
info_p Pointer to wrap control info.
lat_unit LAT Unit parameter value.
tran_id Transaction ID parameter value.
address Address parameter value.
num_words Word Count parameter value.
data_start Value of first Data parameter.
data_delta Difference between adjacent Data parameter values.
short_bytes Number of bytes to remove from the command.
Return values:
0 Success.
-1 Failure.

int CMD_shutdown test_Test_Descriptor td_p  ) 
 

Shutdown the command handler.

Parameters:
td_p Pointer to test descriptor.
Return values:
0 Success.
-1 Failure.

int CMD_start test_Test_Descriptor td_p  ) 
 

Start the command handler task.

Parameters:
td_p Pointer to test descriptor.
Return values:
0 Success.
-1 Failure.

int CMD_stop test_Test_Descriptor td_p  ) 
 

Stop the command handler task.

Parameters:
td_p Pointer to test descriptor.
Return values:
0 Success.
-1 Failure.


Generated on Tue Aug 8 23:24:07 2006 by  doxygen 1.4.4