GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > MEM / V3-1-0

Constituent: mem_scp     Tag: rad750


Interface   Data Structures   File List   Data Fields   Globals  

MEM_send_cmd.c File Reference

Send MEM telecommands in SCP and LCP environments. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "PBI/Endianness.h"
#include "MSG/MSG_pubdefs.h"
#include "CCSDS/CCSDS_pkt.h"
#include "CCSDS/CCSDS_swap.h"
#include "ITC/ITC_dump.h"
#include "ITC/ITC_pubdefs.h"
#include "MEM/MEM_dump_cmd.h"
#include "MEM/MEM_send_cmd.h"
#include "MEM/MEM_msgs.h"
#include "PBS/BSWP.h"
#include "ZLIB/zlib.h"
#include "Memmap.h"
#include "CLI/CLI_pubdefs.h"

Include dependency graph for MEM_send_cmd.c:

Include dependency graph

Defines

#define TFFS_NVRAM_SIZE   256
 The size, in bytes, to reserve for NVRAM storage.


Typedefs

typedef void(* MEM_DumpCB )(char *pkt)
 MEM command dump callback pointer.


Functions

int MEM_setDisplayLevelCmd (int level)
 Set the verbosity level of the MEM command display.

unsigned int mem_send_command (unsigned int num_parms, unsigned int *parm_bytes, unsigned int *parm_values, unsigned int func_code, MEM_DumpCB dump_func_p)
 Send a Memory command.

unsigned int MEM_sendCancel (unsigned short unit)
 Send the Memory Dump Cancel command.

unsigned int MEM_sendDump (unsigned short unit, unsigned int start, unsigned int count)
 Send the Memory Dump Memory command.

unsigned int MEM_sendLoad (unsigned short unit, unsigned int address, unsigned int value)
 Send the Memory Load Memory command.

unsigned int MEM_sendPoolDump (unsigned short unit, unsigned int tran, unsigned int pool)
 Send the Memory Dump Pool Statistics command.

unsigned int MEM_loadBankHeader (unsigned short lat_unit, unsigned int address, unsigned int rtos_bytes, unsigned int sbc_0_bytes, unsigned int sbc_1_bytes)
 Load a bank header into SIB EEPROM.

unsigned int MEM_loadBankHeader_cli (CLI_Control *cli, void *prm)
 CLI callback for the "MEM_loadBankHeader" command.

unsigned int MEM_sendCancel_cli (CLI_Control *cli, void *prm)
 CLI callback for the "MEM_sendCancel" command.

unsigned int MEM_sendDump_cli (CLI_Control *cli, void *prm)
 CLI callback for the "MEM_sendDump" command.

unsigned int MEM_sendLoad_cli (CLI_Control *cli, void *prm)
 CLI callback for the "MEM_sendLoad" command.

unsigned int MEM_sendPoolDump_cli (CLI_Control *cli, void *prm)
 CLI callback for the "MEM_sendPoolDump" command.

unsigned int MEM_setDisplayLevelCmd_cli (CLI_Control *cli, void *prm)
 CLI callback for the "MEM_setDisplayLevelCmd" command.

unsigned int MEM_addSendSyntax (CLI_Syntax *syntax)
 Add MEM send commands to the command-line syntax.

unsigned int MEM_addSyntaxSCP (CLI_Syntax *syntax)
 Add MEM commands to the command-line syntax for SCP.


Variables

int MEM_displayLevelCmd = 1
 The verbosity level of the MEM command display.


Detailed Description

Send MEM telecommands in SCP and LCP environments.

    CVS $Id: MEM_send_cmd.c,v 1.2 2004/11/19 22:01:04 dmay Exp $
    

These functions use standard ITC message functions to send MEM telecommands to an SIU. Depending on a command's latUnit parameter value, the SIU either handles the command or forwards it to an EPU. ITC ensures that the commands reach the intended target - even if the command is sent from an SIU in an LCP environment.


Define Documentation

#define TFFS_NVRAM_SIZE   256
 

The size, in bytes, to reserve for NVRAM storage.

This is the value specified in a SIB EEPROM bank header as the number of bytes to reserve for NVRAM storage.


Function Documentation

unsigned int MEM_addSendSyntax CLI_Syntax *  syntax  ) 
 

Add MEM send commands to the command-line syntax.

Parameters:
syntax Syntax handle.
Returns:
MSG code.

Here is the call graph for this function:

unsigned int MEM_addSyntaxSCP CLI_Syntax *  syntax  ) 
 

Add MEM commands to the command-line syntax for SCP.

Adds MEM commands to the command-line syntax when running in an SCP environment. This is the only MEM command-line syntax function called by SCP, so it must add both send and dump commands.

Parameters:
syntax Syntax handle.
Returns:
MSG code.

Here is the call graph for this function:

unsigned int MEM_loadBankHeader unsigned short  lat_unit,
unsigned int  address,
unsigned int  rtos_bytes,
unsigned int  sbc_0_bytes,
unsigned int  sbc_1_bytes
 

