GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LIH / V0-2-5 > lih / mv2304
#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 "LSF/LSF_ids.h"
#include "PBS/FORK.h"
#include "PBS/FPA.h"
#include "PBS/MTX.h"
#include "PBS/RW.ih"
#include "PBS/WUT.h"
Classes | |
struct | _LIH_Device |
Storage to capture a device's acquisition methods/cycle count. More... | |
struct | _LIH_LimitHeader |
Structure to save telemetry meta-information on limit table dumps. 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_LSF_DGM_TYP_LIMITS (0) |
#define | LIH_LSF_DGM_VER_LIMITS (0) |
#define | LIH_M_REG_UNREAD (0x80000000) |
#define | LIH_K_ADC_VALUE (12) |
#define | LIH_K_ADC_SETTLE (1) |
#define | LIH_K_ADC_STATE (3) |
#define | LIH_V_ADC_VALUE ( 0 ) |
#define | LIH_V_ADC_SETTLE (LIH_V_ADC_VALUE + LIH_K_ADC_VALUE ) |
#define | LIH_V_ADC_STATE (LIH_V_ADC_SETTLE + LIH_K_ADC_SETTLE) |
#define | LIH_M_ADC_VALUE (((1 << LIH_K_ADC_VALUE ) - 1) << LIH_V_ADC_VALUE ) |
#define | LIH_M_ADC_SETTLE (((1 << LIH_K_ADC_SETTLE) - 1) << LIH_V_ADC_SETTLE) |
#define | LIH_M_ADC_STATE (((1 << LIH_K_ADC_STATE ) - 1) << LIH_V_ADC_STATE ) |
#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_L_DEVICE (4) |
Total number "devices" (TEM, PDU, AEM, PIG). | |
#define | LIH_L_POWER (7) |
Enumeration of registers containing power switches. | |
Typedefs | |
typedef struct _LIH_Control | LIH_Control |
Typedef for struct _LIH_Control. | |
typedef enum _LIH_DumpRequestSource | LIH_DumpRequestSource |
Typedef for enum _LIH_DumpRequestSource. | |
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 enum _LIH_SettleState | LIH_SettleState |
Typedef for enum _LIH_SettleState. | |
typedef void | LIH_cb_Acquire (LIH_Control *hcb, void *prm, unsigned int minor) |
Signature for an LIH device acquisition driver routine. | |
typedef struct _LIH_Device | LIH_Device |
Typedef for struct _LIH_Device. | |
typedef struct _LIH_LimitHeader | LIH_LimitHeader |
Typedef for struct _LIH_LimitHeader. | |
typedef struct _LIH_LimitSave | LIH_LimitSave |
Typedef for struct _LIH_LimitSave. | |
typedef struct _LIH_Message | LIH_Message |
Typedef for struct _LIH_Message. | |
typedef struct _LIH_Packet | LIH_Packet |
Typedef for struct _LIH_Packet. | |
typedef struct _LIH_Put | LIH_Put |
Typedef for struct _LIH_Put. | |
typedef struct _LIH_Source | LIH_Source |
Typedef for struct _LIH_Source. | |
typedef struct _LIH_Database | LIH_Database |
Typedef for struct _LIH_Database. | |
Enumerations | |
enum | _LIH_DumpRequestSource { LIH_K_SRC_COMMAND = 0, LIH_K_SRC_INTERNAL = 1 } |
Enumeration of hardware moitoring facility states. More... | |
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... | |
enum | _LIH_SettleState { LIH_K_SETTLE_STABLE = 0, LIH_K_SETTLE_SETTLING = 1, LIH_K_SETTLE_UNSTABLE = 2 } |
Enumeration of ADC transition settling states. More... | |
Functions | |
unsigned int | LIH_AEMinit (LIH_Control *hcb, LIH_cb_Acquire *acq, 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 (unsigned int able) |
Enable/disable taking actions on the basis of ADC states. | |
unsigned int | LIH_limitAction (LIH_DB_ADC adx, LIH_DB_ADCState prv, LIH_DB_ADCState cur, int alert, int diag, int msg) |
Change nag time for an ADC/state. | |
unsigned int | LIH_limitCheck (LIH_Control *hcb, unsigned int adx, unsigned short *val, WCT_time tim, 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_limitLimit (LIH_DB_ADC adx, const signed short limit[LIH_DB_L_LIMIT]) |
Set the limit boundaries for monitoring an ADC. | |
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_limitPersist (LIH_DB_ADC adx, unsigned int persist) |
Change persistence time for an ADC. | |
unsigned int | LIH_limitSendAdc (LIH_DB_ADC adx) |
Send the limit set for an ADC via diagnostic telemetry. | |
unsigned int | LIH_limitSendAll (unsigned int reason, unsigned int source, unsigned int ident) |
Test ADC limits and take requested action. | |
unsigned int | LIH_limitSettle (LIH_DB_ADC adx, unsigned int settle) |
Limit the time an ADC state has to settle. | |
unsigned int | LIH_PDUinit (LIH_Control *hcb, LIH_cb_Acquire *acq, void **prm, unsigned int *minor) |
Initialize the PDU hardware acquisition. | |
unsigned int | LIH_PIGinit (LIH_Control *hcb, LIH_cb_Acquire *acq, void **prm, unsigned int *minor) |
Initialize "PigStatus" acquisition. | |
unsigned int | LIH_TEMinit (LIH_Control *hcb, LIH_cb_Acquire *acq, 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_Control * | LIH_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. |
CVS $Id: LIH_prvdefs.h,v 1.6 2008/11/13 23:47:02 apw Exp $
enum _LIH_ControlState |
enum _LIH_DeviceList |
enum _LIH_PowerList |
Enumeration of power switch registers.
enum _LIH_SettleState |
unsigned int LIH_AEMinit | ( | LIH_Control * | hcb, | |
LIH_cb_Acquire * | acq, | |||
void ** | prm, | |||
unsigned int * | minor | |||
) |
Initialize the AEM acquisition.
hcb | (in) Control block | |
acq | (out) AEM acquisition routine | |
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.
LIH_GENERROR | Generic error | |
LIH_SUCCESS | Success |
unsigned int LIH_defineCtdbCounts | ( | void | ) |
Initialize capture of CTDB (1553) counters.
LHK_GENERROR | Generic error | |
LHK_SUCCESS | Success |
unsigned int LIH_defineGasuCounts | ( | void | ) |
Initialize capture of GASU counters (GEM and EBM).
LHK_GENERROR | Generic error | |
LHK_SUCCESS | Success |
unsigned int LIH_defineLatcStatus | ( | void | ) |
Initialize capture of LATC status.
LHK_GENERROR | Generic error | |
LHK_SUCCESS | Success |
unsigned int LIH_defineLimStatus | ( | void | ) |
Initialize capture of the LIM status/summary packet.
LIH_GENERROR | Generic error | |
LIH_SUCCESS | Success |
unsigned int LIH_defineLtcData | ( | void | ) |
Initialize "LtcData" packet capture.
LIH_GENERROR | Generic error | |
LIH_SUCCESS | Success |
unsigned int LIH_defineMiscSlow | ( | void | ) |
Initialize capture of miscellaneous slow information.
LHK_GENERROR | Generic error | |
LHK_SUCCESS | Success |
unsigned int LIH_defineTopCpu | ( | void | ) |
Initialize "top" packet capture.
LIH_GENERROR | Generic error | |
LIH_SUCCESS | Success |
unsigned int LIH_limitAble | ( | unsigned int | able | ) |
Enable/disable taking actions on the basis of ADC states.
able | (in) Enable/disable state (boolean, 1 => enable) |
unsigned int LIH_limitAction | ( | LIH_DB_ADC | adx, | |
LIH_DB_ADCState | prv, | |||
LIH_DB_ADCState | cur, | |||
int | alert, | |||
int | diag, | |||
int | msg | |||
) |
Change nag time for an ADC/state.
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 | |
alert | (in) Send alert (-1 => no change, 0 => don't, 1 => do) | |
diag | (in) Send diag (-1 => no change, 0 => don't, 1 => do) | |
msg | (in) Send msg (-1 => no change, 0 => don't, 1-3 => severity) |
unsigned int LIH_limitCheck | ( | LIH_Control * | hcb, | |
unsigned int | adx, | |||
unsigned short * | val, | |||
WCT_time | tim, | |||
WCT_time_sat_u | sat | |||
) |
Test ADC limits and take requested action.
hcb | (in) Control block | |
adx | (in) ADC index | |
val | (in/out) ADC value | |
tim | (in) ADC acquisition timestamp (internal representation) | |
sat | (in) ADC acquisition timestamp (satellite representation) |
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.
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.
hcb | (in) LIH control block | |
ldb | (in) Handle to the CDM database data |
void LIH_limitExternalTable | ( | LIH_Control * | hcb, | |
LIH_DB_Schema * | ldb | |||
) |
Use an external default limit set to initialize the limit table.
hcb | (in) LIH control block | |
ldb | (in) Handle to the CDM database data |
void LIH_limitInternalDefault | ( | LIH_Control * | hcb | ) |
Use internal defaults to initialize the limit table.
hcb | (in) LIH control block |
unsigned int LIH_limitLimit | ( | LIH_DB_ADC | adx, | |
const signed short | limit[LIH_DB_L_LIMIT] | |||
) |
Set the limit boundaries for monitoring an ADC.
adx | (in) ADC index on which to set limits | |
limit | (in) New limit set (negative => leave value as is) |
unsigned int LIH_limitNag | ( | LIH_DB_ADC | adx, | |
LIH_DB_ADCState | state, | |||
unsigned int | delta | |||
) |
Change nag time for an ADC/state.
adx | (in) ADC index on which to set a nag time | |
state | (in) ADC state on which to set a nag time | |
delta | (in) Interval between nags (milliseconds, 0 => don't nag) |
unsigned int LIH_limitPersist | ( | LIH_DB_ADC | adx, | |
unsigned int | persist | |||
) |
Change persistence time for an ADC.
adx | (in) ADC index on which to set the persistence | |
persist | (in) Persistence time (milliseconds, 0 => no persistence) |
unsigned int LIH_limitSendAdc | ( | LIH_DB_ADC | adx | ) |
Send the limit set for an ADC via diagnostic telemetry.
adx | (in) ADC index on which to disable limit checking |
unsigned int LIH_limitSendAll | ( | unsigned int | reason, | |
unsigned int | source, | |||
unsigned int | ident | |||
) |
Test ADC limits and take requested action.
reason | (in) Reason for generating this dump | |
source | (in) The source of the request | |
ident | (in) User provided dump identifier |
\retval |
unsigned int LIH_limitSettle | ( | LIH_DB_ADC | adx, | |
unsigned int | settle | |||
) |
Limit the time an ADC state has to settle.
adx | (in) ADC index on which to set the persistence | |
settle | (in) Maximum settling time (milliseconds) |
unsigned int LIH_PDUinit | ( | LIH_Control * | hcb, | |
LIH_cb_Acquire * | acq, | |||
void ** | prm, | |||
unsigned int * | minor | |||
) |
Initialize the PDU hardware acquisition.
hcb | (in) Control block | |
acq | (out) PDU acquisition routine | |
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, | |||
void ** | prm, | |||
unsigned int * | minor | |||
) |
Initialize "PigStatus" acquisition.
hcb | (in) Control block | |
acq | (out) PigStatus acquisition routine | |
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, | |||
void ** | prm, | |||
unsigned int * | minor | |||
) |
Initialize the TEM hardware acquisition.
hcb | (in) Control block | |
acq | (out) TEM acquisition routine | |
prm | (out) TEM acquisition routine parameter | |
minor | (out) Number of minor cycles needed for TEM acquisition |