GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > MEM / V5-3-0

Constituent: mem     Tag: linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

MEM_command.c File Reference

MEM application-level command handlers. More...

#include <string.h>
#include "CCSDS/CCSDS_pkt.h"
#include "ITC/ITC_pubdefs.h"
#include "MSG/MSG_pubdefs.h"
#include "MEM/MEM_apid.h"
#include "MEM/MEM_cmddefs.h"
#include "MEM/MEM_dump.h"
#include "MEM/MEM_load.h"
#include "MEM/MEM_msgs.h"
#include "MEM/MEM_tlmdefs.h"
#include "PBS/MBA.h"
#include "MEM_control.h"

Include dependency graph for MEM_command.c:

Include dependency graph

Defines

#define MEM_DUMP_PKT_PERIOD_USEC   (250000)
 Period of memory dump packets, in microseconds.


Functions

unsigned int mem_check_state (MEM_Control *mem_p)
 Verify that MEM system is in proper state to handle commands.

unsigned int mem_forward_cmd (MEM_Control *mem_p, const ITC_QueueItem *qitem_p, void *pkt_p, unsigned int len, int *fwd_p)
 Common function to forward MEM commands to other nodes.

void mem_fpa_cb (ITC_QueueItem *qitem_p, unsigned int status, void *parm_0, void *parm_1, void *parm_2)
 ITC callback to free FPA memory.

unsigned int mem_send_pool_data (MEM_Control *mem_p, unsigned int pool_id, unsigned int tran_id)
 Send memory pool statistics telemetry.

void mem_send_dump_next_cmd (ITC_QueueItem *qitem_p, unsigned int old_status, void *parm_0, void *parm_1, void *parm_2)
 ITC callback which sends LMEMDUMPNEXT command.

unsigned int mem_send_dump_data (MEM_Control *mem_p)
 Send memory dump data telemetry.

unsigned int mem_handle_dump (MEM_Control *mem_p, const ITC_QueueItem *qitem_p, void *pkt_p, unsigned int len, unsigned int min_len, unsigned int fcode_orig, unsigned int tran_id)
 Common Memory Dump command handling.

unsigned int MEM_LMEMDUMPMEM (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len)
 Handle the Memory Data Dump command.

unsigned int MEM_LMEMDUMPCANCEL (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len)
 Handle the Memory Dump Cancel command.

unsigned int MEM_LMEMDUMPPCI (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len)
 Handle the PCI Device Header Dump telecommand.

unsigned int MEM_LMEMDUMPREG (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len)
 Handle the Processor Register Dump telecommand.

unsigned int MEM_LMEMDUMPPOOL (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len)
 Handle the Memory Pool Status Dump telecommand.

unsigned int MEM_LMEMDUMPSYMREL (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len)
 Handle the Memory Dump Symbol Relative telecommand.

unsigned int MEM_LMEMDUMPSYMVAL (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len)
 Handle the Memory Symbol Lookup telecommand.

unsigned int MEM_LMEMDUMPNEXT (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len)
 Handle the Dump-Next telecommand.

unsigned int mem_handle_load (MEM_Control *mem_p)
 Common Memory Write command handling.

unsigned int MEM_LMEMLOADMEM (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len)
 Handle the Memory Write command.

unsigned int MEM_LMEMLOADPCI (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len)
 Handle the PCI Device Header Write telecommand.

unsigned int MEM_LMEMLOADREG (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len)
 Handle the Processor Register Write telecommand.


Detailed Description

MEM application-level command handlers.

    CVS $Id: MEM_command.c,v 1.18 2005/05/02 14:22:10 dmay Exp $
    

Application-level handlers for the MEM dump and load commands. These handlers simply forward the commands to a target node.


Function Documentation

unsigned int mem_check_state MEM_Control mem_p  )  [static]
 

Verify that MEM system is in proper state to handle commands.

This function checks the state of the MEM system to determine if it has been initialized.

Parameters:
mem_p Pointer to MEM control block.
Returns:
MSG code.

unsigned int mem_forward_cmd MEM_Control mem_p,
const ITC_QueueItem *  qitem_p,
void *  pkt_p,
unsigned int  len,
int *  fwd_p
[static]
 

Common function to forward MEM commands to other nodes.

