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_prvdefs.h File Reference

Private definitions for the LIH hardware moitoring facility. More...

#include "CDM/CDM_pubdefs.h"
#include "IMM/FPM_pubdefs.h"
#include "IMM/RBM_pubdefs.h"
#include "ITC/ITC_apidefs.h"
#include "ITC/ITC_pubdefs.h"
#include "LCBD/LCBD_cr.h"
#include "LIH_DB/LIH_DB_ADCdefs.h"
#include "LIH_DB/LIH_DB_pubdefs.h"
#include "LIH_DB/LIH_DB_schema.h"
#include "PBS/FORK.h"
#include "PBS/FPA.h"
#include "PBS/MTX.h"
#include "PBS/RW.ih"
#include "PBS/WUT.h"

Include dependency graph for LIH_prvdefs.h:

This graph shows which files directly or indirectly include this file:


Data Structures

struct  _LIH_Device
 Storage to capture a device's acquisition methods/cycle count. More...
struct  _LIH_LimitSave
 Structure to save limit checking variables cycle to cycle. More...
struct  _LIH_Message
 Structure of a fork message to tickle the hardware monitoring task. More...
struct  _LIH_Packet
 Structure of a generic hardware monitoring housekeeping packet. More...
struct  _LIH_Put
 Mapping from hardware ADC to placement in hardware packet database. More...
struct  _LIH_Source
 Structure to ADC enumeration to hardware source. More...
struct  _LIH_Database
 Packet database. Acquisition fills it, housekeeping copies from it. More...
struct  _LIH_Control
 Structure of trace control block. More...

Defines

#define LIH_K_PRM_HDRSIZ   (6)
#define LIH_K_TLM_HDRSIZ   (14)
#define LIH_L_ALERT   (16)
#define LIH_L_DIAGNOSTIC   (32)
#define LIH_L_PACKET   (23)
#define LIH_L_ADC_PER_PKT   (50)
#define LIH_M_ADC_UNREAD   (0x1000)
#define LIH_M_REG_UNREAD   (0x80000000)
#define LIH_L_DEVICE   (4)
 Total number "devices" (TEM, PDU, AEM, PIG).
#define LIH_L_POWER   (7)
 Enumeration of registers containing power switches.

Typedefs

typedef _LIH_Control LIH_Control
 Typedef for struct _LIH_Control.
typedef enum _LIH_ControlState LIH_ControlState
 Typedef for enum _LIH_ControlState.
typedef enum _LIH_DeviceList LIH_DeviceList
 Typedef for enum _LIH_DeviceList.
typedef enum _LIH_PowerList LIH_PowerList
 Typedef for enum _LIH_PowerList.
typedef void LIH_cb_Acquire (LIH_Control *hcb, void *prm, unsigned int minor)
 Signature for an LIH device acquisition driver routine.
typedef void LIH_cb_Reference (LIH_Control *hcb, void *prm, LIH_DB_ADC adx, unsigned int able)
 Signature for an LIH device limit-reference-count routine.
typedef _LIH_Device LIH_Device
 Typedef for struct _LIH_Device.
typedef _LIH_LimitSave LIH_LimitSave
 Typedef for struct _LIH_LimitSave.
typedef _LIH_Message LIH_Message
 Typedef for struct _LIH_Message.
typedef _LIH_Packet LIH_Packet
 Typedef for struct _LIH_Packet.
typedef _LIH_Put LIH_Put
 Typedef for struct _LIH_Put.
typedef _LIH_Source LIH_Source
 Typedef for struct _LIH_Source.
typedef _LIH_Database LIH_Database
 Typedef for struct _LIH_Database.

Enumerations

enum  _LIH_ControlState {
  LIH_CTL_UNINITIALIZED = 0,
  LIH_CTL_BROKEN = 1,
  LIH_CTL_INITIALIZED = 2,
  LIH_CTL_STARTING = 3,
  LIH_CTL_STARTED = 4
}
 Enumeration of hardware moitoring facility states. More...
enum  _LIH_DeviceList {
  LIH_K_DVC_TEM = 0,
  LIH_K_DVC_PDU = 1,
  LIH_K_DVC_AEM = 2,
  LIH_K_DVC_PIG = 3
}
 Enumeration of hardware devices. More...
enum  _LIH_PowerList {
  LIH_PDU0_P_EPU = -1,
  LIH_PDU0_P_TEM = -2,
  LIH_PDU0_P_ACD = -3,
  LIH_PDU1_P_EPU = -4,
  LIH_PDU1_P_TEM = -5,
  LIH_PDU1_P_ACD = -6,
  LIH_ACD_P_FREE = -7
}
 Enumeration of power switch registers. More...

