GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> MEM / V5-8-2 > mem_scp / rad750


Interface   Data Structures   File List   Data Fields   Globals  

MEM_dump_cmd.c File Reference

Dumps the contents of MEM command and telemetry packets. 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 <ITC/ITC_dump.h>
#include <ITC/ITC_pubdefs.h>
#include <MEM/MEM_dump_cmd.h>
#include <MEM/MEM_msgs.h>
#include <MEM/QMEM.h>
#include <PBS/BSWP.ih>
#include <PBS/BSWP.h>
#include <CLI/CLI_pubdefs.h>

Functions

int MEM_setDumpDisplayLimit (int limit)
 Set the max number of words to display from a single dump.
static const char * mem_interp_dest (unsigned int value)
 Interpret a destination value.
static const char * mem_interp_unit (unsigned int value)
 Interpret a LAT unit identifier value.
static const char * mem_interp_pool (unsigned int value)
 Interpret a Pool ID value.
static void mem_dump_boilerplate (char *pkt_name)
 Dump some boilerplate header information.
static unsigned int mem_dump_dest (unsigned char *pay, unsigned int offset)
 Dump the destination value from a packet.
static unsigned int mem_dump_idents (unsigned char *pay, unsigned int offset)
 Dump the LAT unit and transaction ID values from a packet.
static unsigned int mem_dump_padding (unsigned char *pay, unsigned int offset, unsigned int num_bytes)
 Dump the padding field from a packet.
static unsigned int mem_dump_data_32 (unsigned char *pay, unsigned int offset, unsigned int num_words)
 Dump the 32-bit data fields from a packet.
static unsigned int mem_dump_data_ascii (unsigned char *pay, unsigned int offset, unsigned int num_bytes, char *name)
 Dump the ASCII character data fields from a packet.
void MEM_dumpHouse (unsigned char *pay)
 Dump the MEM portion of the boot housekeeping telemetry.
void MEM_dumpDumpTlm (unsigned char *pay)
 Dump the Memory Dump telemetry.
void MEM_dumpPoolData (unsigned char *pay)
 Dump the Memory Pool Status telemetry.
void MEM_dumpSymValData (unsigned char *pay)
 Dump the Memory Symbol Lookup telemetry.
unsigned int MEM_dispatchTlm (void *prm, unsigned char *pkt)
 Dispatch routine for arriving housekeeping telemetry.
unsigned int MEM_dispatchDumpTlm (void *prm, unsigned char *pkt)
 Dispatch routine for arriving dump data telemetry.
unsigned int MEM_dispatchPoolDataTlm (void *prm, unsigned char *pkt)
 Dispatch routine for arriving memory pool data telemetry.
unsigned int MEM_dispatchSsrTlm (void *prm, unsigned char *pkt)
 Dispatch routine for arriving SSR telemetry.
unsigned int MEM_dispatchSymValTlm (void *prm, unsigned char *pkt)
 Dispatch routine for arriving symbol value telemetry.
void MEM_dumpCancel (char *pkt)
 Dump the Memory Dump Cancel command.
void MEM_dumpDump (char *pkt)
 Dump the Memory Data Dump command.
void MEM_dumpLoad (char *pkt)
 Dump the Memory Write command.
void MEM_dumpPci (char *pkt)
 Dump the PCI Device Header Dump command.
void MEM_dumpPciLoad (char *pkt)
 Dump the PCI Device Header Write command.
void MEM_dumpPool (char *pkt)
 Dump the Memory Pool Status Dump command.
void MEM_dumpReg (char *pkt)
 Dump the Processor Register Dump command.
void MEM_dumpRegLoad (char *pkt)
 Dump the Processor Register Write command.
void MEM_dumpSymRel (char *pkt)
 Dump the Memory Dump Symbol Relative command.
void MEM_dumpSymVal (char *pkt)
 Dump the Memory Symbol Lookup command.
static unsigned int MEM_setDumpDisplayLimit_cli (CLI_Control *cli, void *prm)
 CLI callback for the "MEM_setDumpDisplayLimit" command.
unsigned int MEM_addDumpSyntax (CLI_Syntax *syntax)
 Add MEM dump commands to the command-line syntax.

Variables

int MEM_dumpDisplayLimit = 256
 The maximum number of words to display from a single dump.


