GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LIH / V0-2-5 > lih / mv2304
#include <string.h>
#include "CCSDS/CCSDS_pkt.h"
#include "CDM/CDM_pubdefs.h"
#include "IMM/FPM_pubdefs.h"
#include "IMM/RBM_pubdefs.h"
#include "ITC/ITC_drvdefs.h"
#include "ITC/ITC_pubdefs.h"
#include "LCBD/LCBD_drv.h"
#include "LIH_DB/LIH_DB_schema.h"
#include "LHK/LHK_pubdefs.h"
#include "MDB/MDB_pubdefs.h"
#include "PBS/FPA.h"
#include "PBS/MBA.h"
#include "PBS/MTX.h"
#include "PBS/RW.ih"
#include "PBS/WUT.h"
#include "LIH/LIH_cmdxtrn.h"
#include "LIH/LIH_msgs.h"
#include "LIH/LIH_tlmdefs.h"
#include "LIH_packet.h"
#include "LIH_prvdefs.h"
#include "LIH_source.h"
Functions | |
static LHK_PacketStatus | capture (unsigned int *prv, unsigned int abas, unsigned int aidx, unsigned int seq, unsigned char *out) |
Copy hardware monitoring housekeeping packets from packet database. | |
static unsigned int | control_rx (void *prm, const ITC_QueueItem *qitem, void *pay, unsigned int len) |
Process messages arriving on the control queue. | |
static WUT_cb_status | expireTimer (void *prm, WUT_tmr *tmr) |
Timer callback routine (called at interrupt level). | |
static FORK_cb_status | forkTimer (FORK_cb_prm *prm, FORK_msg_hdr *hdr) |
Task level target of the cyclic interrupt timer. | |
static unsigned int | initializeAcq (LIH_Control *hcb, LIH_DB_Schema *ldb) |
Initialize the hardware acquisition facilities. | |
static unsigned int | initializeLCB (LIH_Control *hcb, LIH_DB_Schema *ldb) |
Initialize the LCB controls. | |
static unsigned int | initializeLimits (LIH_Control *hcb, LIH_DB_Schema *ldb) |
Initialize the ADC limit monitoring controls. | |
static unsigned int | initializeTask (LIH_Control *hcb, LIH_DB_Schema *ldb) |
Initialize the LIH hardware monitoring task. | |
static void | taskOnce (void *prm) |
One-time call (in task context) to initialize the cLIH task. | |
unsigned int | LIH_initialize () |
Initialize the LIH hardware monitoring facility. | |
unsigned int | LIH_start () |
Start the LIH hardware monitoring task. | |
Variables | |
LIH_Control * | LIH_hcb |
Control block for the LIH hardware monitoring facility. | |
unsigned int | LIH_aidx2hpk [ITC_L_APID_HOUSE] |
Reverse map from APID index to hardware packet. | |
static const char * | s_offon [2] = { "off", "on" } |
Strings used in error reporting. |
CVS $Id: LIH_control.c,v 1.4 2008/08/28 21:02:57 apw Exp $
static LHK_PacketStatus capture | ( | unsigned int * | sav, | |
unsigned int | abas, | |||
unsigned int | aidx, | |||
unsigned int | seq, | |||
unsigned char * | out | |||
) | [static] |
Copy hardware monitoring housekeeping packets from packet database.
sav | (in) User parameter (update counter of last packet copy) | |
abas | (in) Base of APID table (ITC_K_APID_HOUSE or ITC_K_APID_DIAG) | |
aidx | (in) APID index | |
seq | (in) CCSDS sequence count | |
out | (in) Output buffer (beginning of CCSDS telemetry header) |
static unsigned int control_rx | ( | void * | prm, | |
const ITC_QueueItem * | qitem, | |||
void * | pay, | |||
unsigned int | len | |||
) | [static] |
Process messages arriving on the control queue.
prm | (in) User context parameter | |
qitem | (in) Queue item to process | |
pay | (in) Queue item payload | |
len | (in) Queue item payload length |
static WUT_cb_status expireTimer | ( | void * | prm, | |
WUT_tmr * | tmr | |||
) | [static] |
Timer callback routine (called at interrupt level).
prm | (in) User parameter (harware monitoring control block) | |
tmr | (in) Wake up timer handle |
static FORK_cb_status forkTimer | ( | FORK_cb_prm * | prm, | |
FORK_msg_hdr * | hdr | |||
) | [static] |
Task level target of the cyclic interrupt timer.
prm | (in) FORK parameter (not used) (cannot be used!) | |
hdr | (in) The fork message (not used) |
static unsigned int initializeAcq | ( | LIH_Control * | hcb, | |
LIH_DB_Schema * | ldb | |||
) | [static] |
Initialize the hardware acquisition facilities.
hcb | (in) LIH hardware monitoring control block | |
ldb | (in) LIH data handle (from CDM) |
static unsigned int initializeLCB | ( | LIH_Control * | hcb, | |
LIH_DB_Schema * | ldb | |||
) | [static] |
Initialize the LCB controls.
hcb | (in) LIH hardware monitoring control block | |
ldb | (in) LIH data handle (from CDM) |
static unsigned int initializeLimits | ( | LIH_Control * | hcb, | |
LIH_DB_Schema * | ldb | |||
) | [static] |
Initialize the ADC limit monitoring controls.
hcb | (in) LIH hardware monitoring control block | |
ldb | (in) LIH data handle (from CDM) |
static unsigned int initializeTask | ( | LIH_Control * | hcb, | |
LIH_DB_Schema * | ldb | |||
) | [static] |
Initialize the LIH hardware monitoring task.
hcb | (in) LIH hardware monitoring control block | |
ldb | (in) LIH data handle (from CDM) |
unsigned int LIH_initialize | ( | ) |
Initialize the LIH hardware monitoring facility.
LIH_initialize() does all the initialization required by the hardware monitoring facilities in LIH.
unsigned int LIH_start | ( | ) |
Start the LIH hardware monitoring task.
LIH_start() starts the LIH hardware monitoring task