Functions

unsigned int LIH_AEMinit (LIH_Control *hcb, LIH_cb_Acquire *acq, LIH_cb_Reference *ref, void **prm, unsigned int *minor)
 Initialize the AEM acquisition.
unsigned int LIH_defineCmdCnt (void)
 Initialize "CmdCnt" packet capture.
unsigned int LIH_defineCtdbCounts (void)
 Initialize capture of CTDB (1553) counters.
unsigned int LIH_defineGasuCounts (void)
 Initialize capture of GASU counters (GEM and EBM).
unsigned int LIH_defineLatcStatus (void)
 Initialize capture of LATC status.
unsigned int LIH_defineLimStatus (void)
 Initialize capture of the LIM status/summary packet.
unsigned int LIH_defineLtcData (void)
 Initialize "LtcData" packet capture.
unsigned int LIH_defineMiscSlow (void)
 Initialize capture of miscellaneous slow information.
unsigned int LIH_defineTopCpu (void)
 Initialize "top" packet capture.
unsigned int LIH_limitAble (LIH_DB_ADC adx, unsigned int able)
 Disable limit checking on an ADC.
unsigned int LIH_limitAction (LIH_DB_ADC adx, LIH_DB_ADCState prv, LIH_DB_ADCState cur, unsigned int msk, unsigned int set)
 Change nag time for an ADC/state.
unsigned int LIH_limitCheck (LIH_Control *hcb, unsigned int adx, unsigned short *val, WCT_time_sat_u sat)
 Test ADC limits and take requested action.
unsigned int LIH_limitCheckCDM (LIH_DB_Schema *ldb)
 Check the contents of an LIH CDM database.
void LIH_limitExternalDefault (LIH_Control *hcb, LIH_DB_Schema *ldb)
 Use an external default limit set to initialize the limit table.
void LIH_limitExternalTable (LIH_Control *hcb, LIH_DB_Schema *ldb)
 Use an external default limit set to initialize the limit table.
void LIH_limitInternalDefault (LIH_Control *hcb)
 Use internal defaults to initialize the limit table.
unsigned int LIH_limitNag (LIH_DB_ADC adx, LIH_DB_ADCState state, unsigned int delta)
 Change nag time for an ADC/state.
unsigned int LIH_limitSendADC (LIH_DB_ADC adx)
 Send the limit set for an ADC via diagnostic telemetry.
unsigned int LIH_limitSet (LIH_DB_ADC adx, const signed short limit[LIH_DB_L_LIMIT])
 Set the limit boundaries for monitoring an ADC.
unsigned int LIH_PDUinit (LIH_Control *hcb, LIH_cb_Acquire *acq, LIH_cb_Reference *ref, void **prm, unsigned int *minor)
 Initialize the PDU hardware acquisition.
unsigned int LIH_PIGinit (LIH_Control *hcb, LIH_cb_Acquire *acq, LIH_cb_Reference *ref, void **prm, unsigned int *minor)
 Initialize "PigStatus" acquisition.
unsigned int LIH_TEMinit (LIH_Control *hcb, LIH_cb_Acquire *acq, LIH_cb_Reference *ref, void **prm, unsigned int *minor)
 Initialize the TEM hardware acquisition.

Variables

const LIH_Source LIH_ADC2source [LIH_DB_L_ADC]
 Mapping of ADCs to their hardware source.
const char LIH_ADC2string []
 Mapping of ADC enumeration to ADC strings.
unsigned int LIH_aidx2hpk [ITC_L_APID_HOUSE]
 Reverse map from APID index to hardware packet.
LIH_ControlLIH_hcb
 Control block for the LIH hardware monitoring facility.
const LIH_DB_ADC LIH_hpk2ADC [LIH_L_PACKET][LIH_L_ADC_PER_PKT]
 Map hardware packet contents to hardware ADCs.
const unsigned int LIH_hpk2aidx [LIH_L_PACKET]
 Map dense hardware packet number to APID index.
const LIH_Source LIH_pwr2source [LIH_L_POWER]
 Mapping of power switch registers to their hardware source.

Detailed Description

Private definitions for the LIH hardware moitoring facility.

CVS $Id: LIH_prvdefs.h,v 1.3 2007/12/07 03:59:21 apw Exp $
Author:
A.P.Waite

