GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LHK / dev > lhk / rhel5-64


Interface   Data Structures   File List   Data Fields   Globals  

LHK_prvdefs.h File Reference

Private definitions for the LHK package. 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 <LHK/LHK_pubdefs.h>
#include <LHK_DB/LHK_DB_pktdefs.h>
#include <PBS/FORK.h>
#include <PBS/FPA.h>
#include <PBS/MTX.h>
#include <PBS/RW.ih>
#include <PBS/WCT.h>
#include <PBS/WUT.h>

Classes

struct  _LHK_Blip
 Structure of a fork message to "blip" a diagnostic. More...
struct  _LHK_Packet
 Description/control of a single APID packet. More...
struct  _LHK_Schedule
 Control of the schedule for genuine housekeeping. More...
struct  _LHK_ScheduleControl
 Control of the schedule for genuine housekeeping. More...
struct  _LHK_ScheduleTable
 Control of the schedule for genuine housekeeping. More...
struct  _LHK_Timeout
 Structure of a fork message to tickle the mLSW task. More...
struct  _LHK_Control
 Structure of trace control block. More...

Defines

#define LHK_K_BLP_PKTCNT   ( 32 )
#define LHK_K_DIA_ACTIVE   ( ( ITC_L_APID_HOUSE + 31 ) >> 5 )
#define LHK_K_DIA_PKTCNT   ( ITC_L_APID_HOUSE )
#define LHK_K_TIM_WINDOW   ( WCT_K_NSECS_IN_A_MSEC >> 1 )
#define LHK_L_NAG_NOPKT   ( 300 )
#define LHK_L_SCH_TABLE   ( 32 )

Typedefs

typedef enum _LHK_ControlState LHK_ControlState
 Typedef for enum _LHK_ControlState.
typedef void LHK_cb_FreeSchedule (void *prm, const LHK_DB_Packet *tbl, unsigned int len)
 Signature for an LHK routine to free a housekeeping schedule.
typedef struct _LHK_Blip LHK_Blip
 Typedef for struct _LHK_Blip.
typedef struct _LHK_Packet LHK_Packet
 Typedef for struct _LHK_Packet.
typedef struct _LHK_Schedule LHK_Schedule
 Typedef for struct _LHK_Schedule.
typedef struct _LHK_ScheduleControl LHK_ScheduleControl
 Typedef for struct _LHK_ScheduleControl.
typedef struct _LHK_ScheduleTable LHK_ScheduleTable
 Typedef for struct _LHK_ScheduleTable.
typedef struct _LHK_Timeout LHK_Timeout
 Typedef for struct _LHK_Timeout.
typedef struct _LHK_Control LHK_Control
 Typedef for struct _LHK_Control.

Enumerations

enum  _LHK_ControlState {
  LHK_CTL_UNINITIALIZED = 0,
  LHK_CTL_BROKEN = 1,
  LHK_CTL_INITIALIZED = 2,
  LHK_CTL_STARTING = 3,
  LHK_CTL_STARTED = 4
}
 Enumeration of trace control states. More...

Functions

unsigned int LHK_ctdbCallback (void *out, void *prm)
 Service a request for a housekeeping packet.
unsigned int LHK_diagnosticCancel (unsigned int aidx)
 Cancel a diagnostic packet request.
unsigned int LHK_diagnosticInitialize (LHK_Control *lcb)
 Initialize the resources needed to produce diagnostic packets.
unsigned int LHK_diagnosticStart (unsigned int aidx, unsigned int count, unsigned int delta)
 Service a diagnostic packet request.
unsigned int LHK_scheduleInitialize (LHK_Control *lcb)
 Service a request for a housekeeping packet.
unsigned int LHK_scheduleReplaceByFile (unsigned int fil)
 Request a new housekeeping schedule by file ID.
unsigned int LHK_scheduleReplaceByInstance (int instance)
 Request a new housekeeping schedule by file ID.

Variables

LHK_ControlLHK_lcb
 Control block for LHK facility.
LHK_Packet LHK_packet [ITC_L_APID_HOUSE]
 Packet description and control data, per APID.


Detailed Description

Private definitions for the LHK package.

CVS $Id: LHK_prvdefs.h,v 1.4 2011/03/29 01:45:00 apw Exp $
Author:
A.P.Waite

Enumeration Type Documentation

Enumeration of trace control states.

Enumerator:
LHK_CTL_UNINITIALIZED  Uninitialized
LHK_CTL_BROKEN  Fatal error
LHK_CTL_INITIALIZED  Initialized
LHK_CTL_STARTING  Starting
LHK_CTL_STARTED  Started


Function Documentation

unsigned int LHK_ctdbCallback ( void *  out,
void *  prm 
)

Service a request for a housekeeping packet.

Parameters:
out (in) Output buffer (where the packet should be placed)
prm (in) User parameter
Return values:
LHK_GENERROR Generic error
LHK_SUCCESS Success
LHK_ctdbCallback() is the routine that runs in the CTDB callback context to provide a housekeeping packet.

