GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSE / V2-4-0 > qse / rhel6-64


Interface   Data Structures   File List   Data Fields   Globals  

QDF_esb.h File Reference

Interface to the ESB (Event Summary Block) decoding routines. More...

#include <LDT/BFU.h>
#include <EDS/EBF_ebw.h>
#include <EDS/EBF_esw.h>
#include <EDS/EBF_ctb.h>

Typedefs

typedef struct _QDF_esbEvt QDF_esbEvt
typedef struct _QDF_esbCtx QDF_esbCtx
typedef struct _QDF_exc QDF_exc
typedef struct _QSE_ctx QSE_ctx

Functions

int QDF_esbCtxSizeof (unsigned int level, void *prm)
 Returns the size, in bytes of the Event Summary Block decoding context needed to support the specified compression level.
QDF_esbCtxQDF_esbCtxConstruct (QDF_esbCtx *ctx, unsigned int level, void *prm, const QSE_ctx *qse)
 Constructs (initializes) the specified Event Summary Block decoding context structure.
int QDF_esbEvtSizeof (unsigned int level, void *prm)
 Returns the size, in bytes of QDF Event Summary Block needed to support the specified compression level.
QDF_esbEvtQDF_esbEvtConstruct (QDF_esbEvt *evt, unsigned int level, void *prm, QDF_exc *exc)
 Constructs (initializes) the specified Event Summary Block event structure.
BFU QDF_esbDecode (QDF_esbCtx *ctx, QDF_esbEvt *evt, const unsigned int *src, unsigned int max, BFU bfu)
 Decodes the Event Summary Block.
EBF_ebw QDF_esbEvtEbwGet (const QDF_esbEvt *evt, int cid)
 Returns the event builder word for the specified contributor id.
EBF_esw QDF_esbEvtEswGet (const QDF_esbEvt *evt, int cid)
 Returns the event summary word for the specified contributor id.
EBF_ctbHdr QDF_esbEvtCtbHdrGet (const QDF_esbEvt *evt, int cid)
 Returns the contributor header for the specified contributor id.
unsigned int QDF_esbEvtCtidsGet (const QDF_esbEvt *evt)
unsigned int QDF_esbEvtCidsGet (const QDF_esbEvt *evt)
 Returns a mask of the contributor that are present.
unsigned int QDF_esbEvtDgnidsGet (const QDF_esbEvt *evt)
 Returns the left-justified bit mask of TEMs with a diagnostic contribution.
unsigned int QDF_esbEvtErridsGet (const QDF_esbEvt *evt)
 Returns the left-justified bit mask of TEMs with an error contribution.
unsigned int QDF_esbEvtSeqGet (const QDF_esbEvt *evt)
 Returns the event sequence number.


Detailed Description

Interface to the ESB (Event Summary Block) decoding routines.

Author:
JJRussell - russell@slac.stanford.edu

   CVS $Id: QDF_esb.h,v 1.4 2011/03/27 01:45:43 russell Exp $

Function Documentation

QDF_esbCtx * QDF_esbCtxConstruct ( QDF_esbCtx ctx,
unsigned int  level,
void *  prm,
const QSE_ctx qse 
)

Constructs (initializes) the specified Event Summary Block 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 Pointer to the public/generic QSE context parameter

References _QDF_esbCtx::qse.

int QDF_esbCtxSizeof ( unsigned int  level,
void *  prm 
)

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

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

BFU QDF_esbDecode ( QDF_esbCtx qdf,
QDF_esbEvt esb,
const unsigned int *  src,
unsigned int  max,
BFU  bfu 
)

Decodes the Event Summary Block.

Returns:
The updated bit position and current deblocked 32-bit buffer
Parameters:
qdf The compressed data decoding context
esb The event summary block to fill in
src The data source, i.e. the bit stream
max The maximum bit position
bfu The current bit position and temporary buffer

