GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EDS / V2-12-1 > ebfio / sun-gcc
#include <EDS/EBF_ebw.h>
#include <EDS/EBF_ctb.h>
Classes | |
struct | _EBF_dirCtbDsc |
A data structure describing a contributors data. More... | |
struct | _EBF_dirAuxDsc |
A data structure describing a TEMs auxillary blocks, i.e. the diagnostic and error blocks. More... | |
struct | _EBF_dirPktDsc |
Describes one packet from the sequence of packets that comprises the event. More... | |
struct | _EBF_dirCtbRestart |
Contributor restart context. More... | |
struct | _EBF_dirTruncated |
Collections information about truncated packets/events. This is used to reassemble the contributor. More... | |
struct | _EBF_dirExpected |
Captures, by value, the expected values of many of the fields in the contributor header words used when checking an event for integrity. More... | |
struct | _EBF_dirRedux |
Encapsulates information gleaned from the event's EDW and each contributor's EBWand ESW. More... | |
struct | _EBF_dir |
A data structure describing all contributors data within an event. More... | |
Defines | |
#define | EBF_DIR_K_PKTS_MAX 32 |
Sets the upper limit on the number of truncated packets allowed per complete event. | |
#define | EBF_DIR_TEMS_CAL(_ctids) ((_ctids) & 0xffff0000) |
Extracts the left justified bit mask giving the TEMs with CAL data. | |
#define | EBF_DIR_TEMS_TKR(_ctids) ((_ctids) << 16) |
Extracts the left justified bit mask giving the TEMs with TKR data. | |
Typedefs | |
typedef enum _EBF_DIR_STATUS_V | EBF_DIR_STATUS_V |
Typedef for enum _EBF_DIR_STATUS_V. | |
typedef enum _EBF_DIR_STATUS_M | EBF_DIR_STATUS_M |
Typedef for enum _EBF_DIR_STATUS_M. | |
typedef struct _EBF_dirCtbDsc | EBF_dirCtbDsc |
Typedef for struct _EBF_dirCtbDsc. | |
typedef struct _EBF_dirAuxDsc | EBF_dirAuxDsc |
Typedef for struct _EBF_dirAuxDsc. | |
typedef struct _EBF_dirPktDsc | EBF_dirPktDsc |
Typedef for EBF_dirPktDsc. | |
typedef struct _EBF_dirCtbRestart | EBF_dirCtbRestart |
Typedef for struct _EBF_dirCtbRestart. | |
typedef struct _EBF_dirTruncated | EBF_dirTruncated |
Typedef for struct _EBF_dirTruncated. | |
typedef struct _EBF_dirExpected | EBF_dirExpected |
Typedef for struct _EBF_dirExpected. | |
typedef struct _EBF_dirRedux | EBF_dirRedux |
Typedef for struct _EBF_dirRedux. | |
typedef struct _EBF_dir | EBF_dir |
Typedef for struct _EBF_directory. | |
typedef unsigned int(* | EBF_dirAuxDscFillRtn )(void *ctx, EBF_dirAuxDsc *aux, const EBF_dirCtbDsc *ctb) |
Callback routine to fill the EBF_dirAuxFill for the specified contribution. | |
Enumerations | |
enum | _EBF_DIR_STATUS_V { EBF_DIR_STATUS_SF_V_SUMMARY = 31, EBF_DIR_STATUS_SF_V_UNDERRUN = 30, EBF_DIR_STATUS_SF_V_OVERRUN = 29, EBF_DIR_STATUS_SF_V_CTB_BADLEN = 28, EBF_DIR_STATUS_SF_V_CTB_MISSING = 27, EBF_DIR_STATUS_SF_V_SIV = 26, EBF_DIR_STATUS_SF_V_ESW_MISMATCH = 25, EBF_DIR_STATUS_SF_V_EBW_MISMATCH = 24, EBF_DIR_STATUS_SE_V_PKTS_MAX = 19, EBF_DIR_STATUS_SE_V_SIV = 18, EBF_DIR_STATUS_SE_V_ESW_MISMATCH = 17, EBF_DIR_STATUS_SE_V_EBW_MISMATCH = 16, EBF_DIR_STATUS_SW_V_SIV = 10, EBF_DIR_STATUS_SW_V_ESW_MISMATCH = 9, EBF_DIR_STATUS_SW_V_EBW_MISMATCH = 8, EBF_DIR_STATUS_SI_V_SIV = 2, EBF_DIR_STATUS_SI_V_ESW_MISMATCH = 1, EBF_DIR_STATUS_SI_V_EBW_MISMATCH = 0 } |
Defines the error summary bits as right-justified shifts. More... | |
enum | _EBF_DIR_STATUS_M { EBF_DIR_STATUS_SF_M_SUMMARY = 1 << EBF_DIR_STATUS_SF_V_SUMMARY, EBF_DIR_STATUS_SF_M_UNDERRUN = 1 << EBF_DIR_STATUS_SF_V_UNDERRUN, EBF_DIR_STATUS_SF_M_OVERRUN = 1 << EBF_DIR_STATUS_SF_V_OVERRUN, EBF_DIR_STATUS_SF_M_CTB_BADLEN = 1 << EBF_DIR_STATUS_SF_V_CTB_BADLEN, EBF_DIR_STATUS_SF_M_CTB_MISSING = 1 << EBF_DIR_STATUS_SF_V_CTB_MISSING, EBF_DIR_STATUS_SF_M_SIV = 1 << EBF_DIR_STATUS_SF_V_SIV, EBF_DIR_STATUS_SF_M_ESW_MISMATCH = 1 << EBF_DIR_STATUS_SF_V_ESW_MISMATCH, EBF_DIR_STATUS_SF_M_EBW_MISMATCH = 1 << EBF_DIR_STATUS_SF_V_EBW_MISMATCH, EBF_DIR_STATUS_SF_M_ANY = 0xff << 24, EBF_DIR_STATUS_SE_M_PKTS_MAX = 1 << EBF_DIR_STATUS_SE_V_PKTS_MAX, EBF_DIR_STATUS_SE_M_SIV = 1 << EBF_DIR_STATUS_SE_V_SIV, EBF_DIR_STATUS_SE_M_ESW_MISMATCH = 1 << EBF_DIR_STATUS_SE_V_ESW_MISMATCH, EBF_DIR_STATUS_SE_M_EBW_MISMATCH = 1 << EBF_DIR_STATUS_SE_V_EBW_MISMATCH, EBF_DIR_STATUS_SE_M_ANY = 0xff << 16, EBF_DIR_STATUS_SW_M_SIV = 1 << EBF_DIR_STATUS_SW_V_SIV, EBF_DIR_STATUS_SW_M_ESW_MISMATCH = 1 << EBF_DIR_STATUS_SW_V_ESW_MISMATCH, EBF_DIR_STATUS_SW_M_EBW_MISMATCH = 1 << EBF_DIR_STATUS_SW_V_EBW_MISMATCH, EBF_DIR_STATUS_SW_M_ANY = 0xff << 8, EBF_DIR_STATUS_SI_M_SIV = 1 << EBF_DIR_STATUS_SI_V_SIV, EBF_DIR_STATUS_SI_M_ESW_MISMATCH = 1 << EBF_DIR_STATUS_SI_V_ESW_MISMATCH, EBF_DIR_STATUS_SI_M_EBW_MISMATCH = 1 << EBF_DIR_STATUS_SI_V_EBW_MISMATCH, EBF_DIR_STATUS_SI_M_ANY = 0xff } |
Defines the error summary bits as in-place masks. More... | |
Functions | |
int | EBF_dirCompose (EBF_dir *dir, unsigned int pktBytes, EBF_pkt *pkt, int siv) |
int | EBF_dirInit (EBF_dir *dir) |
void | EBF_dirReset (EBF_dir *dir) |
int | EBF_dirSizeof (void) |
int | EBF_dirReassemble (EBF_dir *dir, unsigned int cids) |
int | EBF_dirCalTkrReassemble (EBF_dir *dir, unsigned int ctids) |
const EBF_err * | EBF_errLocate (const EBF_ctb *ctb, int *nerr) |
int | EBF_errTkrCheck (const EBF_err *err, int max, unsigned int mask) |
unsigned int | EBF_dirTkrErrEvaluate (EBF_dir *dir, unsigned int err_ids, int abort) |
unsigned int | EBF_dirAuxFill (EBF_dir *dir, unsigned int cids, EBF_dirAuxDscFillRtn fill_rtn, void *fill_ctx) |
static __inline void | EBF__dirReset (EBF_dir *dir) |
Resets the specified EBF_dir structure, thus preparing it for the next event. | |
static __inline int | EBF__dirCtbLen (const EBF_dirCtbDsc *ctbDsc) |
Returns the length, in bytes, of contributor associated with the specified contributor descriptor. | |
static __inline EBF_cal * | EBF__dirCtbCalLocate (const EBF_dirCtbDsc *ctbDsc) |
Returns a pointer to the CAL contribution. | |
static __inline unsigned int | EBF__dirCtbCalSize (const EBF_dirCtbDsc *ctbDsc) |
Returns the size, in bytes, of the CAL contribution. | |
static __inline EBF_tkr * | EBF__dirCtbTkrLocate (const EBF_dirCtbDsc *ctbDsc) |
Returns a pointer to the TKR contribution. | |
static __inline void | EBF__dirAuxTkrLenSet (EBF_dir *dir, int temNum, int tkrLen) |
Convenience function to set the length of the TKR block in the auxillary descriptor. | |
static __inline void | EBF__dirAuxErrLenSet (EBF_dir *dir, int temNum, int errLen) |
Convenience function to set the length of the error block in the auxillary descriptor. | |
static __inline void | EBF__dirAuxDscSet (EBF_dir *dir, int temNum, int tkrLen, int auxLen) |
Convenience function to set the fields in the auxillary descriptor. |
CVS $Id: EBF_dir.h,v 1.12 2012/09/12 23:34:51 russell Exp $
#define EBF_DIR_K_PKTS_MAX 32 |
Sets the upper limit on the number of truncated packets allowed per complete event.
#define EBF_DIR_TEMS_CAL | ( | _ctids | ) | ((_ctids) & 0xffff0000) |
Extracts the left justified bit mask giving the TEMs with CAL data.
_ctids | The CAL/TKRs id mask |
#define EBF_DIR_TEMS_TKR | ( | _ctids | ) | ((_ctids) << 16) |
Extracts the left justified bit mask giving the TEMs with TKR data.
_ctids | The CAL/TKRs id mask |
Typedef for struct _EBF_dirAuxDsc.
unsigned int(* EBF_dirAuxDscFillRtn)(void *ctx, EBF_dirAuxDsc *dsc, const EBF_dirCtbDsc *ctb) |
Callback routine to fill the EBF_dirAuxFill for the specified contribution.
ctx | A context parameter | |
aux | The auxilliary descriptor to fill | |
ctb | The contributor descriptor |
Typedef for struct _EBF_dirCtbDsc.
Typedef for struct _EBF_dirCtbRestart.
Typedef for EBF_dirPktDsc.
Typedef for struct _EBF_dirRedux.
Typedef for struct _EBF_dirTruncated.
enum _EBF_DIR_STATUS_M |
Defines the error summary bits as in-place masks.
enum _EBF_DIR_STATUS_V |
Defines the error summary bits as right-justified shifts.
static __inline void EBF__dirAuxDscSet | ( | EBF_dir * | dir, | |
int | temNum, | |||
int | tkrLen, | |||
int | errLen | |||
) | [static] |
Convenience function to set the fields in the auxillary descriptor.
dir | The EBF directory structure | |
temNum | The target TEM | |
tkrLen | The length, in bytes, of the TKR block | |
errLen | The length, in bytes, of the error block |
References _EBF_dir::auxs, _EBF_dirAuxDsc::errLen, and _EBF_dirAuxDsc::tkrLen.
static __inline void EBF__dirAuxErrLenSet | ( | EBF_dir * | dir, | |
int | temNum, | |||
int | errLen | |||
) | [static] |
Convenience function to set the length of the error block in the auxillary descriptor.
dir | The EBF directory structure | |
temNum | The target TEM | |
errLen | The length, in bytes, of the error block |
References _EBF_dir::auxs, and _EBF_dirAuxDsc::errLen.
static __inline void EBF__dirAuxTkrLenSet | ( | EBF_dir * | dir, | |
int | temNum, | |||
int | tkrLen | |||
) | [static] |
Convenience function to set the length of the TKR block in the auxillary descriptor.
dir | The EBF directory structure | |
temNum | The target TEM | |
tkrLen | The length, in bytes, of the TKR block |
References _EBF_dir::auxs, and _EBF_dirAuxDsc::tkrLen.
static __inline EBF_cal * EBF__dirCtbCalLocate | ( | const EBF_dirCtbDsc * | ctbDsc | ) | [static] |
Returns a pointer to the CAL contribution.
ctbDsc | The TEM's contributor descriptor. |
References _EBF_dirCtbDsc::ctb, and _EBF_ctb::dat.
static __inline unsigned int EBF__dirCtbCalSize | ( | const EBF_dirCtbDsc * | ctbDsc | ) | [static] |
Returns the size, in bytes, of the CAL contribution.
ctbDsc | The TEM's contributor descriptor. |
References _EBF_dirCtbDsc::tkroff.
static __inline int EBF__dirCtbLen | ( | const EBF_dirCtbDsc * | ctbDsc | ) | [static] |
Returns the length, in bytes, of contributor associated with the specified contributor descriptor.
ctbDsc | The contributor's descriptor. |
References _EBF_ebw::bf, _EBF_dirCtbDsc::ctb, EBF_EBW_LEN_TO_BYTES, _EBF_ctbHdr::ebw, and _EBF_ctb::hdr.
static __inline EBF_tkr * EBF__dirCtbTkrLocate | ( | const EBF_dirCtbDsc * | ctbDsc | ) | [static] |
Returns a pointer to the TKR contribution.
ctbDsc | The TEM's contributor descriptor. |
References _EBF_dirCtbDsc::ctb, and _EBF_dirCtbDsc::tkroff.
static __inline void EBF__dirReset | ( | EBF_dir * | dir | ) | [static] |
Resets the specified EBF_dir structure, thus preparing it for the next event.
dir | The directory structure |
References _EBF_dir::pkt.