GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LSE / V2-0-1 > lsew / sun-gcc
#include "LSE/CDF_err.h"
#include "LSE/CDF_errdef.h"
#include "CDF_err_def.h"
#include "EDS/EBF_tem.h"
#include "EDS/EBF_err.h"
#include "EDS/EBF_tkr.h"
#include "EDS/EBF_dir.h"
#include "EDS/EBF_cid.h"
#include "EDS/EDR_tkr.h"
#include "EDS/EDR_err.h"
#include "EDS/FFS.h"
#include "LDT/BFP.h"
#include <string.h>
#include "dprintf.h"
Defines | |
#define | TAG0 0xd |
#define | TAG1 0x2 |
#define | TAG2 0x7 |
#define | TAG3 0x8 |
#define | TAGS ((TAG3<<12) | (TAG2<<8) | (TAG1<<4) | TAG0) |
Typedefs | |
typedef unsigned int(* | cdf_err_tem_compress_rtn )(CDF_errTem *err, unsigned int *buf, unsigned int pos, unsigned int tag) |
Functions | |
int | CDF_errCfg_sizeof (int level) |
Returns the size, in bytes of the GEM compression configuration needed to support the specified level. | |
int | CDF_errCfg_construct (CDF_errCfg *cfg, int level, void **mem) |
Constructs the CDF_erfCfg compression configuration. | |
int | CDF_err_sizeof (int level, const CDF_errCfg *cfg) |
Returns the size, in bytes of the ERR compression structure needed to support the specified level. | |
int | CDF_err_construct (CDF_err *cdf, int level, const CDF_errCfg *cfg, const LSEW_dgmFw *dgmFw, void **mem) |
Constructs the CDF_err compression context. | |
static __inline void | cdf_err_tkr_analyze_timeout (CDF_errTkrTimeout *timeout, const unsigned short *err, const EDR_errTkr *tkr) |
static __inline unsigned int | cdf_err_analyze_rc_pe (CDF_errTkrRc_pe *pe_rec, const unsigned short int *err, const EDR_errTkr *tkr, unsigned int tag) |
static __inline unsigned int | cdf_err_tem_analyze (CDF_errTem *tem_rec, const EDR_errTem *tem, unsigned int tag, unsigned int msk) |
unsigned int | CDF_err_compose (CDF_err *cdf, const EDR_err *err) |
Analyzes the error contribution of TEMs. | |
static __inline int | cdf_err_tem_cable_phase_match (unsigned short int pe, unsigned int tag) |
Checks if the TEM cable phase error word has the same value for all tag members and that value matches the value predicted from the event tag. | |
unsigned int | collapse (unsigned int lo, unsigned int hi) |
unsigned int | expand4to32 (int w) |
static unsigned int | cdf_err_tem_compress_copy (CDF_errTem *tem, unsigned int *buf, unsigned int pos, unsigned int tag) |
Compresses all other (not TEM BUG A or B) error records. | |
static unsigned int | cdf_err_tem_compress_bug_a (CDF_errTem *tem, unsigned int *buf, unsigned int pos, unsigned int tag) |
Compresses the TEM BUG A error records. | |
static unsigned int | cdf_err_tem_compress_bug_b (CDF_errTem *tem, unsigned int *buf, unsigned int pos, unsigned int tag) |
Compresses the TEM BUG B error records. | |
static __inline cdf_err_tem_compress_rtn | cdf_err_tem_classify (const CDF_errTemHeader *hdr, unsigned int tag) |
Compresses the fixed length information an error event. | |
unsigned int | CDF_err_compress (const CDF_err *cdf, unsigned int *buf, unsigned int pos) |
Compresses the ERR contributions. |
CVS $Id: CDF_err.c,v 1.3 2009/04/30 18:25:55 russell Exp $
unsigned int CDF_err_compose | ( | CDF_err * | cdf, | |
const EDR_err * | err | |||
) |
Analyzes the error contribution of TEMs.
cdf | The error context block to compose | |
err | The unpacked error records |
cdf->to = ctids;
unsigned int CDF_err_compress | ( | const CDF_err * | cdf, | |
unsigned int * | buf, | |||
unsigned int | pos | |||
) |
Compresses the ERR contributions.
cdf | The ERR compression data formatting handle | |
buf | The output buffer | |
pos | The position of the next bit to fill |
int CDF_err_construct | ( | CDF_err * | cdf, | |
int | level, | |||
const CDF_errCfg * | cfg, | |||
const LSEW_dgmFw * | dgmFw, | |||
void ** | mem | |||
) |
Constructs the CDF_err compression context.
Status |
cdf | The CDF_err compress context structure to fill | |
level | The maximum compression level that needs to be supported | |
cfg | Target specific configuration parameter | |
dgmFw | The datagram framework handle | |
mem | Pointer to free memory pointer, return as the the updated pointer. If cdf is equal to the current contents of mem, then mem will be advanced by the size of CDF_err, else this routine will believe that the only the variable allocation of cdf needs to be allocated. |
int CDF_err_sizeof | ( | int | level, | |
const CDF_errCfg * | cfg | |||
) |
Returns the size, in bytes of the ERR compression structure needed to support the specified level.
level | The maximum compression level to support | |
cfg | Target specific configuration |
static __inline int cdf_err_tem_cable_phase_match | ( | unsigned short int | pe, | |
unsigned int | tag | |||
) | [static] |
Checks if the TEM cable phase error word has the same value for all tag members and that value matches the value predicted from the event tag.
== | 0, matches the value | |
!= | 0, does not match |
pe | The value of the cable phase error word | |
tag | The predicted tag value |
static __inline cdf_err_compress_rtn cdf_err_tem_classify | ( | const CDF_errTemHeader * | hdr, | |
unsigned int | tag | |||
) | [static] |
Compresses the fixed length information an error event.
hdr | The information to be added to the header | |
tag | The event tag |
static unsigned int cdf_err_tem_compress_bug_a | ( | CDF_errTem * | tem, | |
unsigned int * | buf, | |||
unsigned int | pos, | |||
unsigned int | tag | |||
) | [static] |
Compresses the TEM BUG A error records.
tem | The unpacked TEM error record | |
buf | The output buffer | |
pos | The position of the next bit to fill | |
tag | The event tag |
static unsigned int cdf_err_tem_compress_bug_b | ( | CDF_errTem * | tem, | |
unsigned int * | buf, | |||
unsigned int | pos, | |||
unsigned int | tag | |||
) | [static] |
Compresses the TEM BUG B error records.
tem | The unpacked error record | |
buf | The output buffer | |
pos | The position of the next bit to fill | |
tag | The event tag |
static unsigned int cdf_err_tem_compress_copy | ( | CDF_errTem * | tem, | |
unsigned int * | buf, | |||
unsigned int | pos, | |||
unsigned int | tag | |||
) | [static] |
Compresses all other (not TEM BUG A or B) error records.
tem | The unpacked error record | |
buf | The output buffer | |
pos | The position of the next bit to fill | |
tag | The event tag |
int CDF_errCfg_construct | ( | CDF_errCfg * | cfg, | |
int | level, | |||
void ** | mem | |||
) |
Constructs the CDF_erfCfg compression configuration.
Status |
cfg | Target specific configuration | |
level | The maximum compression level that needs to be supported | |
mem | Pointer to free memory pointer, return as the the updated pointer. If cfg is equal to the current contents of mem, then mem will be advanced by the size of CDF_errCfg else this routine will believe that the only the variable allocation of cdf needs to be allocated. |
int CDF_errCfg_sizeof | ( | int | level | ) |
Returns the size, in bytes of the GEM compression configuration needed to support the specified level.
level | The maximum compression level to support |