GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSE / V2-3-0 > qse / sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

QDF_dgn.c File Reference

Generic sizeof and construct for decoding the DGN data. More...

#include "QSE/QDF_dgn.h"
#include "QSE/QDF_gem.h"
#include "QDF_dgn_def.h"
#include "QDF_esb_def.h"
#include "QDF_cal_def.h"
#include "QDF_tkr_def.h"
#include "LSE/CDF_dgndef.h"
#include "LDT/RLD.h"
#include "LDT/BTD.h"
#include "LDT/BFU.h"
#include "LDT/BWU.h"
#include "LDT/BIT.h"
#include "EDS/EBF_gem.h"
#include "EDS/FFS.h"
#include "dprintf.h"

Defines

#define NULL   ((void *)(0))

Functions

int QDF_dgnCtxSizeof (unsigned int level, void *prm)
 Returns the size, in bytes of the DGN decoding context needed to support the specified compression level.
QDF_dgnCtxQDF_dgnCtxConstruct (QDF_dgnCtx *ctx, unsigned int level, void *prm, QSE_ctx const *qse)
 Constructs (initializes) the specified DGN decoding context structure.
int QDF_dgnCtxUpdate (QDF_dgnCtx *ctx, QFR_fileCtx *qfr, CDF_dgnBdy const *bdy)
 Updates the DGN context from the datagram contribution.
int QDF_dgnEvtSizeof (unsigned int level, void *prm)
 Returns the size, in bytes of QDF_dgnEvt needed to support the specified compression level.
QDF_dgnEvtQDF_dgnEvtConstruct (QDF_dgnEvt *evt, unsigned int level, void *prm, QDF_exc *exc, QDF_esbEvt const *esb, QDF_gemEvt const *gem, QDF_errEvt const *err, QDF_calEvt const *cal, QDF_tkrEvt const *tkr)
 Constructs (initializes) the specified DGN event structure.
static __inline BFU decode_tkr_10 (unsigned int *dgn, const unsigned int *src, unsigned int max, BFU bfu, int cnt, int acnt, unsigned int accept)
static __inline BFU decode_tkr_11 (unsigned int *dgn, const unsigned int *src, unsigned int max, BFU bfu, int cnt, unsigned int accept)
BFU QDF_dgn_gen_cal_trg_decode (QDF_dgnCalTrg *trg, unsigned int calHiLo, unsigned int const *src, unsigned int max, BFU bfu)
 Decodes the CAL trigger bits portion of the diagnostic data.
BFU QDF_dgn_gen_hdr_decode (QDF_maps *dmaps, unsigned int const *src, unsigned int max, BFU bfu)
 Decodes two difference maps
  • The map of CAL/TKR towers whose diagnostic accept data differ from that predicted by the data.
  • The map of CAL towers whose CAL LO and/or CAL HI trigger bits differ from the GEM CAL LO and CAL HI mask trigger summary word.

BFU QDF_dgn_gen_tkr_accept_decode (QDF_dgnTkrAccept *accept, unsigned int map, unsigned int err_map, QDF_tkrEvt const *tkr, unsigned int const *src, unsigned int max, BFU bfu)
 Decodes the TKR accept bits portion of the diagnostic data.


Detailed Description

Generic sizeof and construct for decoding the DGN data.

Author:
JJRussell - russell@slac.stanford.edu

   CVS $Id: QDF_dgn.c,v 1.1 2009/05/01 00:18:12 russell Exp $

Function Documentation

BFU QDF_dgn_gen_cal_trg_decode ( QDF_dgnCalTrg trg,
unsigned int  calHiLo,
unsigned int const *  src,
unsigned int  max,
BFU  bfu 
)

Decodes the CAL trigger bits portion of the diagnostic data.

Returns:
The updated BFU (current word being decoded and the current bit position).
Parameters:
trg The diagnostic CAL trigger structure to hold the decoded data.
calHiLo The map of towers that have encoded trigger bits
src The input bit stream to be decoded
max The maximum number of bits in the bit stream
bfu The value of the current 32-bit word being decoded and the current bit position.

BFU QDF_dgn_gen_hdr_decode ( QDF_maps dmaps,
unsigned int const *  src,
unsigned int  max,
BFU  bfu 
)

Decodes two difference maps

Returns:
The updated BFU (current word being decoded and the current bit position).
Parameters:
dmaps Returned with the values of the two maps
src The input bit stream to be decoded
max The maximum number of bits in the bit stream
bfu The value of the current 32-bit word being decoded and the current bit position.

BFU QDF_dgn_gen_tkr_accept_decode ( QDF_dgnTkrAccept accept,
unsigned int  map,
unsigned int  err_map,
QDF_tkrEvt const *  tkr,
unsigned int const *  src,
unsigned int  max,
BFU  bfu 
)

Decodes the TKR accept bits portion of the diagnostic data.

Returns:
The updated BFU (current word being decoded and the current bit position).
Parameters:
accept Array of the 72 accept bits for each tower
map The map of towers that have encoded accept bits.
err_map The map of towers that have tracker readout errors.
tkr The TKR data. The encoded data are the exceptions and must be XOR'ed with the TKR accept bits found in the data to produce the TKR diagnostic accept bits.
src The input bit stream to be decoded
max The maximum number of bits in the bit stream
bfu The value of the current 32-bit word being decoded and the current bit position.

QDF_dgnCtx * QDF_dgnCtxConstruct ( QDF_dgnCtx ctx,
unsigned int  level,
void *  prm,
QSE_ctx const *  qse 
)

Constructs (initializes) the specified DGN decoding context structure.

Returns:
Pointer to the context structure to construct
Parameters:
ctx The context structure to construct.
level The maximum level of compression that will be supported.
prm Additional configuation parameter, unused as of now
qse The generic datagram context

int QDF_dgnCtxSizeof ( unsigned int  level,
void *  prm 
)

Returns the size, in bytes of the DGN decoding context needed to support the specified compression level.

Returns:
The size, in bytes, of the DGN decoding context
Parameters:
level The maximum level of compression that needs to be supported
prm Additional configuation parameter, unused as of now

int QDF_dgnCtxUpdate ( QDF_dgnCtx ctx,
QFR_fileCtx *  qfr,
CDF_dgnBdy const *  bdy 
)

Updates the DGN context from the datagram contribution.

Return values:
0,Success 
Parameters:
ctx The context to update
qfr The file translation context
bdy The update information, currently none

QDF_dgnEvt * QDF_dgnEvtConstruct ( QDF_dgnEvt evt,
unsigned int  level,
void *  prm,
QDF_exc exc,
QDF_esbEvt const *  esb,
QDF_gemEvt const *  gem,
QDF_errEvt const *  err,
QDF_calEvt const *  cal,
QDF_tkrEvt const *  tkr 
)

Constructs (initializes) the specified DGN event structure.

Returns:
Pointer to the context structure to construct
Parameters:
evt The DGN event structure to construct.
level The maximum level of compression that will be supported.
prm Additional configuation parameter, unused as of now
exc The exception handling context.
esb Pointer to the ESB data for this event (Event Summmary Block)
gem Pointer to the GEM data for this event
err Pointer to the ERR data for this event
cal Pointer to the CAL data for this event
tkr Pointer to the TKR data for this event

int QDF_dgnEvtSizeof ( unsigned int  level,
void *  prm 
)

Returns the size, in bytes of QDF_dgnEvt needed to support the specified compression level.

Returns:
The size, in bytes, of the DGN event
Parameters:
level The maximum level of compression that needs to be supported
prm Additional configuation parameter, unused as of now


Generated on Thu Sep 2 14:54:54 2010 by  doxygen 1.5.3