GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QMEM / V0-2-1 > qmem_unit_test / rhel6-64
#include <LSF/LSF.h>
#include <LSF/LSF_ids.h>
Typedefs | |
typedef enum _QMEM_Status | QMEM_Status |
Typedef for _QMEM_Status. | |
typedef enum _QMEM_Lat_Unit | QMEM_Lat_Unit |
Typedef for _QMEM_Lat_Unit. | |
typedef enum _QMEM_Datagram_Id | QMEM_Datagram_Id |
Typedef for _QMEM_Datagram_Id. | |
typedef struct _QMEM_Context | QMEM_Context |
Typedef for opaque parsing context. | |
Enumerations | |
enum | _QMEM_Status { QMEM_STATUS_OK = 0, QMEM_STATUS_BAD_CTX = -1, QMEM_STATUS_SHORT = -2, QMEM_STATUS_TRUNCATED = -3, QMEM_STATUS_BAD_DIR = -4, QMEM_STATUS_BAD_TYPE = -5, QMEM_STATUS_BAD_VER = -6, QMEM_STATUS_BAD_HDR = -7, QMEM_STATUS_INCOMPLETE = -8, QMEM_STATUS_NULL_PTR = -9, QMEM_STATUS_BAD_CTB_LEN = -10, QMEM_STATUS_NOT_NEXT = -11 } |
QMEM function status codes. More... | |
enum | _QMEM_Lat_Unit { QMEM_LAT_UNIT_UNKNOWN = -1, QMEM_LAT_UNIT_SIU = 0, QMEM_LAT_UNIT_EPU_0 = 1, QMEM_LAT_UNIT_EPU_1 = 2, QMEM_LAT_UNIT_EPU_2 = 3 } |
Identifiers of the LAT units that can produce MEM datagrams. More... | |
enum | _QMEM_Datagram_Id { QMEM_DGM_ID_DUMP = LSF_ID_K_MEM } |
Identifiers of the MEM datagrams. More... | |
Functions | |
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. | |
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. | |
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 (const QMEM_Context *context_p) |
Return the status of the parsing of the current datagram. | |
QMEM_Lat_Unit | QMEM_lat_unit (const QMEM_Context *context_p) |
Return the LAT unit that sent a memory dump. | |
unsigned int | QMEM_tran_id (const QMEM_Context *context_p) |
Return the transaction ID value from the telecommand that requested a memory dump. | |
unsigned int | QMEM_cmd_fcode (const QMEM_Context *context_p) |
Return the function code of the telecommand that requested a memory dump. | |
unsigned int | QMEM_start_addr (const QMEM_Context *context_p) |
Return the starting address of a memory dump. | |
unsigned int | QMEM_num_datagrams (const QMEM_Context *context_p) |
Return the number of datagrams parsed for the memory dump. | |
unsigned int | QMEM_bytes_dumped (const QMEM_Context *context_p) |
Return the number of bytes dumped. | |
unsigned int | QMEM_bytes_available (const QMEM_Context *context_p) |
Return the number of dumped bytes that were saved. | |
unsigned char * | QMEM_data_buf (const QMEM_Context *context_p) |
Return a pointer to a buffer containing saved dump data. |
** CVS $Id: QMEM.h,v 1.3 2011/03/30 23:56:35 russell Exp $ **
Defines the public interface to the functions that interpret the memory dump telemetry sent to the SSR.
enum _QMEM_Datagram_Id |
enum _QMEM_Lat_Unit |
enum _QMEM_Status |
QMEM function status codes.
unsigned int QMEM_bytes_available | ( | const QMEM_Context * | context_p | ) |
Return the number of dumped bytes that were saved.
context_p | Pointer to a parsing context. |
Referenced by WRAP_get_context().
unsigned int QMEM_bytes_dumped | ( | const QMEM_Context * | context_p | ) |
Return the number of bytes dumped.
context_p | Pointer to a parsing context. |
Referenced by WRAP_get_context().
unsigned int QMEM_cmd_fcode | ( | const QMEM_Context * | context_p | ) |
Return the function code of the telecommand that requested a memory dump.
context_p | Pointer to a parsing context. |
Referenced by WRAP_get_context().
unsigned char * QMEM_data_buf | ( | const QMEM_Context * | context_p | ) |
Return a pointer to a buffer containing saved dump data.
context_p | Pointer to a parsing context. |
Referenced by WRAP_get_context().
QMEM_Status QMEM_init_context | ( | QMEM_Context * | context_p, | |
unsigned char * | data_buf_p, | |||
unsigned int | data_buf_bytes | |||
) |
Initialize a parsing context.
context_p | Pointer to the parsing context to initialize. | |
data_buf_p | Pointer to a buffer to save dumped data. | |
data_buf_bytes | Size of the data_buf_p buffer. |
Referenced by WRAP_init_context().
QMEM_Lat_Unit QMEM_lat_unit | ( | const QMEM_Context * | context_p | ) |
Return the LAT unit that sent a memory dump.
context_p | Pointer to a parsing context. |
Referenced by WRAP_get_context().
unsigned int QMEM_num_datagrams | ( | const QMEM_Context * | context_p | ) |
Return the number of datagrams parsed for the memory dump.
context_p | Pointer to a parsing context. |
Referenced by WRAP_get_context().
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.
context_p | Pointer to the parsing context for the datagram. | |
ctb_p | Pointer to the contribution. | |
dgm_bytes | Remaining size, in bytes, of the datagram. | |
dgm_swapped | Flag that datagram data is already byte-swapped. |
Referenced by WRAP_parse_contribution().
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.
context_p | Pointer to a parsing context for the datagram. | |
dgm_p | Pointer to the datagram. | |
dgm_bytes | Size, in bytes, of the datagram. | |
dgm_swapped | Flag that datagram data is already byte-swapped. |
Referenced by WRAP_parse_datagram().
unsigned int QMEM_sizeof_context | ( | void | ) |
Return the size of a parsing context.
Referenced by WRAP_alloc_context().
unsigned int QMEM_sizeof_max_datagram | ( | void | ) |
Return the maximum size of a memory dump datagram.
unsigned int QMEM_sizeof_max_dump_data | ( | void | ) |
Return the maximum amount of dump data within a datagram.
unsigned int QMEM_start_addr | ( | const QMEM_Context * | context_p | ) |
Return the starting address of a memory dump.
context_p | Pointer to a parsing context. |
Referenced by WRAP_get_context().
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.
context_p | Pointer to a parsing context for the datagram. | |
dgm_p | Pointer to the datagram. | |
dgm_bytes | Size, in bytes, of the datagram. | |
dgm_swapped | Flag that datagram data is already byte-swapped. |
Referenced by WRAP_start_parsing().
QMEM_Status QMEM_status | ( | const QMEM_Context * | context_p | ) |
Return the status of the parsing of the current datagram.
context_p | Pointer to a parsing context. |
Referenced by WRAP_get_context().
unsigned int QMEM_tran_id | ( | const QMEM_Context * | context_p | ) |
Return the transaction ID value from the telecommand that requested a memory dump.
context_p | Pointer to a parsing context. |
Referenced by WRAP_get_context().