GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LHK / V11-4-3
Constituent: lhkt     Tag: mv2304
#include "PBS/FPA.h"
#include "PBI/Endianness.h"
#include "LCBD/LCBD_cr.h"
#include "LEM/encode_structs.h"
#include "MSG/MSG_pubdefs.h"
#include "CTDB/CTDB_config.h"
#include "ITC/ITC_pubdefs.h"
#include "IMM/FPM_pubdefs.h"
#include "IMM/RBM_pubdefs.h"
#include "LHK/LHK.h"
#include "LHK/LHK_tlmdefs.h"
#include "LHK/LHK_cmddefs.h"
#include "LHK_cfg_p.h"
#include "LHK_lcb_p.h"
#include "LRA/LRA.h"
#include "TRC/TRC_pubdefs.h"
Include dependency graph for LHK_p.h:
This graph shows which files directly or indirectly include this file:
Data Structures | |
struct | _LHK_AdcBfl |
ADC value and status. More... | |
union | _LHK_AdcWord |
ADC word structure. More... | |
struct | _LHK_RegAddrBfl |
Address bitfield structure. More... | |
union | _LHK_RegAddr |
Address bitfield structure. More... | |
struct | _LHK_DataDesc |
Telemetry data descriptor. More... | |
struct | _LHK_TlmPkt |
Telemetry packet storage. More... | |
struct | _LHK_PktDesc |
Telemetry packet descriptor. More... | |
struct | _LHK_PktTbl |
Telemetry packet addressing table. More... | |
struct | _LHK_DiagMap |
Diagnostic apid map. More... | |
struct | _LHK_TaskMsg |
LHK task message descriptor. More... | |
struct | _LHK_Ci |
Housekeeping collection item data structure. More... | |
struct | _LHK_Ccb |
Collection table control block. More... | |
struct | _LHK_Ctl |
Application control block descriptor. More... | |
Defines | |
#define | LHK_MAX_CI 1024 |
#define | LHK_MAX_CI_ADDRS 16 |
#define | LHK_MAX_CCB 256 |
#define | LHK_MAX_TMSGS 128 |
#define | LHK_MAX_SCH_PER 1000 |
#define | LHK_MIN_SCH_PER 32 |
#define | LHK_MAX_DIAG_PKTS 1024 |
#define | LHK_MIN_DIAG_PKTS 1 |
#define | LHK_MAX_DIAG_INTERVAL 240000 |
#define | LHK_MIN_DIAG_INTERVAL 100 |
#define | LHK_DEF_MRK_TO 300 |
#define | LHK_CTDB_BUFSIZE 128 |
#define | LHK_MST_TASK_ID "mLHKc" |
#define | LHK_MST_TASK_PRI 135 |
#define | LHK_SCHED_TASK_ID "mLHKs" |
#define | LHK_SCHED_TASK_PRI 137 |
#define | LHK_SLV_TASK_ID "sLHKc" |
#define | LHK_SLV_TASK_PRI 139 |
#define | LHK_PID_IN 1 |
#define | LHK_PID_OUT 2 |
#define | LHK_PID_SEL 7 |
#define | LHK_PID_SC_0 23 |
#define | LHK_PID_SC_1 24 |
#define | LHK_PID_SC_2 25 |
#define | LHK_GET_PID(_pn, _pv) |
Set programmable Interrupt Discrete to specified value. | |
#define | LHK_CNF_PID(_pn, _t, _s, _o) |
Configure PIDS for reading and writing. | |
Typedefs | |
typedef enum _LHK_LimStatCode | LHK_LimStatCode |
Typedef for enum _LHK_LimStatCode. | |
typedef enum _LHK_TaskMsgType | LHK_TaskMsgType |
Typedef for enum _LHK_TaskMsgType. | |
typedef enum _LHK_TaskState | LHK_TaskState |
Typedef for enum _LHK_TaskState. | |
typedef enum _LHK_CcbOpcode | LHK_CcbOpcode |
Typedef for enum _LHK_CcbOpcode. | |
typedef enum _LHK_CiOpcode | LHK_CiOpcode |
Typedef for enum _LHK_CiOpcode. | |
typedef _LHK_AdcBfl | LHK_AdcBfl |
Typedef for telemetry bitfield structure _LHK_AdcBfl. | |
typedef _LHK_AdcWord | LHK_AdcWord |
Typedef for ADC word structure _LHK_AdcWord. | |
typedef _LHK_RegAddrBfl | LHK_RegAddrBfl |
Typedef for addressing bitfield structure _LHK_RegAddrBfl. | |
typedef _LHK_RegAddr | LHK_RegAddr |
Typedef for addressing bitfield structure _LHK_RegAddr. | |
typedef _LHK_DataDesc | LHK_DataDesc |
Typedef for structure _LHK_DataDesc. | |
typedef _LHK_TlmPkt * | LHK_TlmPkt |
Pointer typedef for structure _LHK_TlmPkt. | |
typedef _LHK_PktDesc | LHK_PktDesc |
Typedef for structure _LHK_PktDesc. | |
typedef _LHK_PktTbl | LHK_PktTbl |
Typedef for structure _LHK_PktTbl. | |
typedef _LHK_DiagMap | LHK_DiagMap |
Typedef for structure _LHK_DiagMap. | |
typedef unsigned int | LHK_Ccb_Cb (void *arg0, void *arg1) |
Typedef for collection list callback function. | |
typedef _LHK_TaskMsg | LHK_TaskMsg |
Typedef for struct _LHK_TaskMsg. | |
typedef _LHK_Ci | LHK_Ci |
Typedef for struct _LHK_Ci. | |
typedef _LHK_Ccb | LHK_Ccb |
Typedef for struct _LHK_Ccb. | |
typedef _LHK_Ctl | LHK_Ctl |
Typedef for struct _LHK_Ctl. | |
Enumerations | |
enum | _LHK_LimStatCode { LHKSTATOK = 0x0, LHKSTATUNDF = 0x1, LHKSTATMSK = 0x2, LHKSTATRED = 0x3 } |
ADC status codes. | |
enum | _LHK_TaskMsgType { LHK_TMSG_START = 0x1, LHK_TMSG_STOP = 0x2, LHK_TMSG_PROC = 0x3, LHK_TMSG_LCB_RSP = 0x4 } |
Task message types. | |
enum | _LHK_TaskState { LHK_TSK_UNINITIALIZED = 0, LHK_TSK_INITIALIZED = 1, LHK_TSK_STARTED = 2, LHK_TSK_STOPPING = 3, LHK_TSK_ALLOCATED = 4 } |
Task message types. More... | |
enum | _LHK_CcbOpcode { LHK_CCB_UNDEF = 0x00, LHK_CCB_TEMENV = 0x01, LHK_CCB_AEMENV = 0x02, LHK_CCB_PDUENV = 0x03, LHK_CCB_PDUPWR = 0x04, LHK_CCB_GEMLRS = 0x05, LHK_CCB_FILEST = 0x06, LHK_CCB_COMMST = 0x07, LHK_CCB_CPUMET = 0x08, LHK_CCB_RTSTAT = 0x09, LHK_CCB_MEMSTAT = 0x0a, LHK_CCB_LTCTLM = 0x0b, LHK_CCB_LIMTLM = 0x0c, LHK_CCB_EBMST = 0x0d, LHK_CCB_ITCST = 0x0e } |
Collection ctl blk opcodes. | |
enum | _LHK_CiOpcode { LHK_CI_UNDEF = 0x0, LHK_CI_TEMENV = 0x1, LHK_CI_AEMENV = 0x2, LHK_CI_PDUENV = 0x3, LHK_CI_PDUPWR = 0x4, LHK_CI_AEMPWR = 0x5, LHK_CI_GEMLIVE = 0x6, LHK_CI_GEMPRSC = 0x7, LHK_CI_GEMDISC = 0x8, LHK_CI_GEMSENT = 0x9, LHK_CI_GEMDEAD = 0xa, LHK_CI_FILEST = 0xb, LHK_CI_COMMST = 0xc, LHK_CI_CPUMET = 0xd, LHK_CI_RTSTAT = 0xe, LHK_CI_MEMSTAT = 0xf, LHK_CI_PIDSTAT = 0x10, LHK_CI_LTCTLM = 0x11, LHK_CI_LIMTLM = 0x12, LHK_CI_EBMST = 0x13, LHK_CI_ITCST = 0x14 } |
Collection item opcodes. | |
Functions | |
unsigned int | LHK_sched_create (const TASK_attr *attr) |
Spawns the LHK scheduler task. | |
unsigned int | LHK_sched_activate (void) |
Starts the LHK scheduler task timer. | |
unsigned int | LHK_sched_exit (void) |
Exits the LHK scheduler task. | |
unsigned int | LHK_sched_reset (LHK_CfgDesc *cfg) |
Reconfigures the scheduler. | |
unsigned int | LHK_reset_cl (void *ccb_ptr) |
Resets the ci list. | |
unsigned int | LHK_sched_replace (LHK_Ccb *ccb) |
Queus a ccb replace message to the scheduler task. | |
unsigned int | LHK_destroy_ccb (LHK_Ccb *ccb) |
Destroys a ccb. | |
unsigned int | LHK_build_rt (void) |
unsigned int | LHK_build_alrt (unsigned short dev, unsigned short adc, unsigned short val, unsigned short lim) |
unsigned int | LHK_encode_lists (LHK_CfgDesc *cfg, LI_head *ccb_list) |
Initializes the collection table control block lists. | |
unsigned int | LHK_init_pktTbl (void) |
unsigned int | LHK_scan_pkt (LHK_PktTbl *pkt_tbl, unsigned short apid, LHK_PktDesc **pkt) |
Scans the packet table for a matching apid. | |
unsigned int | LHK_limChkAem (LHK_AdcWord *value, LHK_DataDesc *data, LHK_LimStatCode *adcstat) |
Limit checks an AEM adc value. | |
FORK_cb_status | LHK_decode_rl (void *ccb, void *prm) |
Processes a LCB result lists. | |
FORK_cb_status | LHK_svc_diag (FORK_cb_prm *prm, FORK_msg_hdr *hdr) |
Services request for a diagnostic packet. | |
unsigned int | LHK_decode_slv (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len) |
Decodes a slave data response. | |
unsigned int | LHK_ctdb_cb (void *pkt, void *arg) |
This function is the CTDB 1553 callback routine. The CTDB driver requests a new telemetry packet at 4Hz. | |
unsigned int | LHK_diag_cb (void *pay) |
Initiaites construction of a diagnostic packet. | |
unsigned int | LHK_stopDiag_cb (void) |
Cancels current diagnostic. | |
unsigned int | LHK_reset_cb (void *pay) |
Initiates a system reset. | |
unsigned int | LHK_lcb_cb (void *prm, LCBD_xcb *xcb) |
Callback for the LCB result list. | |
unsigned int | LHK_ccb_cb (LHK_Ccb *ccb) |
Simple callback for non-hardware ccbs. | |
void | LHK_free_fpm (ITC_QueueItem *qitem, unsigned int status, void *prm0, void *prm1, void *prm2) |
Frees a qitem from FPA pool memory. | |
unsigned int | LHK_noop (void) |
LHK noop. | |
Variables | |
_LHK_Ctl | LHK_ctl |
The application control block. | |
LHK_PktTbl | LHK_pktTbl |
The housekeeping packet addressing table. | |
LHK_DiagMap | LHK_diagApidTbl |
The housekeeping diag apid mapping table. |
|
Value: { \
if( pidCnf( _pn, _t, _s, _o ) < 0 ) \
_msg_report( LHK_PIDCNF, 1, _pn); \
}
|
|
CTDB packet buffer size in bytes |
|
Default timeout for LCB markers in sysclks |
|
Value: { \
if( (_pv = pidGet( _pn )) < 0 ) \
_msg_report( LHK_PIDGET, 1, _pn); \
}
|
|
The maximum collection control blocks |
|
The maximum collection items |
|
The maximum addresses for a collection item |
|
The maximum milliseconds for a diagnostic interval |
|
The maximum packets to deliver in a diagnostic sample |
|
The maximum scheduler period in milliseconds |
|
The maximum allocation for task messages |
|
The minimum milliseconds for a diagnostic interval |
|
The minumum packets to deliver for a diagnostic sample |
|
The minimum scheduler period in milliseconds |
|
Master task id |
|
Master task priority |
|
SC input PID |
|
SC output PID |
|
SC input PID register 0 |
|
SC input PID register 1 |
|
SC input PID register 2 |
|
PID interface selector |
|
The scheduler task id |
|
The scheduler task priority |
|
Slave handler task id |
|
Slave handler task priority |
|
Typedef for collection list callback function.
|
|
Task message types.
|
|
|
|
|
|
Simple callback for non-hardware ccbs.
|
|
This function is the CTDB 1553 callback routine. The CTDB driver requests a new telemetry packet at 4Hz.
|
|
Processes a LCB result lists.
|
|
Decodes a slave data response.
|
|
Destroys a ccb.
|
|
Initiaites construction of a diagnostic packet.
|
|
Initializes the collection table control block lists.
|
|
Frees a qitem from FPA pool memory.
|
|
|
|
Callback for the LCB result list.
|
|
Limit checks an AEM adc value.
|
|
LHK noop.
|
|
Initiates a system reset.
|
|
Resets the ci list.
|
|
Scans the packet table for a matching apid.
|
|
Starts the LHK scheduler task timer.
|
|
Spawns the LHK scheduler task.
|
|
Exits the LHK scheduler task.
|
|
Reconfigures the scheduler.
|
|
Cancels current diagnostic.
|
|
Services request for a diagnostic packet.
|