References _LHK_ScheduleControl::cur, _LHK_Packet::hsk, _LHK_Schedule::len, LHK_lcb, LHK_packet, LHK_PKT_SUCCESS, LHK_PKT_TIMEOUT, _LHK_ScheduleControl::nxt, _LHK_Schedule::prm, _LHK_ScheduleControl::req, _LHK_Packet::rtn, _LHK_Schedule::rtn, _LHK_Control::scb, _LHK_Packet::seq, and _LHK_Schedule::tbl.

Referenced by LHK_start().

unsigned int LHK_diagnosticCancel ( unsigned int  aidx  ) 

Cancel a diagnostic packet request.

Parameters:
aidx (in) Diagnostic packet APID index (repeat, index)
LHK_cancelDiagnostic() cancels a request to send a diagnostic packet.

References _LHK_Control::active, _LHK_Packet::alarm, _LHK_Packet::count, _LHK_Packet::delta, LHK_lcb, and _LHK_Packet::noend.

Referenced by LHK_CancelDiag(), and LHK_StopDiag().

unsigned int LHK_diagnosticInitialize ( LHK_Control lcb  ) 

Initialize the resources needed to produce diagnostic packets.

Parameters:
lcb (in) LHK control block

References _LHK_Control::aidx, _LHK_Control::bpa, _LHK_Control::dpa, initializePacket(), LHK_definePacket(), noPacket(), and _LHK_Control::tmr.

Referenced by LHK_initialize().

unsigned int LHK_diagnosticStart ( unsigned int  aidx,
unsigned int  count,
unsigned int  delta 
)

Service a diagnostic packet request.

Parameters:
aidx (in) Diagnostic packet APID index (repeat, index)
count (in) Number of packets to send (zero implies "forever")
delta (in) Interval between packets (milliseconds)
Return values:
LHK_BADAIDX Invalid APID index
LHK_DIAGSEND Send of diagnostic packet failed
LHK_DIAGTIME Must specify a repetition time (unless count is zero)
LHK_SUCCESS Success
LHK_startDiagnostic() services a request to send a diagnostic packet. With the exception noted below, a request for a diagnostic packet that is already being produced will overwrite the previous settings (of count and delta) for that packet.

The exception is for a count of one. This will never alter the parameters of a diagnostic packet already being produced. The idea here is that a singleton request might come internally from software (e.g. as part of the response to some other command that changes the contents of one of these packets). The software request is essentially orthogonal to a "commanded" request, so the software request should not interfere with "commanded" request.

References _LHK_Control::active, _LHK_Control::aidx, _LHK_Packet::alarm, _LHK_Packet::count, _LHK_Packet::delta, expireTimer(), LHK_lcb, _LHK_Packet::noend, sendDiagnostic(), and _LHK_Control::tmr.

Referenced by forkBlip(), and LHK_ReqDiagPacket().

unsigned int LHK_scheduleInitialize ( LHK_Control lcb  ) 

Service a request for a housekeeping packet.

Parameters:
lcb (in) LHK control block
Return values:
LHK_GENERROR Generic error
LHK_SUCCESS Success
LHK_scheduleInitialize() sets up controls for housekeeping schedules.

References _LHK_ScheduleTable::cdm, scheduleReplace(), scheduleScan(), scheduleValidate(), _LHK_Control::table, _LHK_Control::tmask, and _LHK_Control::tused.

Referenced by LHK_initialize().

unsigned int LHK_scheduleReplaceByFile ( unsigned int  fil  ) 

Request a new housekeeping schedule by file ID.

Parameters:
fil (in) File ID of file/CDM providing the new schedule
Return values:
LHK_GENERROR Generic error
LHK_SUCCESS Success
LHK_scheduleReplace() requests that the CTDB housekeeping callback change the housekeeping schedule in use with the one defined in the file/CDM with file ID fil.

References _LHK_ScheduleTable::cdm, _LHK_ScheduleTable::fil, LHK_lcb, scheduleReplace(), scheduleValidate(), _LHK_Control::table, _LHK_Control::tmask, and _LHK_Control::tused.

Referenced by LHK_NewSchedFile(), and LHK_SysReset().

unsigned int LHK_scheduleReplaceByInstance ( int  instance  ) 

Request a new housekeeping schedule by file ID.

Parameters:
instance (in) CMD instance number
Return values:
LHK_GENERROR Generic error
LHK_SUCCESS Success
LHK_scheduleReplaceByInstance() requests that the CTDB housekeeping callback change the housekeeping schedule in use with the one defined in the file/CDM with CDM instance number instance.

References _LHK_ScheduleTable::cdm, LHK_lcb, scheduleReplace(), _LHK_Control::table, _LHK_Control::tmask, and _LHK_Control::tused.

Referenced by LHK_NewSchedInst(), and LHK_SysReset().


Generated on Mon Mar 28 18:48:39 2011 by  doxygen 1.5.8