This function looks at a MEM telecommand packet and determines if it should be forwarded to another node (CPU). It assumes that the ID of the target node is located in the same place within all MEM telecommand packets.

Parameters:
mem_p Pointer to MEM control block.
qitem_p Pointer to telecommand queue item.
pkt_p Pointer to telecommand packet.
len Length of telecommand packet, in bytes.
fwd_p Location to store pkt disposition (nonzero=>forwarded).
Returns:
MSG code.

void mem_fpa_cb ITC_QueueItem *  qitem_p,
unsigned int  status,
void *  parm_0,
void *  parm_1,
void *  parm_2
[static]
 

ITC callback to free FPA memory.

Parameters:
qitem_p Pointer to packet's queue item.
status Status of packet transmission.
parm_0 Callback parameter 0 (pointer to FPA control block).
parm_1 Callback parameter 1 (pointer to FPA packet).
parm_2 Callback parameter 2 (pointer to MEM control block).
Returns:
Nothing.

unsigned int mem_handle_dump MEM_Control mem_p,
const ITC_QueueItem *  qitem_p,
void *  pkt_p,
unsigned int  len,
unsigned int  min_len,
unsigned int  fcode_orig,
unsigned int  tran_id
[static]
 

Common Memory Dump command handling.

Parameters:
mem_p Pointer to MEM control block.
qitem_p Pointer to received queue item.
pkt_p Pointer to received command packet.
len Length of received command packet, in bytes.
min_len Minimum required length of command packet, in bytes.
fcode_orig Original function code from command packet.
tran_id Transaction ID from command packet.
Returns:
MSG code.

Here is the call graph for this function:

unsigned int mem_handle_load MEM_Control mem_p  )  [static]
 

Common Memory Write command handling.

Parameters:
mem_p Pointer to MEM control block.
Returns:
MSG code.

Here is the call graph for this function:

unsigned int MEM_LMEMDUMPCANCEL void *  prm,
const struct _ITC_QueueItem qitem,
void *  pay,
unsigned int  len
 

Handle the Memory Dump Cancel command.

Callback function for ITC that handles the Memory Dump Cancel telecommand.

Parameters:
prm Unused.
qitem Pointer to queue item.
pay Pointer to command payload.
len Length of the command payload, in bytes.
Returns:
MSG code.

Here is the call graph for this function:

unsigned int MEM_LMEMDUMPMEM void *  prm,
const struct _ITC_QueueItem qitem,
void *  pay,
unsigned int  len
 

Handle the Memory Data Dump command.

Callback function for ITC that handles the Memory Data Dump telecommand.

Parameters:
prm Unused.
qitem Pointer to queue item.
pay Pointer to command payload.
len Length of the command payload, in bytes.
Returns:
MSG code.

Here is the call graph for this function:

unsigned int MEM_LMEMDUMPNEXT void *  prm,
const struct _ITC_QueueItem qitem,
void *  pay,
unsigned int  len
 

Handle the Dump-Next telecommand.

Callback function for ITC that handles the Dump-Next telecommand.

Parameters:
prm Unused.
qitem Pointer to queue item from ITC.
pay Pointer to CCSDS packet containing the command.
len Length of the CCSDS packet, in bytes.
Returns:
A MEM MSG code.

Here is the call graph for this function:

unsigned int MEM_LMEMDUMPPCI void *  prm,
const struct _ITC_QueueItem qitem,
void *  pay,
unsigned int  len
 

Handle the PCI Device Header Dump telecommand.

Callback function for ITC that handles the PCI Device Header Dump telecommand.

Parameters:
prm Unused.
qitem Pointer to queue item from ITC.
pay Pointer to CCSDS packet containing the command.
len Length of the CCSDS packet, in bytes.
Returns:
A MEM MSG code.

Here is the call graph for this function:

unsigned int MEM_LMEMDUMPPOOL void *  prm,
const struct _ITC_QueueItem qitem,
void *  pay,
unsigned int  len
 

Handle the Memory Pool Status Dump telecommand.

Callback function for ITC that handles the Memory Pool Status Dump telecommand.

Parameters:
prm Unused.
qitem Pointer to queue item from ITC.
pay Pointer to CCSDS packet containing the command.
len Length of the CCSDS packet, in bytes.
Returns:
A MEM MSG code.

Here is the call graph for this function:

