GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QLIH / V0-0-4 > qlih_print / rhel5-32


Interface   Data Structures   File List   Data Fields   Globals  

QLIH_print.c File Reference

The implementation of the qlih_extract command. More...

#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <CLI/CLI_pubdefs.h>
#include <LSF/LSF_ids.h>
#include <LIH/LIH_tlmdefs.h>
#include <LIH_DB/LIH_DB_ADCdefs.h>
#include <LIH_DB/LIH_DB_pubdefs.h>
#include <MSG/MSG_printProc.h>
#include <MSG/MSG_pubdefs.h>
#include <PBI/Endianness.h>
#include <PBS/FFS.ih>
#include <PBS/TASK.h>
#include <QLIH/QLIH_msgs.h>
#include <QSD/CCSDS_apidDsc.h>
#include <QSD/CCSDS_istream.h>
#include <QSD/CCSDS_telemetry.h>
#include <ZLIB/zlib.h>
#include <LIH_prvdefs.h>
#include <QLIH_macdefs.h>

Classes

struct  _QLIH_Control
 Structure to control the printing process. More...
struct  _QLIH_Command
 Structure to control the printing process. More...

Defines

#define QLIH_L_ADC_MASK   ( ( LIH_DB_L_ADC + 31 ) >> 5 )
#define QLIH_M_LIMITS   (0x01)
#define QLIH_M_PERSIST   (0x02)
#define QLIH_M_SETTLE   (0x02)
#define QLIH_M_ACTIONS   (0x04)
#define QLIH_M_NAG   (0x04)
#define QLIH_M_ALL   (0x07)

Typedefs

typedef struct _QLIH_Control QLIH_Control
 Typedef for struct _QLIH_Control.
typedef struct _QLIH_Command QLIH_Command
 Typedef for struct _QLIH_Command.

Functions

unsigned int QLIH_readDatagram (QLIH_Control *qcb)
 Dump some or all aspects of the limit database.
unsigned int QLIH_parseAdcList (CLI_Control *ctl, QLIH_Command *cmd)
 Parse the ADC list.
unsigned int QLIH_parseElements (CLI_Control *ctl, QLIH_Command *cmd)
 Parse the ADC list.
CLI_Syntax * syntax (void)
 Define the qlih_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.
int main (int argc, char *argv[])
 Main routine.
unsigned int QLIH_header (CLI_Control *ctl, void *prm)
 Dump the limit database header.
unsigned int QLIH_help (CLI_Control *ctl, void *prm)
 Handle the verb help.
unsigned int QLIH_limits (CLI_Control *ctl, void *prm)

Variables

QLIH_Control qcb
 Instantiate a structure to provide buffering and a buffer descriptor.
static const char * s_actions = "actions"
 The string "actions".
static const char * s_adc = "adc"
 The string "adc".
static const char * s_all = "all"
 The string "all".
static const char * s_header = "header"
 The string "header".
static const char * s_help = "help"
 The string "help".
static const char * s_limits = "limits"
 The string "limits".
static const char * s_nag = "nag"
 The string "nag".
static const char * s_persist = "persist"
 The string "persist".
static const char * s_QLIH = "QLIH"
 The string "QLIH".
static const char * s_settle = "settle"
 The string "settle".
static const char * s_show = "show"
 The string "show".
static const char * s__unknown_ = "<unknown>"
 The string "<unknown>".
static const char * d_0 = "$0"
 The string "$0".
static const char * f_header = "QLIH_header"
 The function name "QLIH_header".
static const char * f_help = "QLIH_help"
 The function name "QLIH_help".
static const char * f_limits = "QLIH_limits"
 The function name "QLIH_limits".
static const char * s_enable [2] = { "disabled", "enabled" }
 Strings describing the limit chekcing enable state.
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.


Detailed Description

The implementation of the qlih_extract command.

CVS $Id: QLIH_print.c,v 1.5 2011/03/30 23:17:44 russell Exp $
Author:
A.P.Waite

Function Documentation

unsigned int QLIH_header ( CLI_Control *  ctl,
void *  prm 
)

Dump the limit database header.

Parameters:
ctl (in) Anonymous control pointer
prm (in) User parameter (QLIH control block pointer)
Returns:
Status code

References _QLIH_Control::hdr, _QLIH_Control::ipf, and QLIH_readDatagram().

Referenced by syntax().

unsigned int QLIH_help ( CLI_Control *  ctl,
void *  prm 
)

Handle the verb help.

Parameters:
ctl (in) Anonymous control pointer
prm (in) User parameter (QLIH control block pointer)
Returns:
Status code

Referenced by syntax().

unsigned int QLIH_limits ( CLI_Control *  ctl,
void *  prm 
)

Parameters:
ctl (in) Anonymous control pointer
prm (in) User parameter (QLIH control block pointer)
Returns:
Status code

References _QLIH_Command::adc, _QLIH_Control::ipf, QLIH_parseAdcList(), QLIH_parseElements(), QLIH_readDatagram(), and _QLIH_Control::tbl.

Referenced by syntax().

unsigned int QLIH_parseAdcList ( CLI_Control *  ctl,
QLIH_Command cmd 
)

Parse the ADC list.

Parameters:
ctl (in) Anonymous control pointer
cmd (in) Command structure
Returns:
Status code

References _QLIH_Command::adc.

Referenced by QLIH_limits().

unsigned int QLIH_parseElements ( CLI_Control *  ctl,
QLIH_Command cmd 
)

Parse the ADC list.

Parameters:
ctl (in) Anonymous control pointer
cmd (in) Command structure
Returns:
Status code

References _QLIH_Command::sho.

Referenced by QLIH_limits().

unsigned int QLIH_readDatagram ( QLIH_Control qcb  ) 

Dump some or all aspects of the limit database.

Parameters:
qcb (in) QLIH control block
Returns:
Status code

References _QLIH_Control::buffer, _QLIH_Control::buflen, _QLIH_Control::dsc, _QLIH_Control::hdr, _QLIH_Control::ipf, _QLIH_Control::tbl, zlibAlloc(), and zlibFree().

Referenced by QLIH_header(), and QLIH_limits().

CLI_Syntax * syntax ( void   ) 

Define the qlih_print syntax.

Returns:
Primary syntax pointer

References QLIH_header(), QLIH_help(), and QLIH_limits().

Referenced by main().

static void * zlibAlloc ( void *  prm,
unsigned int  cnt,
unsigned int  siz 
) [static]

Allocate memory for ZLIB.

Parameters:
prm (in) User parameter (unused)
cnt (in) Count of objects
siz (in) Size of object (in bytes)
Return values:
NULL Cannot allocate
x Pointer to allocated memory
Allocate memory for ZLIB.

Referenced by QLIH_readDatagram().

static void zlibFree ( void *  prm,
void *  add 
) [static]

Free memory for ZLIB.

Parameters:
prm (in) User parameter (unused)
add (in) Address to free
Return values:
NULL Cannot allocate
x Pointer to allocated memory
Free memory for ZLIB.

Referenced by QLIH_readDatagram().


Variable Documentation

s_ins [static]

Initial value:

 { "<unknown>", "mordor",  "gondor", "dimbar",
                                "arnor",     "orthanc", "shire",  "erebor" }
Instrument names.

s_nod [static]

Initial value:

 { "<unknown>",     "SIU-ext/EPU3",
                                "SIU redundant", "SIU primary", 
                                "EPU0",          "EPU1",         "EPU2" }
Node names.


Generated on Tue Nov 29 20:56:29 2011 by  doxygen 1.5.8