References _QDF_esbEvt::abs_ids, _QDF_esw::bf, _QDF_esbEvt::dgn_ids, _QDF_esbEvt::ebf_esw, _QDF_esbEvt::err_ids, _QDF_esbEvt::esw, _QDF_esbEvt::latp_dst, QDF_ESW_S_CXB, QDF_ESW_S_GSB, QDF_ESW_S_LATP_DST, QDF_ESW_S_SEQUENCE, QDF_ESW_V_CXB, _QDF_esbEvt::rsp_ids, and _QDF_esw::ui.

unsigned int QDF_esbEvtCidsGet ( const QDF_esbEvt evt  ) 

Returns a mask of the contributor that are present.

Returns:
The mask of contributors that are present
Parameters:
evt The target ESB event structure.
Even if the contributor has no data, the presence of a contributor means an empty contribution should be emitted into the data stream.

References _QDF_esbEvt::abs_ids.

Referenced by temRepack().

QDF_esbCtx * QDF_esbEvtConstruct ( QDF_esbEvt evt,
unsigned int  level,
void *  prm,
QDF_exc exc 
)

Constructs (initializes) the specified Event Summary Block event structure.

Returns:
Pointer to the ESB event structure to construct
Parameters:
evt The ESB 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

References _QDF_esbEvt::exc.

EBF_ctbHdr QDF_esbEvtCtbHdrGet ( const QDF_esbEvt evt,
int  cid 
)

Returns the contributor header for the specified contributor id.

Returns:
The contributor header. Notice that this is returned by value.
Parameters:
evt The target ESB event structure.
cid The contributor ID

References QDF_esbEvtEbwGet(), and QDF_esbEvtEswGet().

Referenced by QDF_esbRepack(), and QDF_gemRepack().

unsigned int QDF_esbEvtDgnidsGet ( const QDF_esbEvt evt  ) 

Returns the left-justified bit mask of TEMs with a diagnostic contribution.

Returns:
The left-justified bit mask of TEMs with a diagnostic contribution.
Parameters:
evt The target ESB event structure.

References _QDF_esbEvt::dgn_ids.

Referenced by temRepack().

EBF_ebw QDF_esbEvtEbwGet ( const QDF_esbEvt evt,
int  cid 
)

Returns the event builder word for the specified contributor id.

Returns:
Pointer to the ESB event
Parameters:
evt The target ESB event structure.
cid The contributor ID
Note:
The length field of this word cannot be filled in by this utility, since the length is not known until the target contributor is decoded.
The response field of this word cannot be filled in by this utility since it dos not know which contributors are present. Because the response word cannot be filled in, the parity of the LATp portion of this word cannot be computed.
The packet sequence is no longer available. This is property of the physical transport and has been thrown away as being uninteresting. The error field, must be 0 when using this format.

References _QDF_esbEvt::latp_dst, parityOdd16Calc(), and _QDF_esbEvt::rsp_ids.

Referenced by QDF_esbEvtCtbHdrGet().

unsigned int QDF_esbEvtErridsGet ( const QDF_esbEvt evt  ) 

Returns the left-justified bit mask of TEMs with an error contribution.

Returns:
The left-justified bit mask of TEMs with a error contribution.
Parameters:
evt The target ESB event structure.

References _QDF_esbEvt::err_ids.

Referenced by temRepack().

EBF_esw QDF_esbEvtEswGet ( const QDF_esbEvt evt,
int  cid 
)

Returns the event summary word for the specified contributor id.

Returns:
Pointer to the ESB event
Parameters:
evt The target ESB event structure.
cid The contributor ID

References _QDF_esbEvt::dgn_ids, _QDF_esbEvt::ebf_esw, and _QDF_esbEvt::err_ids.

Referenced by QDF_esbEvtCtbHdrGet().

unsigned int QDF_esbEvtSeqGet ( const QDF_esbEvt evt  ) 

Returns the event sequence number.

Returns:
Pointer to the ESB event
Parameters:
evt The target ESB event structure.

References _QDF_esw::bf, and _QDF_esbEvt::esw.

int QDF_esbEvtSizeof ( unsigned int  level,
void *  prm 
)

Returns the size, in bytes of QDF Event Summary Block needed to support the specified compression level.

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


Generated on Thu Sep 27 16:44:51 2012 by  doxygen 1.5.8