GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LIH / V0-2-7 > lih / linux-gcc
#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>
Classes | |
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 struct _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 __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, void **prm, unsigned int *minor) |
Initialize the TEM hardware acquisition. |
CVS $Id: LIH_TEM.c,v 1.4 2011/03/29 22:38:00 apw Exp $
static __inline void copy_env | ( | unsigned short * | dst, | |
const unsigned short * | src | |||
) | [static] |
Expand/copy ADCs from result list to target packet.
dst | (in) Destination | |
src | (in) Source |
Referenced by AEMacquire(), PDUacquire(), and TEMacquire().
unsigned int LIH_TEMinit | ( | LIH_Control * | hcb, | |
LIH_cb_Acquire * | acq, | |||
void ** | prm, | |||
unsigned int * | minor | |||
) |
Initialize the TEM hardware acquisition.
hcb | (in) Control block | |
acq | (out) TEM acquisition routine | |
prm | (out) TEM acquisition routine parameter | |
minor | (out) Number of minor cycles needed for TEM acquisition |
References _TEM_Control::adc, _LIH_Packet::adc, _LIH_Put::adc, _LIH_Source::hdx, _LIH_Database::hpk, _LIH_Put::hpk, _LIH_Source::ins, _LIH_Control::lcbd, LIH_Adc2source, LIH_hpk2ADC, LIH_K_DVC_TEM, load_mpx(), _TEM_Control::mem, _LIH_Source::mpx, _LIH_Put::nxt, _LIH_Control::pdb, read_env(), _TEM_Control::src, TEMacquire(), and _TEM_Control::xcb.
Referenced by initializeAcq().
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.
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) |
Referenced by LIH_PDUinit(), and LIH_TEMinit().
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.
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) |
Referenced by LIH_PDUinit(), and LIH_TEMinit().
void TEMacquire | ( | LIH_Control * | hcb, | |
void * | prm, | |||
unsigned int | minor | |||
) | [static] |
Acquire TEM environmental data for the requested minor cycle.
hcb | (in) Control block | |
prm | (in) User parameter (TEM control block) | |
minor | (in) Minor (TEM) cycle |
References _LIH_Put::adc, _TEM_Control::adc, _LIH_Database::cnt, copy_env(), _LIH_Database::hpk, _LIH_Put::hpk, LIH_hpk2aidx, LIH_limitCheck(), _LIH_Put::nxt, _LIH_Control::online, _LIH_Control::pdb, _TEM_Control::src, _LIH_Packet::tim, and _TEM_Control::xcb.
Referenced by LIH_TEMinit().