GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LHK / V12-2-4 > lhk / rhel5-64
#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_Control * | LHK_lcb |
Control block for LHK facility. | |
LHK_Packet | LHK_packet [ITC_L_APID_HOUSE] |
Packet description and control data, per APID. |
CVS $Id: LHK_prvdefs.h,v 1.4 2011/03/29 01:45:00 apw Exp $
enum _LHK_ControlState |
unsigned int LHK_ctdbCallback | ( | void * | out, | |
void * | prm | |||
) |
Service a request for a housekeeping packet.
out | (in) Output buffer (where the packet should be placed) | |
prm | (in) User parameter |
LHK_GENERROR | Generic error | |
LHK_SUCCESS | Success |
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.
aidx | (in) Diagnostic packet APID index (repeat, index) |
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.
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.
aidx | (in) Diagnostic packet APID index (repeat, index) | |
count | (in) Number of packets to send (zero implies "forever") | |
delta | (in) Interval between packets (milliseconds) |
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 |
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.
lcb | (in) LHK control block |
LHK_GENERROR | Generic error | |
LHK_SUCCESS | Success |
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.
fil | (in) File ID of file/CDM providing the new schedule |
LHK_GENERROR | Generic error | |
LHK_SUCCESS | Success |
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.
instance | (in) CMD instance number |
LHK_GENERROR | Generic error | |
LHK_SUCCESS | Success |
References _LHK_ScheduleTable::cdm, LHK_lcb, scheduleReplace(), _LHK_Control::table, _LHK_Control::tmask, and _LHK_Control::tused.
Referenced by LHK_NewSchedInst(), and LHK_SysReset().