GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LHK / V12-2-4 > lhk / rhel5-64


Interface   Data Structures   File List   Data Fields   Globals  

LHK_control.c File Reference

Control functions for the LHK package. More...

#include <string.h>
#include <IMM/FPM_pubdefs.h>
#include <IMM/RBM_pubdefs.h>
#include <CTDB/CTDB_rt.h>
#include <CTS/CTS_pubdefs.h>
#include <ITC/ITC_drvdefs.h>
#include <ITC/ITC_pubdefs.h>
#include <LHK/LHK_msgs.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 <LHK/LHK_cmdxtrn.h>
#include <LHK_prvdefs.h>

Functions

static unsigned int LHK_taskInitialize (LHK_Control *lcb)
 Initialize the LHK task.
static void taskStartOnce (void *prm)
 One-time call in task context to start the LHK task.
unsigned int LHK_initialize ()
 Initialize the LHK system.
unsigned int LHK_definePacket (unsigned int aidx, LHK_cb_Capture rtn, void *hsk, void *dia)
 Define a packet table entry.
unsigned int LHK_start ()
 Start the LHK task.

Variables

LHK_ControlLHK_lcb
 Control block for LHK facility.


Detailed Description

Control functions for the LHK package.

CVS $Id: LHK_control.c,v 1.2 2011/03/29 01:45:00 apw Exp $
Author:
A.P.Waite
LHK_control.c provides facilities initialize the LHK housekeeping system (and its shadow diagnostic system).

Function Documentation

unsigned int LHK_definePacket ( unsigned int  aidx,
LHK_cb_Capture  rtn,
void *  hsk,
void *  dia 
)

Define a packet table entry.

Parameters:
aidx (in) Index in APID packet table
rtn (in) Routine to capture the APID data
hsk (in) User parameter to use when capturing housekeeping
dia (in) User parameter to use when capturing diagnostic
Return values:
LHK_BADAIDX Invalid APID index
LHK_NULLRTN Capture routine defined as NULL
LHK_SUCCESS Success
LHK_definePacket() defines a packet entry in the APID table. The definition consists of a routine to capture the packet data, and separate user parameters for when the capture is performed in regular housekeeping mode or in demand diagnostic mode.

References _LHK_Packet::dia, _LHK_Packet::hsk, LHK_packet, and _LHK_Packet::rtn.

Referenced by LHK_diagnosticInitialize().

unsigned int LHK_initialize ( void   ) 

unsigned int LHK_start ( void   ) 

Start the LHK task.

Return values:
LHK_CTDBCBFL Cannot locate the CTDB device
LHK_CTDBMISS Cannot redefine the CTSB housekeeping callback
LHK_STARTTSK Cannot start the task
LHK_SUCCESS Success
LHK_start2() starts the LHK task.

References _LHK_Control::itc, LHK_ctdbCallback(), LHK_CTL_BROKEN, LHK_CTL_INITIALIZED, LHK_CTL_STARTING, LHK_CTL_UNINITIALIZED, _LHK_Control::mtx, _LHK_Control::save_cb_prm, _LHK_Control::save_cb_rtn, _LHK_Control::state, and taskStartOnce().

static unsigned int LHK_taskInitialize ( LHK_Control lcb  )  [static]

Initialize the LHK task.

Parameters:
lcb (in) LHK control block
LHK_taskInitialize() builds up task resources fro task mLHK

References _LHK_Control::itc, LHK_Apid650, _LHK_Control::pcb, and _LHK_Control::rcb.

Referenced by LHK_initialize().


Generated on Tue Nov 29 19:04:01 2011 by  doxygen 1.5.8