Load a bank header into SIB EEPROM.

Parameters:
lat_unit Unit (CPU) to load (0=SIU, 1=EPU0, ...).
address The base address of the bank header.
rtos_bytes Size reserved for RTOS file, in bytes.
sbc_0_bytes Size reserved for SBC 0 file, in bytes.
sbc_1_bytes Size reserved for SBC 1 file, in bytes.
Returns:
MSG code.

Here is the call graph for this function:

unsigned int MEM_loadBankHeader_cli CLI_Control *  cli,
void *  prm
[static]
 

CLI callback for the "MEM_loadBankHeader" command.

Parameters:
cli CLI control handle.
prm User parameter (unused).
Return values:
0 Success.
Nonzero Failure.

Here is the call graph for this function:

unsigned int mem_send_command unsigned int  num_parms,
unsigned int *  parm_bytes,
unsigned int *  parm_values,
unsigned int  func_code,
MEM_DumpCB  dump_func_p
[static]
 

Send a Memory command.

Parameters:
num_parms Number of command parameters.
parm_bytes Pointer to array of parameter sizes, in bytes.
parm_values Pointer to array of parameter values.
func_code Function code of the command.
dump_func_p Pointer to function that dumps the command payload.
Return values:
0 Success.
Nonzero Failure.

unsigned int MEM_sendCancel unsigned short  unit  ) 
 

Send the Memory Dump Cancel command.

Parameters:
unit LAT unit to receive the command (0 => SIU, 1 => EPU0, ...).
Return values:
0 Success.
Nonzero Failure.

Here is the call graph for this function:

unsigned int MEM_sendCancel_cli CLI_Control *  cli,
void *  prm
[static]
 

CLI callback for the "MEM_sendCancel" command.

Parameters:
cli CLI control handle.
prm User parameter (unused).
Return values:
0 Success.
Nonzero Failure.

Here is the call graph for this function:

unsigned int MEM_sendDump unsigned short  unit,
unsigned int  start,
unsigned int  count
 

Send the Memory Dump Memory command.

Parameters:
unit LAT unit to receive the command (0 => SIU, 1 => EPU0, ...).
start Starting address.
count Number of 32-bit words to dump.
Return values:
0 Success.
Nonzero Failure.

Here is the call graph for this function:

unsigned int MEM_sendDump_cli CLI_Control *  cli,
void *  prm
[static]
 

CLI callback for the "MEM_sendDump" command.

Parameters:
cli CLI control handle.
prm User parameter (unused).
Return values:
0 Success.
Nonzero Failure.

Here is the call graph for this function:

unsigned int MEM_sendLoad unsigned short  unit,
unsigned int  address,
unsigned int  value
 

Send the Memory Load Memory command.

Parameters:
unit LAT unit to receive the cmd (0 => SIU, 1 => EPU0, ...).
address Starting address.
value 32-bit value to load.
Return values:
0 Success.
Nonzero Failure.

Here is the call graph for this function:

unsigned int MEM_sendLoad_cli CLI_Control *  cli,
void *  prm
[static]
 

CLI callback for the "MEM_sendLoad" command.

Parameters:
cli CLI control handle.
prm User parameter (unused).
Return values:
0 Success.
Nonzero Failure.

Here is the call graph for this function:

unsigned int MEM_sendPoolDump unsigned short  unit,
unsigned int  tran,
unsigned int  pool
 

Send the Memory Dump Pool Statistics command.

Parameters:
unit LAT unit to receive the cmd (0 => SIU, 1 => EPU0, ...).
tran Transaction ID to be echoed in the response telemetry.
pool Pool ID (0 => system, 1 => application).
Return values:
0 Success.
Nonzero Failure.

Here is the call graph for this function:

unsigned int MEM_sendPoolDump_cli CLI_Control *  cli,
void *  prm
[static]
 

CLI callback for the "MEM_sendPoolDump" command.

Parameters:
cli CLI control handle.
prm User parameter (unused).
Return values:
0 Success.
Nonzero Failure.

Here is the call graph for this function:

int MEM_setDisplayLevelCmd int  level  ) 
 

Set the verbosity level of the MEM command display.

Parameters:
level Level of verbosity - set higher to display more.
Returns:
Previous verbosity level.

unsigned int MEM_setDisplayLevelCmd_cli CLI_Control *  cli,
void *  prm
[static]
 

CLI callback for the "MEM_setDisplayLevelCmd" command.

Parameters:
cli CLI control handle.
prm User parameter (unused).
Return values:
0 Success.
Nonzero Failure.

Here is the call graph for this function:


Variable Documentation

int MEM_displayLevelCmd = 1
 

The verbosity level of the MEM command display.

This variable determines the amount of information that is displayed for each MEM telecommand that is sent. The higher the value, the more information that is displayed. Use MEM_setDisplayLevelCmd() to change this value.


Generated on Mon Dec 13 07:33:45 2004 by doxygen 1.3.3