Detailed Description

Dumps the contents of MEM command and telemetry packets.

  CVS $Id: MEM_dump_cmd.c,v 1.11 2011/03/29 01:58:52 apw Exp $
  

Function Documentation

unsigned int MEM_addDumpSyntax ( CLI_Syntax *  syntax  ) 

Add MEM dump commands to the command-line syntax.

Parameters:
syntax Syntax handle.
Returns:
MSG code.

References MEM_setDumpDisplayLimit_cli().

Referenced by MEM_addSyntaxSCP().

unsigned int MEM_dispatchDumpTlm ( void *  prm,
unsigned char *  pkt 
)

Dispatch routine for arriving dump data telemetry.

Parameters:
prm (in) User context parameter
pkt (in) The CTDB received telemetry
Return values:
MEM_SUCCESS Success
MEM_GENERROR Failure

References MEM_dumpDumpTlm().

unsigned int MEM_dispatchPoolDataTlm ( void *  prm,
unsigned char *  pkt 
)

Dispatch routine for arriving memory pool data telemetry.

Parameters:
prm User context parameter (unused).
pkt Pointer to CCSDS packet.
Returns:
MSG code.

References MEM_dumpPoolData().

unsigned int MEM_dispatchSsrTlm ( void *  prm,
unsigned char *  pkt 
)

Dispatch routine for arriving SSR telemetry.

Parameters:
prm User context parameter (unused).
pkt Pointer to CCSDS packet.
Returns:
MSG code.

References QMEM_dump().

unsigned int MEM_dispatchSymValTlm ( void *  prm,
unsigned char *  pkt 
)

Dispatch routine for arriving symbol value telemetry.

Parameters:
prm User context parameter (unused).
pkt Pointer to CCSDS packet.
Returns:
MSG code.

References MEM_dumpSymValData().

unsigned int MEM_dispatchTlm ( void *  prm,
unsigned char *  pkt 
)

Dispatch routine for arriving housekeeping telemetry.

Parameters:
prm (in) User context parameter
pkt (in) The CTDB received telemetry
Return values:
MEM_SUCCESS Success
MEM_GENERROR Failure

References MEM_dumpHouse().

void mem_dump_boilerplate ( char *  pkt_name  )  [static]

Dump some boilerplate header information.

Dumps a boilerplate header for the payload portion of a packet.

Parameters:
pkt_name Pointer to name for the information in the packet.
Returns:
Nothing.

Referenced by MEM_dumpCancel(), MEM_dumpDump(), MEM_dumpLoad(), MEM_dumpPci(), MEM_dumpPciLoad(), MEM_dumpPool(), MEM_dumpPoolData(), MEM_dumpReg(), MEM_dumpRegLoad(), MEM_dumpSymRel(), MEM_dumpSymVal(), and MEM_dumpSymValData().

unsigned int mem_dump_data_32 ( unsigned char *  pay,
unsigned int  offset,
unsigned int  num_words 
) [static]

Dump the 32-bit data fields from a packet.

Dumps the data fields from a packet as 32-bit values.

Parameters:
pay Pointer to CCSDS packet.
offset Starting offset of the first data field.
num_words Number of 32-bit data fields to dump.
Returns:
Length of the data fields, in bytes.

Referenced by MEM_dumpLoad(), and MEM_dumpRegLoad().

unsigned int mem_dump_data_ascii ( unsigned char *  pay,
unsigned int  offset,
unsigned int  num_bytes,
char *  name 
) [static]

Dump the ASCII character data fields from a packet.

Dumps the data fields from a packet as ASCII characters.

Parameters:
pay Pointer to CCSDS packet.
offset Starting offset of the first data field.
num_bytes Number of bytes of data to dump.
name Pointer to name of the type of data in the packet.
Returns:
Length of the data fields, in bytes.

Referenced by MEM_dumpSymRel(), MEM_dumpSymVal(), and MEM_dumpSymValData().

unsigned int mem_dump_dest ( unsigned char *  pay,
unsigned int  offset 
) [static]

Dump the destination value from a packet.

Parameters:
pay Pointer to CCSDS packet.
offset Starting offset of the destination field.
Returns:
Length of the destination field, in bytes.

References mem_interp_dest().

