GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LIH / V0-1-0

Constituent: lih     Tag: mv2304


Interface   Data Structures   File List   Data Fields   Globals  

LIH_control.c File Reference

Control functions for the LIH hardware moitoring facility. More...

#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/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"

Include dependency graph for LIH_control.c:


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_ControlLIH_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.

Detailed Description

Control functions for the LIH hardware moitoring facility.

CVS $Id: LIH_control.c,v 1.3 2007/12/07 03:59:21 apw Exp $
Author:
A.P.Waite
LIH_control.c provides all the infrastucture to run hardware monitoring facilities for LAT housekeeping.

Function Documentation

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.

Parameters:
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)
Returns:
A member of the LIH_PacketStatus enumeration

static unsigned int control_rx void *  prm,
const ITC_QueueItem *  qitem,
void *  pay,
unsigned int  len
[static]
 

Process messages arriving on the control queue.

Parameters:
prm (in) User context parameter
qitem (in) Queue item to process
pay (in) Queue item payload
len (in) Queue item payload length
control_rx() is the callback routine for any raw protocol ITC traffic arriving on the control queue. For now, there is no such traffic, and this routine is a NOOP.

static WUT_cb_status expireTimer void *  prm,
WUT_tmr *  tmr
[static]
 

Timer callback routine (called at interrupt level).

Parameters:
prm (in) User parameter (harware monitoring control block)
tmr (in) Wake up timer handle
expireTimer() is a timer callback routine. It simply wakes up the harware monitoring task.

static FORK_cb_status forkTimer FORK_cb_prm *  prm,
FORK_msg_hdr *  hdr
[static]
 

Task level target of the cyclic interrupt timer.

Parameters:
prm (in) FORK parameter (not used) (cannot be used!)
hdr (in) The fork message (not used)
forkTimer() drives the cyclic hardware monitoring functions.

static unsigned int initializeAcq LIH_Control hcb,
LIH_DB_Schema *  ldb
[static]
 

Initialize the hardware acquisition facilities.

Parameters:
hcb (in) LIH hardware monitoring control block
ldb (in) LIH data handle (from CDM)
initializeAcq() builds up the LIH hardware mmonitoring acquisition facilities.

static unsigned int initializeLCB LIH_Control hcb,
LIH_DB_Schema *  ldb
[static]
 

Initialize the LCB controls.

Parameters:
hcb (in) LIH hardware monitoring control block
ldb (in) LIH data handle (from CDM)
initializeLCB() initializes the LCB controls

static unsigned int initializeLimits LIH_Control hcb,
LIH_DB_Schema *  ldb
[static]
 

Initialize the ADC limit monitoring controls.

Parameters:
hcb (in) LIH hardware monitoring control block
ldb (in) LIH data handle (from CDM)
initializeLimits() initializes the ADC limit checking system

static unsigned int initializeTask LIH_Control hcb,
LIH_DB_Schema *  ldb
[static]
 

Initialize the LIH hardware monitoring task.

Parameters:
hcb (in) LIH hardware monitoring control block
ldb (in) LIH data handle (from CDM)
initializeTask() builds up the LIH hardware monitoring task.

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


Generated on Fri Dec 7 01:36:22 2007 by  doxygen 1.4.4