GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LCM / V1-4-4

Constituent: lcm_siu     Tag: rad750


Interface   Data Structures   File List   Data Fields   Globals  

LCM_house.c File Reference

CPU generic functions for housekeeping support functions. More...

#include <string.h>
#include "FILE/FILE_upl.h"
#include "ITC/ITC_drvdefs.h"
#include "ITC/ITC_pubdefs.h"
#include "LHK/LHK_pubdefs.h"
#include "LHK/LHK_tlmdefs.h"
#include "MDB/MDB_pubdefs.h"
#include "MEM/MEM_pubdefs.h"
#include "MON/MON_pubdefs.h"
#include "PBS/FORK.h"
#include "PBS/FPA.h"
#include "PBS/MBA.h"
#include "PBS/TOV.h"
#include "THS/THS.h"
#include "LCM/LCM_msgs.h"
#include "LCM_prvdefs.h"

Include dependency graph for LCM_house.c:


Defines

#define LCM_L_RECORD_PKT   (8)
#define LCM_K_PID_SC_0   (23)
#define LCM_K_PID_SC_1   (24)
#define LCM_K_PID_SC_2   (25)
#define LCM_K_PID_SEL   (7)
#define LCM_PIDCONFIG(_pn, _t, _s, _o)
 Configure a PID.
#define LCM_PIDGET(_pn, _pv)
 Read an input PID.

Functions

static WUT_cb_status expireTickle (void *prm, WUT_tmr *tmr)
 Timer callback routine (called at interrupt level).
static FORK_cb_status forkTickle (FORK_cb_prm *prm, FORK_msg_hdr *hdr)
 Task level target of the CPU metric cyclic interrupt timer.
static void fpa_free_cb (ITC_QueueItem *qitem, unsigned int status, void *prm0, void *prm1, void *prm2, unsigned int tx)
 Clean up after sending a housekeeping record to the SIU.
unsigned int LCM_houseInitialize (LCM_Control *ctl)
 Initialize the housekeeping function (common to all CPUs).
unsigned int LCM_houseSendCPU (unsigned int report)
 Acquire and send CPU metric information.
unsigned int LCM_houseSendITC (unsigned int report)
 Acquire and send ITC configuration information.
unsigned int LCM_houseSendLPA (unsigned int report)
 Acquire and send LPA (filter) configuration information.
unsigned int LCM_houseTaskInitialize (LCM_Control *ctl)
 One-time call in LCM task context to start housekeeping sub-function.

Detailed Description

CPU generic functions for housekeeping support functions.

CVS $Id: LCM_house.c,v 1.2 2007/10/31 20:34:38 apw Exp $
Author:
A.P.Waite
LCM_house.c provides CPU generic support for LCM's housekeeping support functions.

Define Documentation

#define LCM_PIDCONFIG _pn,
_t,
_s,
_o   ) 
 

Value:

{                                                 \
    if( pidCnf( _pn, _t, _s, _o ) == ERROR )      \
    {                                             \
        _msg_report( LCM_PIDCFGFL, 0, 1, _pn );   \
    }                                             \
}
Configure a PID.

Parameters:
_pn (in) PID number
_t (in) DISABLE, IN, OUT, IN_OUT
_s (in) Input sensitivity IN_LEVEL, IN_EDGE
_o (in) OUT_REG or OUT_TIMER

#define LCM_PIDGET _pn,
_pv   ) 
 

Value:

{                                                 \
    int _pid_value;                               \
    if( ( _pid_value = pidGet( _pn ) ) == ERROR ) \
    {                                             \
        _msg_report( LCM_PIDGETFL, 0, 1, _pn );   \
    }                                             \
    else                                          \
    {                                             \
        _pv = _pid_value;                         \
    }                                             \
}
Read an input PID.

Parameters:
_pn (in) PID number
_pv (out) PID value (left untouched if pidGet() fails)


Function Documentation

static WUT_cb_status expireTickle void *  prm,
WUT_tmr *  tmr
[static]
 

Timer callback routine (called at interrupt level).

Parameters:
prm (in) User parameter (a "tickle" block)
tmr (in) Wake up timer handle
expireTimer() is a timer callback routine. It simply wakes up the LCM task using a FORK message to the "fqi" (ITC_Q_SYNC) queue, requesting execution by the routine listed in the tickle block.

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

Task level target of the CPU metric cyclic interrupt timer.

Parameters:
prm (in) FORK parameter (not used) (cannot be used!)
hdr (in) The fork message
forkTickle() drives the cyclic acquisition housekeeping information

static void fpa_free_cb ITC_QueueItem *  qitem,
unsigned int  status,
void *  prm0,
void *  prm1,
void *  prm2,
unsigned int  tx
[static]
 

Clean up after sending a housekeeping record to the SIU.

Parameters:
qitem (in) Queue item
status (in) Status from ITC_send()
prm0 (in) User param 0 (FPA control block)
prm1 (in) User param 1 (unused)
prm2 (in) User param 2 (unused)
tx (in) Failure during send phase of ITC_send() (unused)
fpa_free_cb() is the callback routine that's called once a housekeeping record has been delivered to the SIU (a standard ITC completion routine).

unsigned int LCM_houseInitialize LCM_Control ctl  ) 
 

Initialize the housekeeping function (common to all CPUs).

Parameters:
ctl (in) LCM control block
LCM_houseInitialize() builds up the CPU common elements for providing housekeeping information.

unsigned int LCM_houseSendCPU unsigned int  report  ) 
 

Acquire and send CPU metric information.

Parameters:
report (in) Force a diagnostic packet on the SIU
LCM_houseSendCPU() does an immediate acquisition and send of CPU metric information to the SIU.

unsigned int LCM_houseSendITC unsigned int  report  ) 
 

Acquire and send ITC configuration information.

Parameters:
report (in) Force a diagnostic packet on the SIU
LCM_houseSendITC() does an immediate acquisition and send of ITC configuration information to the SIU.

unsigned int LCM_houseSendLPA unsigned int  report  ) 
 

Acquire and send LPA (filter) configuration information.

Parameters:
report (in) Force a diagnostic packet on the SIU
LCM_houseSendLPA() does an immediate acquisition and send of LPA (filter) configuration information to the SIU.

unsigned int LCM_houseTaskInitialize LCM_Control ctl  ) 
 

One-time call in LCM task context to start housekeeping sub-function.

Parameters:
ctl (in) LCM control block
LCM_houseTaskInitialize() performs any initialization required by the house- keeping subfunction which must be performed in the context of the LCM task.


Generated on Mon Nov 5 02:23:23 2007 by  doxygen 1.4.4