GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > QMEM / V0-0-0
Constituent: qmem     Tag: sun-gcc
#include <string.h>
#include "LSF/LSF.h"
#include "LSF/LSF_ids.h"
#include "PBI/Endianness.h"
#include "QMEM/QMEM.h"
Include dependency graph for QMEM.c:
Data Structures | |
struct | _QMEM_Dump_Ident |
Indentifying information for a memory dump. More... | |
struct | _QMEM_Dump_Desc |
Description of a memory dump. More... | |
struct | _QMEM_Context |
Context of a datagram parsing operation. More... | |
Defines | |
#define | QMEM_CONTEXT_VALID_KEY (('Q'<<24)+('C'<<16)+('T'<<8)+'X') |
Value that indicates a parsing context is valid. | |
#define | QMEM_MAX_DATAGRAM_BYTES (2048) |
Maximum size, in bytes, of a memory dump datagram. | |
#define | QMEM_MAX_DUMP_DATA_BYTES (QMEM_MAX_DATAGRAM_BYTES) |
Maximum amount, in bytes, of dump data within a datagram. | |
Typedefs | |
typedef enum _QMEM_Contribution_Id | QMEM_Contribution_Id |
Typedef for _QMEM_Contribution_Id. | |
typedef enum _QMEM_Parse_State | QMEM_Parse_State |
Typedef for _QMEM_Parse_State. | |
typedef _QMEM_Dump_Ident | QMEM_Dump_Ident |
Typedef for _QMEM_Dump_Ident. | |
typedef _QMEM_Dump_Desc | QMEM_Dump_Desc |
Typedef for _QMEM_Dump_Desc. | |
Enumerations | |
enum | _QMEM_Contribution_Id { QMEM_CTB_ID_DESC = 1, QMEM_CTB_ID_DATA = 2 } |
Identifiers of the MEM datagram contributions. More... | |
enum | _QMEM_Parse_State { QMEM_STATE_UNKNOWN = 0, QMEM_STATE_START = 1, QMEM_STATE_DESC = 2, QMEM_STATE_DATA = 3 } |
Memory dump parser states. More... | |
Functions | |
static int | qmem_context_is_valid (QMEM_Context *context_p) |
Validate a parsing context. | |
static void | qmem_swap_copy (unsigned char *dst_p, const unsigned char *src_p, unsigned int num_bytes) |
Copy and byte-swap a buffer of data. | |
static void | qmem_swap_check (unsigned char *dst_p, const unsigned char *src_p, unsigned int num_bytes, int swapped) |
Copy and possibly byte-swap a buffer of data. | |
unsigned int | QMEM_sizeof_context (void) |
Return the size of a parsing context. | |
unsigned int | QMEM_sizeof_max_dump_data (void) |
Return the maximum amount of dump data within a datagram. | |
unsigned int | QMEM_sizeof_max_datagram (void) |
Return the maximum size of a memory dump datagram. | |
QMEM_Status | QMEM_init_context (QMEM_Context *context_p, unsigned char *data_buf_p, unsigned int data_buf_bytes) |
Initialize a parsing context. | |
static QMEM_Status | qmem_check_identity (const LSF_identity *act_id_p, unsigned int exp_type_id, unsigned int exp_version, unsigned int exp_dir) |
Validate an 'identity' value from a header. | |
QMEM_Status | QMEM_start_parsing (QMEM_Context *context_p, const LSF_datagram *dgm_p, unsigned int dgm_bytes, int dgm_swapped) |
Start parsing a datagram. | |
static QMEM_Status | qmem_parse_desc_ctb (QMEM_Context *context_p, const LSF_contribution *ctb_p, LSF_contribution_hdr *hdr_p, int dgm_swapped) |
Parse a memory dump description contribution. | |
static QMEM_Status | qmem_parse_data_ctb (QMEM_Context *context_p, const LSF_contribution *ctb_p, LSF_contribution_hdr *hdr_p, int dgm_swapped) |
Parse a memory dump data contribution. | |
QMEM_Status | QMEM_parse_contribution (QMEM_Context *context_p, const LSF_contribution *ctb_p, unsigned int dgm_bytes, int dgm_swapped) |
Parse a contribution within a datagram. | |
QMEM_Status | QMEM_parse_datagram (QMEM_Context *context_p, const LSF_datagram *dgm_p, unsigned int dgm_bytes, int dgm_swapped) |
Parse an entire memory dump datagram. | |
QMEM_Status | QMEM_status (QMEM_Context *context_p) |
Return the status of the parsing of the current datagram. | |
QMEM_Lat_Unit | QMEM_lat_unit (QMEM_Context *context_p) |
Return the LAT unit that sent a memory dump. | |
unsigned int | QMEM_tran_id (QMEM_Context *context_p) |
Return the transaction ID value from the telecommand that requested a memory dump. | |
unsigned int | QMEM_cmd_fcode (QMEM_Context *context_p) |
Return the function code of the telecommand that requested a memory dump. | |
unsigned int | QMEM_start_addr (QMEM_Context *context_p) |
Return the starting address of a memory dump. | |
unsigned int | QMEM_num_datagrams (QMEM_Context *context_p) |
Return the number of datagrams parsed for the memory dump. | |
unsigned int | QMEM_bytes_dumped (QMEM_Context *context_p) |
Return the number of bytes dumped. | |
unsigned int | QMEM_bytes_available (QMEM_Context *context_p) |
Return the number of dumped bytes that were saved. | |
unsigned char * | QMEM_data_buf (QMEM_Context *context_p) |
Return a pointer to a buffer containing saved dump data. |
** CVS $Id: QMEM.c,v 1.1.1.1 2005/12/13 21:46:07 dmay Exp $ **
These functions interpret the memory dump telemetry sent to the SSR.
|
Identifiers of the MEM datagram contributions.
|
|
Memory dump parser states.
|
|
Return the number of dumped bytes that were saved.
|
|
Return the number of bytes dumped.
|
|
Validate an 'identity' value from a header.
|
|
Return the function code of the telecommand that requested a memory dump.
|
|
Validate a parsing context.
|
|
Return a pointer to a buffer containing saved dump data.
|
|
Initialize a parsing context.
|
|
Return the LAT unit that sent a memory dump.
|
|
Return the number of datagrams parsed for the memory dump.
|
|
Parse a contribution within a datagram.
|
|
Parse a memory dump data contribution.
|
|
Parse an entire memory dump datagram.
|
|
Parse a memory dump description contribution.
|
|
Return the size of a parsing context.
|
|
Return the maximum size of a memory dump datagram.
|
|
Return the maximum amount of dump data within a datagram.
|
|
Return the starting address of a memory dump.
|
|
Start parsing a datagram.
|
|
Return the status of the parsing of the current datagram.
|
|
Copy and possibly byte-swap a buffer of data.
|
|
Copy and byte-swap a buffer of data.
|
|
Return the transaction ID value from the telecommand that requested a memory dump.
|