Referenced by MEM_dumpDump(), and MEM_dumpSymRel().

unsigned int mem_dump_idents ( unsigned char *  pay,
unsigned int  offset 
) [static]

Dump the LAT unit and transaction ID values from a packet.

Dumps the LAT unit and transaction ID values from a packet.

Parameters:
pay Pointer to CCSDS packet.
offset Starting offset of the LAT-unit/transaction-ID field.
Returns:
Length of the LAT-unit/transaction-ID field, in bytes.

References mem_interp_unit().

Referenced by MEM_dumpCancel(), MEM_dumpDump(), MEM_dumpLoad(), MEM_dumpPci(), MEM_dumpPciLoad(), MEM_dumpPool(), MEM_dumpPoolData(), MEM_dumpReg(), MEM_dumpRegLoad(), MEM_dumpSymRel(), MEM_dumpSymVal(), and MEM_dumpSymValData().

unsigned int mem_dump_padding ( unsigned char *  pay,
unsigned int  offset,
unsigned int  num_bytes 
) [static]

Dump the padding field from a packet.

Dumps the padding field from a packet.

Parameters:
pay Pointer to CCSDS packet.
offset Starting offset of the padding field.
num_bytes Length of the padding field, in bytes.
Returns:
Length of the padding field, in bytes.

Referenced by MEM_dumpDump(), MEM_dumpPci(), MEM_dumpPoolData(), MEM_dumpSymRel(), MEM_dumpSymVal(), and MEM_dumpSymValData().

void MEM_dumpCancel ( char *  pkt  ) 

Dump the Memory Dump Cancel command.

Dumps the contents of a Memory Dump Cancel command packet. The fields of the payload are assumed to be in native byte order.

Parameters:
pkt Pointer to CCSDS packet.
Returns:
Nothing.

References mem_dump_boilerplate(), and mem_dump_idents().

Referenced by MEM_sendCancel().

void MEM_dumpDump ( char *  pkt  ) 

Dump the Memory Data Dump command.

Dumps the contents of a Memory Data Dump command packet. The fields of the payload are assumed to be in native byte order.

Parameters:
pkt Pointer to CCSDS packet.
Returns:
Nothing.

References mem_dump_boilerplate(), mem_dump_dest(), mem_dump_idents(), and mem_dump_padding().

Referenced by MEM_sendDump(), and MEM_sendSsrDump().

void MEM_dumpDumpTlm ( unsigned char *  pay  ) 

Dump the Memory Dump telemetry.

Dumps the contents of a Memory Dump telemetry packet. The fields of the payload are assumed to be in native byte order.

Parameters:
pay Pointer to CCSDS packet.
Returns:
Nothing.

Referenced by MEM_dispatchDumpTlm().

void MEM_dumpLoad ( char *  pkt  ) 

Dump the Memory Write command.

Dumps the contents of a Memory Write command packet. The fields of the payload are assumed to be in native byte order.

Parameters:
pkt Pointer to CCSDS packet.
Returns:
Nothing.

References mem_dump_boilerplate(), mem_dump_data_32(), and mem_dump_idents().

Referenced by mem_load_buffer(), and MEM_sendLoad().

void MEM_dumpPci ( char *  pkt  ) 

Dump the PCI Device Header Dump command.

Dumps the contents of a PCI Device Header Dump command packet. The fields of the payload are assumed to be in native byte order.

Parameters:
pkt Pointer to CCSDS packet.
Returns:
Nothing.

References mem_dump_boilerplate(), mem_dump_idents(), and mem_dump_padding().

Referenced by MEM_sendPciDump().

void MEM_dumpPciLoad ( char *  pkt  ) 

Dump the PCI Device Header Write command.

Dumps the contents of a PCI Device Header Write command packet. The fields of the payload are assumed to be in native byte order.

Parameters:
pkt Pointer to CCSDS packet.
Returns:
Nothing.

References mem_dump_boilerplate(), and mem_dump_idents().

Referenced by MEM_sendPciLoad().

void MEM_dumpPool ( char *  pkt  ) 

Dump the Memory Pool Status Dump command.

Dumps the contents of a Memory Pool Status Dump command packet. The fields of the payload are assumed to be in native byte order.

Parameters:
pkt Pointer to CCSDS packet.
Returns:
Nothing.

