GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LCM / dev > lcm_siu / rhel4-32
#include <string.h>
#include <FILE/FILE_upl.h>
#include <ITC/ITC_drvdefs.h>
#include <ITC/ITC_pubdefs.h>
#include <LCBD/LCBD.h>
#include <LHK/LHK_pubdefs.h>
#include <LHK/LHK_tlmdefs.h>
#include <MDB/MDB_pubdefs.h>
#include <MEM/MEM_pubdefs.h>
#include <MON/MON_pubdefs.h>
#include <PBS/FORK.h>
#include <PBS/FPA.h>
#include <PBS/MBA.h>
#include <PBS/PBS.h>
#include <PBS/PTS.h>
#include <PBS/TOV.h>
#include <THS/THS.h>
#include <LCM/LCM_msgs.h>
#include <LCM_prvdefs.h>
Defines | |
#define | LCM_L_RECORD_PKT (8) |
#define | LCM_K_PID_SC_0 (23) |
#define | LCM_K_PID_SC_1 (24) |
#define | LCM_K_PID_SC_2 (25) |
#define | LCM_K_PID_SEL (7) |
#define | LCM_PIDCONFIG(_pn, _t, _s, _o) |
Configure a PID. | |
#define | LCM_PIDGET(_pn, _pv) |
Read an input PID. | |
Functions | |
static WUT_cb_status | expireTickle (void *prm, WUT_tmr *tmr) |
Timer callback routine (called at interrupt level). | |
static FORK_cb_status | forkTickle (FORK_cb_prm *prm, FORK_msg_hdr *hdr) |
Task level target of the CPU metric cyclic interrupt timer. | |
static void | fpa_free_cb (ITC_QueueItem *qitem, unsigned int status, void *prm0, void *prm1, void *prm2, unsigned int tx) |
Clean up after sending a housekeeping record to the SIU. | |
unsigned int | LCM_houseInitialize (LCM_Control *ctl) |
Initialize the housekeeping function (common to all CPUs). | |
unsigned int | LCM_houseSendCPU (unsigned int report) |
Acquire and send CPU metric information. | |
unsigned int | LCM_houseSendITC (unsigned int report) |
Acquire and send ITC configuration information. | |
unsigned int | LCM_houseSendLPA (unsigned int report) |
Acquire and send LPA (filter) configuration information. | |
unsigned int | LCM_houseTaskInitialize (LCM_Control *ctl) |
One-time call in LCM task context to start housekeeping sub-function. |
CVS $Id: LCM_house.c,v 1.7 2011/03/29 21:59:33 apw Exp $
#define LCM_PIDCONFIG | ( | _pn, | |||
_t, | |||||
_s, | |||||
_o | ) |
Value:
{ \
if( pidCnf( _pn, _t, _s, _o ) == ERROR ) \
{ \
_msg_report( LCM_PIDCFGFL, 0, 1, _pn ); \
} \
}
_pn | (in) PID number | |
_t | (in) DISABLE, IN, OUT, IN_OUT | |
_s | (in) Input sensitivity IN_LEVEL, IN_EDGE | |
_o | (in) OUT_REG or OUT_TIMER |
Referenced by LCM_houseInitialize().
#define LCM_PIDGET | ( | _pn, | |||
_pv | ) |
Value:
{ \ int _pid_value; \ if( ( _pid_value = pidGet( _pn ) ) == ERROR ) \ { \ _msg_report( LCM_PIDGETFL, 0, 1, _pn ); \ } \ else \ { \ _pv = _pid_value; \ } \ }
_pn | (in) PID number | |
_pv | (out) PID value (left untouched if pidGet() fails) |
Referenced by LCM_houseSendCPU().
static WUT_cb_status expireTickle | ( | void * | prm, | |
WUT_tmr * | tmr | |||
) | [static] |
Timer callback routine (called at interrupt level).
prm | (in) User parameter (a "tickle" block) | |
tmr | (in) Wake up timer handle |
References forkTickle(), _LCM_Control::fqi, _LCM_Tickle::frk, and LCM_lcb.
Referenced by LCM_houseTaskInitialize().
static FORK_cb_status forkTickle | ( | FORK_cb_prm * | prm, | |
FORK_msg_hdr * | hdr | |||
) | [static] |
Task level target of the CPU metric cyclic interrupt timer.
prm | (in) FORK parameter (not used) (cannot be used!) | |
hdr | (in) The fork message |
References _LCM_Tickle::delta, _LCM_Control::house, _LCM_Control::image, LCM_houseSendCPU(), LCM_houseSendITC(), LCM_houseSendLPA(), LCM_HSK_RECORD_CPU, LCM_HSK_RECORD_ITC, LCM_HSK_RECORD_LPA, LCM_K_SRC_INTERNAL, LCM_lcb, _LCM_ImageControl::once, _LCM_Tickle::sav, _LCM_HouseControl::tkl, and _LCM_Tickle::tmr.
Referenced by expireTickle().
static void fpa_free_cb | ( | ITC_QueueItem * | qitem, | |
unsigned int | status, | |||
void * | prm0, | |||
void * | prm1, | |||
void * | prm2, | |||
unsigned int | tx | |||
) | [static] |
Clean up after sending a housekeeping record to the SIU.
qitem | (in) Queue item | |
status | (in) Status from ITC_send() | |
prm0 | (in) User param 0 (FPA control block) | |
prm1 | (in) User param 1 (unused) | |
prm2 | (in) User param 2 (unused) | |
tx | (in) Failure during send phase of ITC_send() (unused) |
Referenced by LCM_houseSendCPU(), LCM_houseSendITC(), and LCM_houseSendLPA().
unsigned int LCM_houseInitialize | ( | LCM_Control * | ctl | ) |
Initialize the housekeeping function (common to all CPUs).
ctl | (in) LCM control block |
References _LCM_Tickle::delta, _LCM_Tickle::fpa, _LCM_Control::house, _LCM_Control::itc, _LCM_Control::itc_hdr_size, LCM_HSK_RECORD_CPU, LCM_L_RECORD_TYPES, LCM_PIDCONFIG, _LCM_HouseControl::ptux, _LCM_HouseControl::timx, _LCM_HouseControl::tkl, and _LCM_Tickle::tmr.
Referenced by LCM_initialize().
unsigned int LCM_houseSendCPU | ( | unsigned int | report | ) |
Acquire and send CPU metric information.
report | (in) Force a diagnostic packet on the SIU |
References _LCM_Tickle::fpa, fpa_free_cb(), _LCM_Control::house, LCM_HSK_RECORD_CPU, LCM_lcb, LCM_PIDGET, _LCM_Control::memc_err_count, _LCM_Control::memu_err_count, _LCM_Record::node, _LCM_Control::node_id, _LCM_Control::pci_err_count, _LCM_HouseControl::ptux, _LCM_Record::report, _LCM_Control::scrub_end, _LCM_Control::scrub_period, _LCM_Control::scrub_start, _LCM_Tickle::seq, _LCM_Record::seq, _LCM_HouseControl::timx, _LCM_HouseControl::tkl, and _LCM_Record::type.
Referenced by forkTickle().
unsigned int LCM_houseSendITC | ( | unsigned int | report | ) |
Acquire and send ITC configuration information.
report | (in) Force a diagnostic packet on the SIU |
References _LCM_Tickle::fpa, fpa_free_cb(), _LCM_Control::house, LCM_HSK_RECORD_ITC, LCM_lcb, _LCM_Control::msg_level_ctdb, _LCM_Control::msg_level_ssr, _LCM_Record::node, _LCM_Control::node_id, _LCM_Record::report, _LCM_Tickle::seq, _LCM_Record::seq, _LCM_HouseControl::tkl, and _LCM_Record::type.
Referenced by forkTickle().
unsigned int LCM_houseSendLPA | ( | unsigned int | report | ) |
Acquire and send LPA (filter) configuration information.
report | (in) Force a diagnostic packet on the SIU |
References _LCM_Tickle::fpa, fpa_free_cb(), _LHK_LpaCfgSiu_Tlm::hdr, _LCM_Control::house, LCM_HSK_RECORD_LPA, LCM_lcb, _LCM_Record::node, _LCM_Control::node_id, _LCM_Record::report, _LCM_Tickle::seq, _LCM_Record::seq, _LCM_HouseControl::tkl, and _LCM_Record::type.
Referenced by forkTickle().
unsigned int LCM_houseTaskInitialize | ( | LCM_Control * | ctl | ) |
One-time call in LCM task context to start housekeeping sub-function.
ctl | (in) LCM control block |
References expireTickle(), _LCM_Control::house, LCM_L_RECORD_TYPES, _LCM_Tickle::sav, _LCM_HouseControl::tkl, and _LCM_Tickle::tmr.
Referenced by taskStartOnce().