GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QPD / dev > qpd / rhel5-32


Interface   Data Structures   File List   Data Fields   Globals  

QPD_disp.c File Reference

Routines for displaying miscellaneous diagnostic data. More...

#include <QPD/QPD.h>
#include <QPD/QPD_msgs.h>
#include <PBS/WCT.h>
#include <LIM/LIM_pubdefs.h>
#include <stdio.h>
#include <time.h>

Classes

struct  lookup_t

Defines

#define NELEM(x)   (sizeof x / sizeof x[0])

Functions

static int secsToStr (int secs, char *cTime)
 Convert spacecraft time to a string.
static int strLeng (const char *str, int leng)
 Find used length of a string.
void QPD_dispHeader (QPD_optns optns, QPD_flags flags, CCSDS_telemetry *pkt)
 Display a line of packet header data.
void QPD_dispCmndConf (QPD_optns optns, QPD_flags flags, unsigned secs, ITC_CmdConfirm_Tlm *pkt)
 Display a line of command confirmation data.
void QPD_dispModData (QPD_optns optns, QPD_flags flags, unsigned secs, LCM_LLCMMODLIST_Tlm *pkt)
 Display a line of LCM module data.
void QPD_dispMsgData (QPD_optns optns, QPD_flags flags, unsigned secs, LCM_LCMMSGOUTC_Tlm *pkt)
 Display a line of LCM message data.
void QPD_dispTaskData (QPD_optns optns, QPD_flags flags, unsigned secs, LCM_LLCMTASKLIST_Tlm *pkt)
 Display a line of LCM task data.
void QPD_dispLimData (QPD_optns optns, QPD_flags flags, unsigned secs, LIM_State_Tlm *pkt)
 Display a line of LIM state data.

Variables

static char * uName []
static char * nName []
static char * tName []
static lookup_t actions []
static lookup_t modes []


Detailed Description

Routines for displaying miscellaneous diagnostic data.

Author:
Owen H Saxton
Id
QPD_disp.c,v 1.3 2011/03/30 20:17:24 saxton Exp

Function Documentation

void QPD_dispCmndConf ( QPD_optns  optns,
QPD_flags  flags,
unsigned  secs,
ITC_CmdConfirm_Tlm *  pkt 
)

Display a line of command confirmation data.

This routine produces a formatted line from the contents of a command confirmation packet.

Parameters:
optns Display options.
flags The packet flags.
secs The time the confirmation was generated, in spacecraft units.
pkt The command confirmation packet to be displayed.

References QPD_FLG_NEW_APID, QPD_msgFormat(), QPD_msgText(), and secsToStr().

Referenced by QPD_readDiag().

void QPD_dispHeader ( QPD_optns  optns,
QPD_flags  flags,
CCSDS_telemetry *  pkt 
)

Display a line of packet header data.

This routine produces a formatted line from the contents of a packet header.

Parameters:
optns Display options.
flags The packet flags.
pkt The packet header to be displayed.

References QPD_FLG_FIRST, and secsToStr().

Referenced by QPD_readDiag().

void QPD_dispLimData ( QPD_optns  optns,
QPD_flags  flags,
unsigned  secs,
LIM_State_Tlm *  pkt 
)

Display a line of LIM state data.

This routine produces a formatted line from the contents of a packet of LIM state data.

Parameters:
optns Display options.
flags The packet flags.
secs The time the task data was obtained, in spacecraft units.
pkt The packet of state data to be displayed.

References QPD_FLG_NEW_APID, QPD_msgFormat(), QPD_msgText(), and secsToStr().

Referenced by QPD_readDiag().

void QPD_dispModData ( QPD_optns  optns,
QPD_flags  flags,
unsigned  secs,
LCM_LLCMMODLIST_Tlm *  pkt 
)

Display a line of LCM module data.

This routine produces a formatted line from the contents of a packet of module data.