References mem_dump_boilerplate(), mem_dump_idents(), and mem_interp_pool().

Referenced by MEM_sendPoolDump().

void MEM_dumpPoolData ( unsigned char *  pay  ) 

Dump the Memory Pool Status telemetry.

Dumps the contents of a Memory Pool Status telemetry packet. The fields of the payload are assumed to be in native byte order.

Parameters:
pay Pointer to CCSDS packet.
Returns:
Nothing.

References mem_dump_boilerplate(), mem_dump_idents(), mem_dump_padding(), and mem_interp_pool().

Referenced by MEM_dispatchPoolDataTlm().

void MEM_dumpReg ( char *  pkt  ) 

Dump the Processor Register Dump command.

Dumps the contents of a Processor Register Dump command packet. The fields of the payload are assumed to be in native byte order.

Parameters:
pkt Pointer to CCSDS packet.
Returns:
Nothing.

References mem_dump_boilerplate(), and mem_dump_idents().

Referenced by MEM_sendRegDump().

void MEM_dumpRegLoad ( char *  pkt  ) 

Dump the Processor Register Write command.

Dumps the contents of a Processor Register Write command packet. The fields of the payload are assumed to be in native byte order.

Parameters:
pkt Pointer to CCSDS packet.
Returns:
Nothing.

References mem_dump_boilerplate(), mem_dump_data_32(), and mem_dump_idents().

Referenced by MEM_sendRegLoad().

void MEM_dumpSymRel ( char *  pkt  ) 

Dump the Memory Dump Symbol Relative command.

Dumps the contents of a Memory Dump Symbol Relative command packet. The fields of the payload are assumed to be in native byte order.

Parameters:
pkt Pointer to CCSDS packet.
Returns:
Nothing.

References mem_dump_boilerplate(), mem_dump_data_ascii(), mem_dump_dest(), mem_dump_idents(), and mem_dump_padding().

Referenced by MEM_sendSymRelDump(), and MEM_sendSymRelSsrDump().

void MEM_dumpSymVal ( char *  pkt  ) 

Dump the Memory Symbol Lookup command.

Dumps the contents of a Memory Symbol Lookup command packet. The fields of the payload are assumed to be in native byte order.

Parameters:
pkt Pointer to CCSDS packet.
Returns:
Nothing.

References mem_dump_boilerplate(), mem_dump_data_ascii(), mem_dump_idents(), and mem_dump_padding().

Referenced by MEM_sendSymValDump().

void MEM_dumpSymValData ( unsigned char *  pay  ) 

Dump the Memory Symbol Lookup telemetry.

Dumps the contents of a Memory Symbol Lookup telemetry packet. The fields of the payload are assumed to be in native byte order.

Parameters:
pay Pointer to CCSDS packet.
Returns:
Nothing.

References mem_dump_boilerplate(), mem_dump_data_ascii(), mem_dump_idents(), and mem_dump_padding().

Referenced by MEM_dispatchSymValTlm().

const char * mem_interp_dest ( unsigned int  value  )  [static]

Interpret a destination value.

Parameters:
value Destination value.
Returns:
Pointer to description string.

Referenced by mem_dump_dest().

const char * mem_interp_pool ( unsigned int  value  )  [static]

Interpret a Pool ID value.

Parameters:
value Pool ID value.
Returns:
Pointer to description string.

Referenced by MEM_dumpPool(), and MEM_dumpPoolData().

const char * mem_interp_unit ( unsigned int  value  )  [static]

Interpret a LAT unit identifier value.

Parameters:
value LAT unit identifier value.
Returns:
Pointer to description string.

Referenced by mem_dump_idents().

int MEM_setDumpDisplayLimit ( int  limit  ) 

Set the max number of words to display from a single dump.

Parameters:
limit Max number of words to display.
Returns:
Previous limit value.

Referenced by MEM_setDumpDisplayLimit_cli().

unsigned int MEM_setDumpDisplayLimit_cli ( CLI_Control *  cli,
void *  prm 
) [static]

CLI callback for the "MEM_setDumpDisplayLimit" command.

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

References MEM_setDumpDisplayLimit().

Referenced by MEM_addDumpSyntax().


Generated on Wed Nov 21 21:10:14 2012 by  doxygen 1.5.8