GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LHK / V11-4-2

Constituent: lhkt     Tag: linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

LHK_ctl.c File Reference

Implements application command and control. More...

#include <string.h>
#include "PBS/MBA.h"
#include "PBS/LI.h"
#include "CTDB/CTDB_rt.h"
#include "CTS/CTS_pubdefs.h"
#include "LHK_p.h"
#include "LHK/LHK_cmdxtrn.h"
#include "LHK/LHK_msgs.h"
#include "CDM/CDM_pubdefs.h"
#include "CPU_DB/CPU_DB_pubdefs.h"
#include "LHK_DB/LHK_DB_schema.h"
#include "TRC/TRC_pubdefs.h"

Include dependency graph for LHK_ctl.c:


Functions

static unsigned int LHK_init_alloc (void)
 Allocates all memory for the global control blocks.
static FORK_cb_status LHK_crHandler (FORK_cb_prm *prm, FORK_msg_hdr *hdr)
 The LHK command/response handler.
static FORK_cb_status LHK_svc_ctdb (FORK_cb_prm *prm, FORK_msg_hdr *hdr)
 Services the CTDB callback with the next scheduled packet.
static FORK_cb_status LHK_svc_reset (FORK_cb_prm *prm, FORK_msg_hdr *hdr)
 Services system reset command.
static WUT_cb_status LHK_diag_intv_cb (void *ptr, WUT_tmr *wut)
 The diagnostic timer.
unsigned int LHK_init (void)
 Initializes the housekeeping system.
unsigned int LHK_initialize (unsigned int arg0, unsigned int arg1, unsigned int arg2, unsigned int arg3)
 Initializes the housekeeping system.
unsigned int LHK_startTask (TASK_attr sched_attr, TASK_attr cmd_attr)
 Starts all LHK tasks with attribute blocks.
unsigned int LHK_start (void)
 Starts all LHK tasks.
unsigned int LHK_stop (void)
 Stops all LHK tasks and resets all control structures.
unsigned int LHK_shutdown (void)
 Shuts down LHK and frees memory structures.
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_ccb_cb (LHK_Ccb *ccb)
 Simple callback for non-hardware ccbs.
unsigned int LHK_lcb_cb (void *prm, LCBD_xcb *xcb)
 Callback for the LCB result list.
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 *item)
 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_noop (void)
 LHK noop.

Variables

_LHK_Ctl LHK_ctl
 The application control block.

Detailed Description

Implements application command and control.

Author:
Sergio Maldonado -- smaldona@slac.stanford.edu

Function Documentation

unsigned int LHK_ccb_cb LHK_Ccb ccb  ) 
 

Simple callback for non-hardware ccbs.

Parameters:
ccb Collection control block
Returns:
LHK_SUCCESS on success

static FORK_cb_status LHK_crHandler FORK_cb_prm *  prm,
FORK_msg_hdr *  hdr
[static]
 

The LHK command/response handler.

Returns:
void

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.

Parameters:
pkt Packet buffer pointer
arg User supplied argument
Returns:
LHK_SUCCESS on success

unsigned int LHK_diag_cb void *  item  ) 
 

Initiaites construction of a diagnostic packet.

Parameters:
item ITC queue item
Returns:
LHK_SUCCESS on success

static WUT_cb_status LHK_diag_intv_cb void *  prm,
WUT_tmr *  wut
[static]
 

The diagnostic timer.

Parameters:
prm Pointer to callback parameter
wut Pointer to WUT timer structure
Returns:
WUT constant WUT_K_STATE_CHANGE_YES

void LHK_free_fpm ITC_QueueItem *  qitem,
unsigned int  status,
void *  prm0,
void *  prm1,
void *  prm2
 

Frees a qitem from FPA pool memory.

Parameters:
qitem Pointer to ITC qitem
status status code
prm0 Parameter 0
prm1 Parameter 1
prm2 Parameter 2

unsigned int LHK_init void   ) 
 

Initializes the housekeeping system.

Returns:
LHK_SUCCESS on success

static unsigned int LHK_init_alloc void   )  [static]
 

Allocates all memory for the global control blocks.

Returns:
LHK_SUCCESS on success

unsigned int LHK_initialize unsigned int  arg0,
unsigned int  arg1,
unsigned int  arg2,
unsigned int  arg3
 

Initializes the housekeeping system.

Parameters:
arg0 cfg file id
arg1 cfg file id
arg2 cfg file id
arg3 cfg file id
Returns:
LHK_SUCCESS on success

unsigned int LHK_lcb_cb void *  prm,
LCBD_xcb *  xcb
 

Callback for the LCB result list.

Parameters:
prm Callback parameter
xcb Transaction control block pointer
Returns:
LHK_SUCCESS on success

unsigned int LHK_noop void   ) 
 

LHK noop.

Returns:
LHK_SUCCESS on success

unsigned int LHK_reset_cb void *  pay  ) 
 

Initiates a system reset.

Parameters:
pay Telecommand packet payload
Returns:
LHK_SUCCESS on success

unsigned int LHK_shutdown void   ) 
 

Shuts down LHK and frees memory structures.

Returns:
LHK_SUCCESS on success

unsigned int LHK_start void   ) 
 

Starts all LHK tasks.

Returns:
LHK_SUCCESS on success

unsigned int LHK_startTask TASK_attr  sched_attr,
TASK_attr  cmd_attr
 

Starts all LHK tasks with attribute blocks.

Parameters:
sched_attr Scheduler task attributes
cmd_attr Command task attribute
Returns:
LHK_SUCCESS on success

unsigned int LHK_stop void   ) 
 

Stops all LHK tasks and resets all control structures.

Returns:
LHK_SUCCESS on success

unsigned int LHK_stopDiag_cb void   ) 
 

Cancels current diagnostic.

Returns:
LHK_SUCCESS on success

static FORK_cb_status LHK_svc_ctdb FORK_cb_prm *  prm,
FORK_msg_hdr *  hdr
[static]
 

Services the CTDB callback with the next scheduled packet.

Parameters:
prm Pointer to callback parameter
hdr Pointer to the message

static FORK_cb_status LHK_svc_reset FORK_cb_prm *  prm,
FORK_msg_hdr *  hdr
[static]
 

Services system reset command.

Parameters:
prm Pointer to callback parameter
hdr Pointer to the message
Returns:
LHK_SUCCESS on success


Generated on Tue Aug 14 01:51:18 2007 by  doxygen 1.4.4