Enumeration Type Documentation

enum _LIH_ControlState
 

Enumeration of hardware moitoring facility states.

Enumerator:
LIH_CTL_UNINITIALIZED  Uninitialized
LIH_CTL_BROKEN  Fatal error
LIH_CTL_INITIALIZED  Initialized
LIH_CTL_STARTING  Starting
LIH_CTL_STARTED  Started

enum _LIH_DeviceList
 

Enumeration of hardware devices.

Enumerator:
LIH_K_DVC_TEM  Tower electronics module
LIH_K_DVC_PDU  Power distribution unit
LIH_K_DVC_AEM  ADC electronics module
LIH_K_DVC_PIG  Really CRU/EBM pieces of GASU

enum _LIH_PowerList
 

Enumeration of power switch registers.

Enumerator:
LIH_PDU0_P_EPU  PDU 0 EPU power switch register
LIH_PDU0_P_TEM  PDU 0 TEM power switch register
LIH_PDU0_P_ACD  PDU 0 AEM power switch register
LIH_PDU1_P_EPU  PDU 1 EPU power switch register
LIH_PDU1_P_TEM  PDU 1 TEM power switch register
LIH_PDU1_P_ACD  PDU 1 AEM power switch register
LIH_ACD_P_FREE  AEM FREE power switch register


Function Documentation

unsigned int LIH_AEMinit LIH_Control hcb,
LIH_cb_Acquire acq,
LIH_cb_Reference ref,
void **  prm,
unsigned int *  minor
 

Initialize the AEM acquisition.

Parameters:
hcb (in) Control block
acq (out) AEM acquisition routine
ref (out) AEM limit reference counter
prm (out) AEM acquisition routine parameter
minor (out) Number of minor cycles needed for AEM acquisition

unsigned int LIH_defineCmdCnt void   ) 
 

Initialize "CmdCnt" packet capture.

Return values:
LIH_GENERROR Generic error
LIH_SUCCESS Success
LIH_defineCmdCnt() initializes any necessary resources to capture "CmdCnt" packets, and puts the handler definition in the packet table.

unsigned int LIH_defineCtdbCounts void   ) 
 

Initialize capture of CTDB (1553) counters.

Return values:
LHK_GENERROR Generic error
LHK_SUCCESS Success
LIH_defineCtdbCounts() initializes any necessary resources to capture "CtdbCounts" packets, and puts the handler definition in the packet table.

unsigned int LIH_defineGasuCounts void   ) 
 

Initialize capture of GASU counters (GEM and EBM).

Return values:
LHK_GENERROR Generic error
LHK_SUCCESS Success
LIH_defineGasuCounts() initializes any necessary resources to capture "GasuCounts" packets, and puts the handler definition in the packet table.

unsigned int LIH_defineLatcStatus void   ) 
 

Initialize capture of LATC status.

Return values:
LHK_GENERROR Generic error
LHK_SUCCESS Success
LIH_defineLatcStatus() initializes any necessary resources to capture "LatcStatus" packets, and puts the handler definition in the packet table.

unsigned int LIH_defineLimStatus void   ) 
 

Initialize capture of the LIM status/summary packet.

Return values:
LIH_GENERROR Generic error
LIH_SUCCESS Success
LIH_defineLimStatus() initializes any necessary resources to capture "LimStatus" packets, and puts the handler definition in the packet table.

unsigned int LIH_defineLtcData void   ) 
 

Initialize "LtcData" packet capture.

Return values:
LIH_GENERROR Generic error
LIH_SUCCESS Success
LIH_defineLtcData() initializes any necessary resources to capture "LtcData" packets, and puts the handler definition in the packet table.

unsigned int LIH_defineMiscSlow void   ) 
 

Initialize capture of miscellaneous slow information.

Return values:
LHK_GENERROR Generic error
LHK_SUCCESS Success
LIH_defineMiscSlow() initializes any necessary resources to capture "MiscSlow" packets, and puts the handler definition in the packet table.

unsigned int LIH_defineTopCpu void   ) 
 

Initialize "top" packet capture.

Return values:
LIH_GENERROR Generic error
LIH_SUCCESS Success
LIH_defineTopCpu() initializes any necessary resources to capture "TopCpu" packets, and puts the handler definition in the packet table.

unsigned int LIH_limitAble LIH_DB_ADC  adx,
unsigned int  able
 

Disable limit checking on an ADC.

Parameters:
adx (in) ADC index on which to disable limit checking
able (in) Enable/disable state (boolean, 1 => enable)

