GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LIH / V0-1-0

Constituent: lih     Tag: mv2304


Interface   Data Structures   File List   Data Fields   Globals  

LIH_TEM.c File Reference

TEM specific environmental monitor acquisition. More...

#include <string.h>
#include "LCBD/LCBC.h"
#include "LCBD/LCBD_rst.h"
#include "LCBD/LCBR.h"
#include "LEM/encode_macros.h"
#include "LEM/encode_structs.h"
#include "LHK/LHK_pubdefs.h"
#include "LIH_DB/LIH_DB_ADCdefs.h"
#include "MDB/MDB_pubdefs.h"
#include "PBS/FFS.ih"
#include "PBS/MBA.h"
#include "LIH/LIH_msgs.h"
#include "LIH_prvdefs.h"

Include dependency graph for LIH_TEM.c:


Data Structures

struct  _TEM_Control
 Control structure for TEM environmental readout. More...

Defines

#define LIH_L_TEM   (16)
#define LIH_L_TEM_CYCLE   (4)
#define LIH_L_TEM_PER_CYCLE   (4)
#define LIH_L_MPX_PER_TEM   (5)
#define LIH_L_ADC_PER_MPX   (8)

Typedefs

typedef _TEM_Control TEM_Control
 Typedef for struct _TEM_Control.

Functions

static void TEMacquire (LIH_Control *hcb, void *prm, unsigned int minor)
 Acquire TEM environmental data for the requested minor cycle.
static void TEMreference (LIH_Control *hcb, void *prm, LIH_DB_ADC adx, unsigned int able)
 Update the limit reference counter.
static __inline void copy_env (unsigned short *dst, const unsigned short *src)
 Expand/copy ADCs from result list to target packet.
static __inline LCB_ci * load_mpx (LCB_ci_cmd *ci, unsigned int tem, unsigned int mpx, unsigned int stall)
 Insert a command to set a TEM's ADC group multiplexer.
static __inline LCB_ci * read_env (LCB_ci_cmdr *ci, unsigned int tem, unsigned int stall)
 Insert a command to read a TEM's environmental monitor ADCs.
unsigned int LIH_TEMinit (LIH_Control *hcb, LIH_cb_Acquire *acq, LIH_cb_Reference *ref, void **prm, unsigned int *minor)
 Initialize the TEM hardware acquisition.

Detailed Description

TEM specific environmental monitor acquisition.

CVS $Id: LIH_TEM.c,v 1.2 2007/12/07 03:59:21 apw Exp $
Author:
A.P.Waite
LIH_TEM.c provides all the TEM specific functionality to acquire TEM environmental monitoring quantities and store the results in the hardware packet database.

Function Documentation

static __inline void copy_env unsigned short *  dst,
const unsigned short *  src
[static]
 

Expand/copy ADCs from result list to target packet.

Parameters:
dst (in) Destination
src (in) Source

unsigned int LIH_TEMinit LIH_Control hcb,
LIH_cb_Acquire acq,
LIH_cb_Reference ref,
void **  prm,
unsigned int *  minor
 

Initialize the TEM hardware acquisition.

Parameters:
hcb (in) Control block
acq (out) TEM acquisition routine
ref (out) TEM limit reference counter
prm (out) TEM acquisition routine parameter
minor (out) Number of minor cycles needed for TEM acquisition

static __inline LCB_ci * load_mpx LCB_ci_cmd *  ci,
unsigned int  tem,
unsigned int  mpx,
unsigned int  stall
[static]
 

Insert a command to set a TEM's ADC group multiplexer.

Parameters:
ci (in) Command item pointer (LCBD version)
tem (in) TEM (same as the TEM's LATp address)
mpx (in) Multiplexer number
stall (in) Stall time (LCB 20 MHz tics)

static __inline LCB_ci * read_env LCB_ci_cmdr *  ci,
unsigned int  tem,
unsigned int  stall
[static]
 

Insert a command to read a TEM's environmental monitor ADCs.

Parameters:
ci (in) Command item pointer (LCBD version)
tem (in) TEM (same as the TEM's LATp address)
stall (in) Stall time (LCB 20 MHz tics)

void TEMacquire LIH_Control hcb,
void *  prm,
unsigned int  minor
[static]
 

Acquire TEM environmental data for the requested minor cycle.

Parameters:
hcb (in) Control block
prm (in) User parameter (TEM control block)
minor (in) Minor (TEM) cycle

static void TEMreference LIH_Control hcb,
void *  prm,
LIH_DB_ADC  adx,
unsigned int  able
[static]
 

Update the limit reference counter.

Parameters:
hcb (in) Control block
prm (in) User parameter (TEM control block)
adx (in) ADC index (in LIH_DB_ADCdefs.h)
able (in) Enable/disable flag (boolean, 1 => enable)


Generated on Fri Dec 7 01:37:02 2007 by  doxygen 1.4.4