GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QLCM / V0-5-3 > qlcm_print / rhel6-32
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <CAB/CAB_asBuiltPub.h>
#include <CLI/CLI_pubdefs.h>
#include <LSF/LSF_ids.h>
#include <LCM/LCM_tlmdefs.h>
#include <MSG/MSG_printProc.h>
#include <MSG/MSG_pubdefs.h>
#include <PBI/Endianness.h>
#include <QLCM/QLCM_msgs.h>
#include <QSD/CCSDS_apidDsc.h>
#include <QSD/CCSDS_istream.h>
#include <QSD/CCSDS_telemetry.h>
#include <ZLIB/zlib.h>
#include <LCM_prvdefs.h>
#include <QLCM_macdefs.h>
#include <PBI/PTR.h>
Classes | |
struct | _QLCM_Control |
Structure to control the printing process. More... | |
struct | _QLCM_Command |
Structure to control the printing process. More... | |
Defines | |
#define | QLCM_M_HEADER (0x01) |
#define | QLCM_M_CAB (0x02) |
#define | QLCM_M_LOAD (0x04) |
#define | QLCM_M_TASKS (0x08) |
#define | QLCM_M_MODULES (0x06) |
#define | QLCM_M_ALL (0x0f) |
Typedefs | |
typedef struct _QLCM_Control | QLCM_Control |
Typedef for struct _QLCM_Control. | |
typedef struct _QLCM_Command | QLCM_Command |
Typedef for struct _QLCM_Command. | |
Functions | |
unsigned int | QLCM_printCabTable (QLCM_Control *qcb) |
Print an image information block header. | |
unsigned int | QLCM_printHeader (QLCM_Control *qcb) |
Print an image information block header. | |
unsigned int | QLCM_printLoadTable (QLCM_Control *qcb) |
Print an image information block header. | |
unsigned int | QLCM_printTaskTable (QLCM_Control *qcb) |
Print an image information block header. | |
unsigned int | QLCM_readDatagram (QLCM_Control *qcb, QLCM_Command *cmd) |
Dump some or all aspects of the limit database. | |
CLI_Syntax * | syntax (void) |
Define the qlcm_print syntax. | |
static void * | zlibAlloc (void *prm, unsigned int cnt, unsigned int siz) |
Allocate memory for ZLIB. | |
static void | zlibFree (void *prm, void *add) |
Free memory for ZLIB. | |
static int | comptask (const void *t0, const void *t1) |
Compare tasks by priority (descending). | |
int | main (int argc, char *argv[]) |
Main routine. | |
unsigned int | QLCM_help (CLI_Control *ctl, void *prm) |
Handle the verb help. | |
unsigned int | QLCM_image (CLI_Control *ctl, void *prm) |
Variables | |
QLCM_Control | qcb |
Instantiate a structure to provide buffering and a buffer descriptor. | |
static const char * | s_cab = "cab" |
The string "cab". | |
static const char * | s_header = "header" |
The string "header". | |
static const char * | s_help = "help" |
The string "help". | |
static const char * | s_image = "image" |
The string "image". | |
static const char * | s_load = "load" |
The string "load". | |
static const char * | s_modules = "modules" |
The string "modules". | |
static const char * | s_QLCM = "QLCM" |
The string "QLCM". | |
static const char * | s_tasks = "tasks" |
The string "tasks". | |
static const char * | s__unknown_ = "<unknown>" |
The string "<unknown>". | |
static const char * | d_0 = "$0" |
The string "$0". | |
static const char * | f_help = "QLCM_help" |
The function name "QLCM_help". | |
static const char * | f_image = "QLCM_image" |
The function name "QLCM_image". | |
static const char * | s_source [2] = { "external command", "internal request" } |
Strings describing the source of the dump request. | |
static const char * | s_ins [8] |
Instrument names. | |
static const char * | s_nod [7] |
Node names. | |
static const char | s_ruleEqual [] = { "======================================" } |
Static string used in formatting dumps. | |
static const char | s_ruleMinus [] = { "--------------------------------------" } |
Static string used in formatting dumps. |
CVS $Id: QLCM_print.c,v 1.3 2011/03/30 02:22:07 apw Exp $
static int comptask | ( | const void * | t0, | |
const void * | t1 | |||
) | [static] |
Compare tasks by priority (descending).
t0 | (in) Task zero (left) in comparison | |
t1 | (in) Task one (right) in comparison |
-1 | t0 < t1 | |
0 | t0 == t1 | |
1 | t0 > t1 |
Referenced by QLCM_readDatagram().
unsigned int QLCM_help | ( | CLI_Control * | ctl, | |
void * | prm | |||
) |
Handle the verb help.
ctl | (in) Anonymous control pointer | |
prm | (in) User parameter (QLCM control block pointer) |
Referenced by syntax().
unsigned int QLCM_image | ( | CLI_Control * | ctl, | |
void * | prm | |||
) |
ctl | (in) Anonymous control pointer | |
prm | (in) User parameter (QLCM control block pointer) |
References _QLCM_Command::cpu, _QLCM_Control::ipf, QLCM_printCabTable(), QLCM_printHeader(), QLCM_printLoadTable(), QLCM_printTaskTable(), QLCM_readDatagram(), and _QLCM_Command::sho.
Referenced by syntax().
unsigned int QLCM_printCabTable | ( | QLCM_Control * | qcb | ) |
Print an image information block header.
qcb | (in) QLCM control block |
References _QLCM_Control::hdr, and _QLCM_Control::mtbl.
Referenced by QLCM_image().
unsigned int QLCM_printHeader | ( | QLCM_Control * | qcb | ) |
Print an image information block header.
qcb | (in) QLCM control block |
References _QLCM_Control::hdr, and _QLCM_Control::ipf.
Referenced by QLCM_image().
unsigned int QLCM_printLoadTable | ( | QLCM_Control * | qcb | ) |
Print an image information block header.
qcb | (in) QLCM control block |
References _QLCM_Control::hdr, and _QLCM_Control::mtbl.
Referenced by QLCM_image().
unsigned int QLCM_printTaskTable | ( | QLCM_Control * | qcb | ) |
Print an image information block header.
qcb | (in) QLCM control block |
References _QLCM_Control::hdr, and _QLCM_Control::ttbl.
Referenced by QLCM_image().
unsigned int QLCM_readDatagram | ( | QLCM_Control * | qcb, | |
QLCM_Command * | cmd | |||
) |
Dump some or all aspects of the limit database.
qcb | (in) QLCM control block | |
cmd | (in) QLCM command block |
References _QLCM_Control::buffer, _QLCM_Control::buflen, comptask(), _QLCM_Command::cpu, _QLCM_Control::dsc, _QLCM_Control::hdr, _QLCM_Control::ipf, _QLCM_Control::mtbl, _QLCM_Control::stbl, _QLCM_Control::ttbl, zlibAlloc(), and zlibFree().
Referenced by QLCM_image().
CLI_Syntax * syntax | ( | void | ) |
Define the qlcm_print syntax.
References QLCM_help(), and QLCM_image().
Referenced by main().
static void * zlibAlloc | ( | void * | prm, | |
unsigned int | cnt, | |||
unsigned int | siz | |||
) | [static] |
Allocate memory for ZLIB.
prm | (in) User parameter (unused) | |
cnt | (in) Count of objects | |
siz | (in) Size of object (in bytes) |
NULL | Cannot allocate | |
x | Pointer to allocated memory |
Referenced by QLCM_readDatagram().
static void zlibFree | ( | void * | prm, | |
void * | add | |||
) | [static] |
Free memory for ZLIB.
prm | (in) User parameter (unused) | |
add | (in) Address to free |
NULL | Cannot allocate | |
x | Pointer to allocated memory |
Referenced by QLCM_readDatagram().
s_ins [static] |
Initial value:
{ "<unknown>", "mordor", "gondor", "dimbar", "arnor", "orthanc", "shire", "erebor" }
s_nod [static] |
Initial value:
{ "<unknown>", "SIU-ext/EPU3", "SIU redundant", "SIU primary", "EPU0", "EPU1", "EPU2" }