unsigned int MEM_LMEMDUMPREG void *  prm,
const struct _ITC_QueueItem qitem,
void *  pay,
unsigned int  len
 

Handle the Processor Register Dump telecommand.

Callback function for ITC that handles the Processor Register Dump telecommand.

Parameters:
prm Unused.
qitem Pointer to queue item from ITC.
pay Pointer to CCSDS packet containing the command.
len Length of the CCSDS packet, in bytes.
Returns:
A MEM MSG code.

Here is the call graph for this function:

unsigned int MEM_LMEMDUMPSYMREL void *  prm,
const struct _ITC_QueueItem qitem,
void *  pay,
unsigned int  len
 

Handle the Memory Dump Symbol Relative telecommand.

Callback function for ITC that handles the Memory Dump Symbol Relative telecommand.

Parameters:
prm Unused.
qitem Pointer to queue item from ITC.
pay Pointer to CCSDS packet containing the command.
len Length of the CCSDS packet, in bytes.
Returns:
A MEM MSG code.

Here is the call graph for this function:

unsigned int MEM_LMEMDUMPSYMVAL void *  prm,
const struct _ITC_QueueItem qitem,
void *  pay,
unsigned int  len
 

Handle the Memory Symbol Lookup telecommand.

Callback function for ITC that handles the Memory Symbol Lookup telecommand.

Parameters:
prm Unused.
qitem Pointer to queue item from ITC.
pay Pointer to CCSDS packet containing the command.
len Length of the CCSDS packet, in bytes.
Returns:
A MEM MSG code.

Here is the call graph for this function:

unsigned int MEM_LMEMLOADMEM void *  prm,
const struct _ITC_QueueItem qitem,
void *  pay,
unsigned int  len
 

Handle the Memory Write command.

Callback function for ITC that handles the Memory Write telecommand.

Parameters:
prm Unused.
qitem Pointer to queue item.
pay Pointer to command payload.
len Length of the command payload, in bytes.
Returns:
MSG code.

Here is the call graph for this function:

unsigned int MEM_LMEMLOADPCI void *  prm,
const struct _ITC_QueueItem qitem,
void *  pay,
unsigned int  len
 

Handle the PCI Device Header Write telecommand.

Callback function for ITC that handles the PCI Device Header Write telecommand.

Parameters:
prm Unused.
qitem Pointer to queue item from ITC.
pay Pointer to CCSDS packet containing the command.
len Length of the CCSDS packet, in bytes.
Returns:
A MEM MSG code.

Here is the call graph for this function:

unsigned int MEM_LMEMLOADREG void *  prm,
const struct _ITC_QueueItem qitem,
void *  pay,
unsigned int  len
 

Handle the Processor Register Write telecommand.

Callback function for ITC that handles the Processor Register Write telecommand.

Parameters:
prm Unused.
qitem Pointer to queue item from ITC.
pay Pointer to CCSDS packet containing the command.
len Length of the CCSDS packet, in bytes.
Returns:
A MEM MSG code.

Here is the call graph for this function:

unsigned int mem_send_dump_data MEM_Control mem_p  )  [static]
 

Send memory dump data telemetry.

Parameters:
mem_p Pointer to MEM control block.
Returns:
MSG code.

Here is the call graph for this function:

void mem_send_dump_next_cmd ITC_QueueItem *  qitem_p,
unsigned int  old_status,
void *  parm_0,
void *  parm_1,
void *  parm_2
[static]
 

ITC callback which sends LMEMDUMPNEXT command.

Parameters:
qitem_p Pointer to packet's queue item.
old_status Status of packet transmission.
parm_0 Callback parameter 0 (pointer to FPA control block).
parm_1 Callback parameter 1 (pointer to FPA packet).
parm_2 Callback parameter 2 (pointer to MEM control block).
Returns:
Nothing.

Here is the call graph for this function:

unsigned int mem_send_pool_data MEM_Control mem_p,
unsigned int  pool_id,
unsigned int  tran_id
[static]
 

Send memory pool statistics telemetry.

Parameters:
mem_p Pointer to MEM control block.
pool_id ID of the pool to query.
tran_id Transaction ID to send in the telemetry.
Returns:
MSG code.

Here is the call graph for this function:


Generated on Sun Jul 17 08:42:56 2005 by doxygen 1.3.3