GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > EDS / V2-10-0
Constituent: eds     Tag: mv2304
#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 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) |
Composes the directory of the contributor descriptors. | |
int | EBF_dirInit (EBF_dir *dir) |
One-time intialization function for the specified EBF_dir structure. | |
void | EBF_dirReset (EBF_dir *dir) |
Resets the specified EBF_dir structure, thus preparing it for the next event. | |
int | EBF_dirSizeof (void) |
Returns the size, in bytes, of an EBF_dir structure. | |
int | EBF_dirReassemble (EBF_dir *dir, unsigned int cids) |
Reassembles (that is, makes contigious) the specified contributors. | |
int | EBF_dirCalTkrReassemble (EBF_dir *dir, unsigned int ctids) |
Reassembles (that is, makes contigious) the specified CAL and TKR contributors. | |
unsigned int | EBF_dirAuxFill (EBF_dir *dir, unsigned int cids, EBF_dirAuxDscFillRtn fill_rtn, void *fill_ctx) |
Fills the auxillary descriptor with the specified list of TEM TKR lengths and ERR lengths. | |
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.10 2009/06/19 16:43:05 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 |
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 |
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 |
static __inline EBF_cal * EBF__dirCtbCalLocate | ( | const EBF_dirCtbDsc * | ctbDsc | ) | [static] |
Returns a pointer to the CAL contribution.
ctbDsc | The TEM's contributor descriptor. |
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. |
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. |
static __inline EBF_tkr * EBF__dirCtbTkrLocate | ( | const EBF_dirCtbDsc * | ctbDsc | ) | [static] |
Returns a pointer to the TKR contribution.
ctbDsc | The TEM's contributor descriptor. |
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 |
unsigned int EBF_dirAuxFill | ( | EBF_dir * | dir, | |
unsigned int | cids, | |||
EBF_dirAuxDscFillRtn | fill_rtn, | |||
void * | fill_ctx | |||
) |
Fills the auxillary descriptor with the specified list of TEM TKR lengths and ERR lengths.
dir | The EBF directory | |
cids | The list of TKR and ERR lengths to fill. This is really two 16 bit lists, with the
| |
fill_rtn | An optional user provided fill routine. Since the calculation of these lengths is potentially computationally expensive, if the user has apriori knowledge of these values, this allows the user to avoid a recomputation. If this routine is not provided, the lengths will be computed using EBF_tkrLenCalc and EBF_errLenCalc. See EBF_dirAuxTemFillRtn for the exact calling sequence. | |
fill_ctx | An arbitrary context parameter provided to fill_rtn |
int EBF_dirCalTkrReassemble | ( | EBF_dir * | dir, | |
unsigned int | ctids | |||
) |
Reassembles (that is, makes contigious) the specified CAL and TKR contributors.
dir | The directory structure | |
ctids | Bit map of the CAL/TKR contributors to reassemble, (MSB = CAL contributor 0). |
Composes the directory of the contributor descriptors.
dir | An array of directories to be filled in | |
pktBytes | The size of the packet, in bytes. This includes the 8-word packet header | |
pkt | The source event packet | |
siv | The state information vector. This is from EBF_sivUpdate and is used for dealing with truncated packets. |
int EBF_dirInit | ( | EBF_dir * | dir | ) |
One-time intialization function for the specified EBF_dir structure.
dir | The directory structure |
int EBF_dirReassemble | ( | EBF_dir * | dir, | |
unsigned int | cids | |||
) |
Reassembles (that is, makes contigious) the specified contributors.
dir | The directory structure | |
cids | Bit map of the contributors to reassemble, (MSB = contributor 0). |
void EBF_dirReset | ( | EBF_dir * | dir | ) |
Resets the specified EBF_dir structure, thus preparing it for the next event.
dir | The directory structure |
int EBF_dirSizeof | ( | void | ) |
Returns the size, in bytes, of an EBF_dir structure.