GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSE / dev > qse / rhel5-64
#include <QSE/QDF_cal.h>
#include <QSE/QDF_gem.h>
#include <QDF_cal_def.h>
#include <QDF_cal_prd.h>
#include <QDF_cal_prd_def.h>
#include <dprintf.h>
#include <QSD/QFR_file.h>
#include <QSD/QFR_cdm.h>
#include <LSE/CDF_caldef.h>
#include <LDT/HDD.h>
#include <EDS/ECR_cal.h>
#include <CAL_DB/CAL_DB_schema_pedestals.h>
#include <CAL_DB/CAL_DB_schema_gains.h>
#include <PBI/FFS.ih>
#include <PBI/Fletcher.h>
#include <stdio.h>
Defines | |
#define | NULL ((void *)0) |
Functions | |
static unsigned int | calCtxPedsConstruct (QDF_calCtx *ctx, const CAL_DB_schema_pedestals *peds, const char *name) |
Constructs the pedestals from the CAL database of pedestals. | |
static unsigned int | calCtxGainsConstruct (QDF_calCtx *ctx, const CAL_DB_schema_gains *gains, const char *name) |
Constructs the gains from the CAL database of gains. | |
int | QDF_calCtxSizeof (unsigned int level, void *prm) |
Returns the size, in bytes of the CAL decoding context needed to support the specified compression level. | |
QDF_calCtx * | QDF_calCtxConstruct (QDF_calCtx *ctx, unsigned int level, QDF_calCache *cache, const QSE_ctx *qse) |
Constructs (initializes) the specified CAL decoding context structure. | |
int | QDF_calCtxUpdate (QDF_calCtx *ctx, QFR_fileCtx *qfr, const CDF_calBdy *bdy) |
Updates the CAL context from the datagram contribution. | |
int | QDF_calEvtSizeof (unsigned int level, void *prm) |
Returns the size, in bytes of QDF_cal event needed to support the specified compression level. | |
QDF_calEvt * | QDF_calEvtConstruct (QDF_calEvt *evt, unsigned int level, void *prm, QDF_exc *exc, QDF_esbEvt *esb, QDF_gemEvt *gem, QDF_errEvt *err) |
Constructs (initializes) the specified CAL event structure. | |
BFU | QDF_calEvtCopyDirForm (QDF_calEvtCopyDir *dir, unsigned int map, unsigned int four_range, const unsigned int *src, int max, BFU bfu) |
Forms the directory of copy descriptors for CAL data that was just copied into the output stream. |
CVS $Id: QDF_cal.c,v 1.9 2011/03/27 01:45:44 russell Exp $
static unsigned int calCtxGainsConstruct | ( | QDF_calCtx * | ctx, | |
const CAL_DB_schema_gains * | gains, | |||
const char * | name | |||
) | [static] |
Constructs the gains from the CAL database of gains.
ctx | The CAL context structure | |
gains | The CAL gains database schema | |
name | The CAL gains database name |
References _QDF_calCtx::calib, and _QDF_calCtx::opts.
Referenced by QDF_calCtxUpdate().
static unsigned int calCtxPedsConstruct | ( | QDF_calCtx * | ctx, | |
const CAL_DB_schema_pedestals * | peds, | |||
const char * | name | |||
) | [static] |
Constructs the pedestals from the CAL database of pedestals.
ctx | The CAL context structure | |
peds | The CAL pedestals database schema | |
name | The CAL pedestals database name |
References _QDF_calCtx::calib, and _QDF_calCtx::opts.
Referenced by QDF_calCtxUpdate().
QDF_calCtx* QDF_calCtxConstruct | ( | QDF_calCtx * | ctx, | |
unsigned int | level, | |||
QDF_calCache * | cache, | |||
const QSE_ctx * | qse | |||
) |
Constructs (initializes) the specified CAL decoding context structure.
ctx | The context structure to construct. | |
level | The maximum level of compression that will be supported. | |
cache | The CAL caches | |
qse | Pointer to the public/generic QSE context parameter |
References _QDF_calCtx::cache, _QDF_calCtx::hdd, _QDF_calCtx::opts, and _QDF_calCtx::prd.
Referenced by QDF_temCtxConstruct().
int QDF_calCtxSizeof | ( | unsigned int | level, | |
void * | prm | |||
) |
Returns the size, in bytes of the CAL decoding context needed to support the specified compression level.
level | The maximum level of compression that needs to be supported | |
prm | Additional configuation parameter, unused as of now |
References QDF_cal_prd_sizeof().
Referenced by QDF_temCtxConstruct(), and QDF_temCtxSizeof().
int QDF_calCtxUpdate | ( | QDF_calCtx * | ctx, | |
QFR_fileCtx * | qfr, | |||
const CDF_calBdy * | bdy | |||
) |
Updates the CAL context from the datagram contribution.
0,Success | ||
0x80000010,Pedestal | file error, file not found | |
0x80000020,Pedestal | file error, checksum mismatch | |
0x80000040,Gain | file error, file not found | |
0x80000080,Gain | file error, checksum mismatch |
ctx | The context to update | |
qfr | The file translation context | |
bdy | The update information |
References calCtxGainsConstruct(), calCtxPedsConstruct(), _QDF_calCtx::calib, _QDF_calCtx::key_gains, _QDF_calCtx::key_peds, _QDF_calCtx::prd, and QDF_cal_prd_construct().
QDF_calEvt* QDF_calEvtConstruct | ( | QDF_calEvt * | evt, | |
unsigned int | level, | |||
void * | prm, | |||
QDF_exc * | exc, | |||
QDF_esbEvt * | esb, | |||
QDF_gemEvt * | gem, | |||
QDF_errEvt * | err | |||
) |
Constructs (initializes) the specified CAL event structure.
evt | The CAL event structure to construct. | |
level | The maximum level of compression that will be supported. | |
prm | Additional configuation parameter, unused as of now | |
exc | Pointer to the global exception handling context | |
esb | Pointer to the Event Summary Data for this event | |
gem | Pointer to the GEM data for this event | |
err | Pointer to the ERR data for this event |
References _QDF_calEvt::err, _QDF_calEvt::esb, _QDF_calPedEvt::exc, _QDF_calStdEvt::exc, _QDF_calEvt::gem, _QDF_calEvt::ped, QDF_gemEvtGemGet(), and _QDF_calEvt::std.
Referenced by QDF_temEvtConstruct().
BFU QDF_calEvtCopyDirForm | ( | QDF_calEvtCopyDir * | dir, | |
unsigned int | map, | |||
unsigned int | four_range, | |||
const unsigned int * | src, | |||
int | max, | |||
BFU | bfu | |||
) |
Forms the directory of copy descriptors for CAL data that was just copied into the output stream.
dir | The copy directory to fill out | |
map | Left-justified, big-endian map of the active towers | |
four_range | 0, 0 if single range, 1 if four-range | |
src | The data source, i.e. the bit stream | |
max | The maximum bit position | |
bfu | The current bit position and temporary buffer |
References _QDF_calEvtCopyDsc::dat, _QDF_calEvtCopyDir::map, _QDF_calEvtCopyDsc::nbytes, and _QDF_calEvtCopyDir::twrs.
Referenced by cal_ped1_style_0(), and cal_ped4_style_0().
int QDF_calEvtSizeof | ( | unsigned int | level, | |
void * | prm | |||
) |
Returns the size, in bytes of QDF_cal event needed to support the specified compression level.
level | The maximum level of compression that needs to be supported | |
prm | Additional configuation parameter, unused as of now |
Referenced by QDF_temEvtConstruct(), and QDF_temEvtSizeof().