unsigned int LIH_limitAction LIH_DB_ADC  adx,
LIH_DB_ADCState  prv,
LIH_DB_ADCState  cur,
unsigned int  msk,
unsigned int  val
 

Change nag time for an ADC/state.

Parameters:
adx (in) ADC index on which to set set a nag time
prv (in) ADC state on previous read
cur (in) ADC state on current read
msk (in) Mask of actions to change
val (in) New values for masked bits

unsigned int LIH_limitCheck LIH_Control hcb,
unsigned int  adx,
unsigned short *  val,
WCT_time_sat_u  sat
 

Test ADC limits and take requested action.

Parameters:
hcb (in) Control block
adx (in) ADC index
val (in/out) ADC value
sat (in) ADC data acquisition timestamp (seconds since LAT epoch)
Return values:
0 Output of corresponding diagnostic packet -not- requested
1 Output of corresponding diagnostic packet -requested-

unsigned int LIH_limitCheckCDM LIH_DB_Schema *  ldb  ) 
 

Check the contents of an LIH CDM database.

Parameters:
ldb (in) Handle to the CDM database data

void LIH_limitExternalDefault LIH_Control hcb,
LIH_DB_Schema *  ldb
 

Use an external default limit set to initialize the limit table.

Parameters:
hcb (in) LIH control block
ldb (in) Handle to the CDM database data
Warning:
This routine does no validation. It assumes that the database file has already been validted using LIH_limitCheckCDM().
LIH_limitExternalDefault() uses the default limit set in the CDM to initialize all ADC limits to default values. If there is no default limit set in the CDM, this routine does nothing.

void LIH_limitExternalTable LIH_Control hcb,
LIH_DB_Schema *  ldb
 

Use an external default limit set to initialize the limit table.

Parameters:
hcb (in) LIH control block
ldb (in) Handle to the CDM database data
Warning:
This routine does no validation. It assumes that the database file has already been validated using LIH_limitCheckCDM().
LIH_limitExternalTable() uses the list of individual ADC limit sets in the CDM database to set up individual ADC limits. The list is allowed to be empty.

void LIH_limitInternalDefault LIH_Control hcb  ) 
 

Use internal defaults to initialize the limit table.

Parameters:
hcb (in) LIH control block

unsigned int LIH_limitNag LIH_DB_ADC  adx,
LIH_DB_ADCState  state,
unsigned int  delta
 

Change nag time for an ADC/state.

Parameters:
adx (in) ADC index on which to set set a nag time
state (in) ADC state on which to set set a nag time
delta (in) Interval between nags (seconds, 0 => don't nag)

unsigned int LIH_limitSendADC LIH_DB_ADC  adx  ) 
 

Send the limit set for an ADC via diagnostic telemetry.

Parameters:
adx (in) ADC index on which to disable limit checking

unsigned int LIH_limitSet LIH_DB_ADC  adx,
const signed short  limit[LIH_DB_L_LIMIT]
 

Set the limit boundaries for monitoring an ADC.

Parameters:
adx (in) ADC index on which to set limits
limit (in) New limit set (negative => leave value as is)

unsigned int LIH_PDUinit LIH_Control hcb,
LIH_cb_Acquire acq,
LIH_cb_Reference ref,
void **  prm,
unsigned int *  minor
 

Initialize the PDU hardware acquisition.

Parameters:
hcb (in) Control block
acq (out) PDU acquisition routine
ref (out) PDU limit reference counter
prm (out) PDU acquisition routine parameter
minor (out) Number of minor cycles needed for PDU acquisition

unsigned int LIH_PIGinit LIH_Control hcb,
LIH_cb_Acquire acq,
LIH_cb_Reference ref,
void **  prm,
unsigned int *  minor
 

Initialize "PigStatus" acquisition.

Parameters:
hcb (in) Control block
acq (out) PigStatus acquisition routine
ref (out) PigStatus limit reference counter (not used)
prm (out) PigStatus acquisition routine parameter
minor (out) Number of minor cycles needed for PigStatus acquisition

unsigned int LIH_TEMinit LIH_Control hcb,
LIH_cb_Acquire acq,
LIH_cb_Reference ref,
void **  prm,
unsigned int *  minor
 

Initialize the TEM hardware acquisition.

Parameters:
hcb (in) Control block
acq (out) TEM acquisition routine
ref (out) TEM limit reference counter
prm (out) TEM acquisition routine parameter
minor (out) Number of minor cycles needed for TEM acquisition


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