Parameters:
optns Display options.
flags The packet flags.
secs The time the module data was obtained, in spacecraft units.
pkt The packet of module data to be displayed.

References QPD_FLG_FIRST, QPD_FLG_LAST, and secsToStr().

Referenced by QPD_readDiag().

void QPD_dispMsgData ( QPD_optns  optns,
QPD_flags  flags,
unsigned  secs,
LCM_LCMMSGOUTC_Tlm *  pkt 
)

Display a line of LCM message data.

This routine produces a formatted line from the contents of a packet of message data.

Parameters:
optns Display options.
flags The packet flags.
secs The time the message data was obtained, in spacecraft units.
pkt The packet of message data to be displayed.

References QPD_FLG_NEW_APID, QPD_OPT_VERBOSE, secsToStr(), and strLeng().

Referenced by QPD_readDiag().

void QPD_dispTaskData ( QPD_optns  optns,
QPD_flags  flags,
unsigned  secs,
LCM_LLCMTASKLIST_Tlm *  pkt 
)

Display a line of LCM task data.

This routine produces a formatted line from the contents of a packet of task data.

Parameters:
optns Display options.
flags The packet flags.
secs The time the task data was obtained, in spacecraft units.
pkt The packet of task data to be displayed.

References QPD_FLG_FIRST, QPD_FLG_LAST, and secsToStr().

Referenced by QPD_readDiag().

int secsToStr ( int  secs,
char *  cTime 
) [static]

Convert spacecraft time to a string.

This routine converts a spacecraft time, in seconds, to a string with the format YYYY-MM-DD HH:MM:SS.

Parameters:
secs The time to be converted.
cTime The address of an area to hold the converted time. It must be at least 20 bytes long (including the terminating null byte).
Returns:
The length of the converted time string.

Referenced by QPD_dispCmndConf(), QPD_dispHeader(), QPD_dispLimData(), QPD_dispModData(), QPD_dispMsgData(), and QPD_dispTaskData().

int strLeng ( const char *  str,
int  leng 
) [static]

Find used length of a string.

This routine locates the last non-blank character in a string and returns the position of the following character.

Parameters:
str The address of the string.
leng The maximum length of the string.
Returns:
The used length of the string.

Referenced by QPD_dispMsgData().


Variable Documentation

lookup_t modes[] [static]

Initial value:

 {{LIM_OP_MODE_TERMINAL,    "TERMINAL"},
                           {LIM_OP_MODE_QUIESCENT,   "QUIESCENT"},
                           {LIM_OP_MODE_CALIBRATION, "CALIBRATION"},
                           {LIM_OP_MODE_PHYSICS,     "PHYSICS"},
                           {LIM_OP_MODE_TOO,         "TOO"},
                           {LIM_OP_MODE_ARR,         "ARR"},
                           {LIM_OP_MODE_HOLD,        "HOLD"},
                           {0,                       "UNKNOWN"}}

char* nName[] [static]

Initial value:

 {"SIU", "EPU0", "EPU1", "EPU2", "EPU3", "SC", "SDI",
                        "BCST"}

char* tName[] [static]

Initial value:

 {"ANON", "LCM",  "mLFS", "sLFS", "mLHK", "sLHK",
                        "mLIM", "sLIM", "mLSM", "sLSM", "mLSW", "",
                        "mLCI", "sLCI", "LMC",  "mLPA", "sLPA", "LRA",
                        "LTC",  "GRB",  "ICT",  "",     "CRXC", "CRXT",
                        "LTX1", "LTX0", "LRXR", "LRXE", "LRXN", "CTX",
                        "STX",  "BCST"}

char* uName[] [static]

Initial value:

 {"SIU", "EPU0", "EPU1", "EPU2", "?", "?", "?", "?",
                        "?", "?", "?", "?", "?", "?", "?", "?"}


Generated on Wed Mar 30 13:39:34 2011 by  doxygen 1.5.8