GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > QMEM / V0-2-0
Constituent: qmem_dump_packets     Tag: linux-gcc
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
#include "QMEM/QMEM.h"
Include dependency graph for qmem_dump_packets.c:
Data Structures | |
struct | _Dump_State |
State information for collecting memory dump datagrams. More... | |
Defines | |
#define | PROG_NAME "qmem_dump_packets" |
#define | STATUS_USAGE ( -1) |
#define | STATUS_BAD_OPEN ( -4) |
#define | STATUS_BAD_CLOSE ( -5) |
#define | STATUS_TRUNCATED (-10) |
#define | STATUS_BAD_PKT (-11) |
#define | STATUS_BAD_ALLOC (-12) |
#define | STATUS_BAD_PARSE (-13) |
#define | STATUS_SHORT_BUFFER (-14) |
Typedefs | |
typedef _Dump_State | Dump_State |
Typedef for _Dump_State. | |
Functions | |
static int | show_usage (void) |
Display a usage message for the program. | |
static int | show_bad_packet (unsigned int file_offset) |
Display a bad CCSDS packet message. | |
static int | show_short_buffer (unsigned int buf_bytes, unsigned int bytes_needed) |
Display a short packet buffer message. | |
static int | show_truncated (char *desc, unsigned int file_offset) |
Display a truncated file message. | |
static int | show_qmem_status (QMEM_Status q_status) |
Display QMEM function failure status. | |
static int | alloc (void **alloc_pp, unsigned int num_bytes) |
Allocate memory. | |
static void | display_dump (Dump_State *state_p) |
Display memory dump information. | |
static int | get_ccsds_pkt (Dump_State *state_p) |
Read a CCSDS packet into a packet buffer. | |
static int | parse_buffer (Dump_State *state_p) |
Parse a packet buffer as a memory dump datagram. | |
static int | process_file (FILE *in_file, char *out_fname) |
Read CCSDS packets from a file and process them as datagrams. | |
int | main (int argc, char **argv) |
Entry point for the program. |
** CVS $Id: qmem_dump_packets.c,v 1.2 2005/12/27 14:51:26 dmay Exp $ **
This utility extracts memory dump information from a set of CCSDS packets and displays the results.
See the show_usage() function for a description of the options for this program.
|
Allocate memory.
|
|
Display memory dump information.
|
|
Read a CCSDS packet into a packet buffer.
|
|
Entry point for the program.
|
|
Parse a packet buffer as a memory dump datagram.
|
|
Read CCSDS packets from a file and process them as datagrams.
|
|
Display a bad CCSDS packet message.
|
|
Display QMEM function failure status.
|
|
Display a short packet buffer message.
|
|
Display a truncated file message.
|
|
Display a usage message for the program.
|