GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> MEM / V5-8-2 > mem_scp / rhel6-32
#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. |
CVS $Id: MEM_dump_cmd.c,v 1.11 2011/03/29 01:58:52 apw Exp $
unsigned int MEM_addDumpSyntax | ( | CLI_Syntax * | syntax | ) |
Add MEM dump commands to the command-line syntax.
syntax | Syntax handle. |
References MEM_setDumpDisplayLimit_cli().
Referenced by MEM_addSyntaxSCP().
unsigned int MEM_dispatchDumpTlm | ( | void * | prm, | |
unsigned char * | pkt | |||
) |
Dispatch routine for arriving dump data telemetry.
prm | (in) User context parameter | |
pkt | (in) The CTDB received telemetry |
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.
prm | User context parameter (unused). | |
pkt | Pointer to CCSDS packet. |
References MEM_dumpPoolData().
unsigned int MEM_dispatchSsrTlm | ( | void * | prm, | |
unsigned char * | pkt | |||
) |
Dispatch routine for arriving SSR telemetry.
prm | User context parameter (unused). | |
pkt | Pointer to CCSDS packet. |
References QMEM_dump().
unsigned int MEM_dispatchSymValTlm | ( | void * | prm, | |
unsigned char * | pkt | |||
) |
Dispatch routine for arriving symbol value telemetry.
prm | User context parameter (unused). | |
pkt | Pointer to CCSDS packet. |
References MEM_dumpSymValData().
unsigned int MEM_dispatchTlm | ( | void * | prm, | |
unsigned char * | pkt | |||
) |
Dispatch routine for arriving housekeeping telemetry.
prm | (in) User context parameter | |
pkt | (in) The CTDB received telemetry |
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.
pkt_name | Pointer to name for the information in the packet. |
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.
pay | Pointer to CCSDS packet. | |
offset | Starting offset of the first data field. | |
num_words | Number of 32-bit data fields to dump. |
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.
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. |
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.
pay | Pointer to CCSDS packet. | |
offset | Starting offset of the destination field. |
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.
pay | Pointer to CCSDS packet. | |
offset | Starting offset of the LAT-unit/transaction-ID field. |
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.
pay | Pointer to CCSDS packet. | |
offset | Starting offset of the padding field. | |
num_bytes | 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.
pkt | Pointer to CCSDS packet. |
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.
pkt | Pointer to CCSDS packet. |
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.
pay | Pointer to CCSDS packet. |
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.
pkt | Pointer to CCSDS packet. |
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.
pkt | Pointer to CCSDS packet. |
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.
pkt | Pointer to CCSDS packet. |
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.
pkt | Pointer to CCSDS packet. |
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.
pay | Pointer to CCSDS packet. |
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.
pkt | Pointer to CCSDS packet. |
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.
pkt | Pointer to CCSDS packet. |
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.
pkt | Pointer to CCSDS packet. |
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.
pkt | Pointer to CCSDS packet. |
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.
pay | Pointer to CCSDS packet. |
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.
value | Destination value. |
Referenced by mem_dump_dest().
const char * mem_interp_pool | ( | unsigned int | value | ) | [static] |
Interpret a Pool ID value.
value | Pool ID value. |
Referenced by MEM_dumpPool(), and MEM_dumpPoolData().
const char * mem_interp_unit | ( | unsigned int | value | ) | [static] |
Interpret a LAT unit identifier value.
value | LAT unit identifier value. |
Referenced by mem_dump_idents().
int MEM_setDumpDisplayLimit | ( | int | limit | ) |
Set the max number of words to display from a single dump.
limit | Max number of words to display. |
Referenced by MEM_setDumpDisplayLimit_cli().
unsigned int MEM_setDumpDisplayLimit_cli | ( | CLI_Control * | cli, | |
void * | prm | |||
) | [static] |
CLI callback for the "MEM_setDumpDisplayLimit" command.
cli | CLI control handle. | |
prm | User parameter (unused). |
0 | Success. | |
Nonzero | Failure. |
References MEM_setDumpDisplayLimit().
Referenced by MEM_addDumpSyntax().