GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > QSEP / V3-3-0

Constituent: qsep     Tag: sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

QSEP_evt0.c File Reference

Driver routines to decode Format 0 events. More...

#include "SIV.h"
#include "QSEP/QSEP_evt0.h"
#include "QSEP_pvtdef.h"
#include "QDFP_evt.h"
#include "QSE/QSE_evt.h"
#include "QSE/QSE_ctxUpdate.h"
#include "QSE/QDF_exc.h"
#include "LSEP/LSEP_evtCtb0.h"
#include "EDS/EBF_cid.h"
#include "EDS/EBF_pkt.h"
#include "EDS/EBF_ctb.h"
#include "EDS/EBF_evt.h"
#include "EDS/EBF_edw.h"
#include "EDS/EBF_cal.h"
#include "EDS/EBF_gem.h"
#include "EDS/EBF_gemLocate.h"
#include "EDS/EDS_endianness.h"
#include "EDS/FFS.h"
#include "PBI/Fletcher.h"
#include "PBI/Unions.h"
#include <stddef.h>
#include <string.h>
#include <stdio.h>
#include "dprintf.h"

Include dependency graph for QSEP_evt0.c:


Classes

struct  _Rsb
 Return Status Block, binds a status and length. More...

Defines

#define PARITY_K_ODD   0x9669
 A vector of bits whose bit number (counting from least significant bit = 0) gives the odd parity of a nibble of that bit number.
#define GEM_CTB_SIZE   (sizeof (EBF_ctbHdr) + sizeof (EBF_gem))
 Convenience symbol for the size of a GEM contribution plus the Event Builder and Event Summary Words.
#define RND_LEN32_TO_CELL(_n32)   (((_n32) + 3) & ~0x3)
 Round a length, in 32-bit ints, to a 16 byte cell.
#define _extractL(_bfu, _wrds, _position, _width)
#define _extractR(_bfu, _wrds, _position, _width)
#define KNOWN
 Defines a bit mask of the known.
#define ADVANCE(_ptr, _nbytes)   (void *)((unsigned char *)(_ptr) + (_nbytes))
 Advances the specified pointer, _ptr by _nbytes.

Typedefs

typedef struct _Rsb Rsb
 Typedef for struct _Rsb.
typedef int(* QSEP_evt_updater )(QSEP_dtx *dtx, const unsigned int *edata, size_t nbytes, int bridge, QSE_ctxUpdateInfo *info)
 Call back signature for an event decoding routine.
typedef int(* QSEP_evt_decoder )(QSEP_dtx *dtx, const unsigned int *edata, size_t nbytes, int bridge, QSE_ebfEvt *ebf, int ebf_size, unsigned int *ret_size)
 Call back signature for an event decoding routine.

Functions

static __inline
unsigned int 
checksum_compute (const unsigned int *data, int ndata)
 Compute the Fletcher checksum on the data array.
static __inline
unsigned int 
checksum_check (QSEP_dtxChecksum *checksum, unsigned int *data, int ndata)
 Computes the checksum over the indicated data and compares it with the checksum in the checksum context structure.
static __inline int parityOdd16Calc (unsigned short int hword)
 Calculates the odd parity over the 16 bits in the specified half word.
static int evt0_0_decode (QSEP_dtx *dtx, const unsigned int *edata, size_t nbytes, int bridge, QSE_ebfEvt *ebf, int ebf_size, unsigned int *ret_size)
 Decodes Version 0, Format 0 events.
static int evt0_1_decode (QSEP_dtx *dtx, const unsigned int *edata, size_t nbytes, int bridge, QSE_ebfEvt *ebf, int ebf_size, unsigned int *ret_size)
 Decodes Version 0, Format 1 events.
static int evt0_2_decode (QSEP_dtx *dtx, const unsigned int *edata, size_t nbytes, int bridge, QSE_ebfEvt *ebf, int ebf_size, unsigned int *ret_size)
 Decodes Version 0, Format 2 events.
static int evt0_3_decode (QSEP_dtx *dtx, const unsigned int *edata, size_t nbytes, int bridge, QSE_ebfEvt *ebf, int ebf_size, unsigned int *ret_size)
 Decodes Version 0, Format 3 events.
static int evt0_4_decode (QSEP_dtx *dtx, const unsigned int *edata, size_t nbytes, int bridge, QSE_ebfEvt *ebf, int ebf_size, unsigned int *ret_size)
 Decodes Version 0, Format 4 events.
static int evt0_5_decode (QSEP_dtx *dtx, const unsigned int *edata, size_t nbytes, int bridge, QSE_ebfEvt *ebf, int ebf_size, unsigned int *ret_size)
 Decodes Version 0, Format 5 events.
static int evt0_8_decode (QSEP_dtx *dtx, const unsigned int *edata, size_t nbytes, int bridge, QSE_ebfEvt *ebf, int ebf_size, unsigned int *ret_size)
 Decodes Version 0, Format 8 events.
static int evt0_decode_noop (QSEP_dtx *dtx, const unsigned int *edata, size_t nbytes, int bridge, QSE_ebfEvt *ebf, int ebf_size, unsigned int *ret_size)
 Punts on unknown Version 0, formats.
static int evt0_0_update (QSEP_dtx *dtx, const unsigned int *edata, size_t nbytes, int bridge, QSE_ctxUpdateInfo *info)
 Provides update information Version 0, Format 0 events.
static int evt0_1_update (QSEP_dtx *dtx, const unsigned int *edata, size_t nbytes, int bridge, QSE_ctxUpdateInfo *info)
 Provides update information Version 0, Format 1 events.
static int evt0_2_update (QSEP_dtx *dtx, const unsigned int *edata, size_t nbytes, int bridge, QSE_ctxUpdateInfo *info)
 Provides update information Version 0, Format 2 events.
static int evt0_3_update (QSEP_dtx *dtx, const unsigned int *edata, size_t nbytes, int bridge, QSE_ctxUpdateInfo *info)
 Provides update information Version 0, Format 3 events.
static int evt0_4_update (QSEP_dtx *dtx, const unsigned int *edata, size_t nbytes, int bridge, QSE_ctxUpdateInfo *info)
 Provides update information Version 0, Format 4 events.
static int evt0_5_update (QSEP_dtx *dtx, const unsigned int *edata, size_t nbytes, int bridge, QSE_ctxUpdateInfo *info)
static int evt0_8_update (QSEP_dtx *dtx, const unsigned int *edata, size_t nbytes, int bridge, QSE_ctxUpdateInfo *info)
static int evt0_update_noop (QSEP_dtx *dtx, const unsigned int *edata, size_t nbytes, int bridge, QSE_ctxUpdateInfo *info)
 Punts on unknown Version 0 formats.
static __inline void * copy (void *dst, const void *src, size_t nbytes)
 Copies the specified number of bytes from the source to the destination.
static __inline
unsigned int 
pad_to_cell (unsigned int *dst, unsigned int nbytes)
 Pads the destination address up to the next cell (16-byte) boundary. The number of pad bytes is computed by how short nbytes is from a 16-byte boundary. It is assumed that nbytes is a multiple of 4.
static __inline
unsigned int 
esw_reconstruct0_4 (LSEP_evtToc0_4_ctl ctl, unsigned int no_tack)
 Reconstruct the Event Summary Word from a version 0, format 4 control word.
static __inline
unsigned int 
ebw_reconstruct (const QSEP_dtx *dtx, unsigned int dstu)
 Reconstruct the Event Builder Word.
static int is_known (unsigned char level)
 Tests if the format/compression level is known.
static __inline int update_check (int rsd_bytes, int gem_bytes, unsigned char bridge, int nbytes)
 Checks if there is enough input data to accomodate both a possible result summary data block and a GEM contribution.
static __inline
const unsigned int * 
checksum_fill (QSEP_dtxChecksum *checksum, const unsigned int *cur, int bridge)
 Fills the checksum structure.
static const void * rsd_fill (QSEP_ctxRsd *rsd, unsigned char bridge, const unsigned int *src)
 Copies the result summary data into the memory pointed to by the valid descriptors.
int QSEP_evt0_update (QSEP_dtx *dtx, const LSF_record *ievt, QSE_ctxUpdateInfo *info)
 Dispatches the input event to the proper update handler.
int QSEP_evt0_decode (QSEP_dtx *dtx, const LSF_record *ievt, QSE_ebfEvt *ebf, int ebf_size, unsigned int *ret_size)
 Dispatches the input event to the proper handler.
static __inline
unsigned int * 
header_add (unsigned int *dst)
 Adds the padding for the 8-word LCB header.
static __inline
unsigned char * 
pad (unsigned char *dst, int lwrd_cnt)
 Zeroes the specified number of longwords.
static unsigned int decode0_4_5 (QSEP_dtx *dtx, const unsigned int *src, LSEP_evtToc0_4_ctl ctl, unsigned int dstu, unsigned int no_tack, const LSEP_evtToc0_4_tem tems[16], QSE_ebfEvt *ebf)
 Workhorse routine to decode version 0, format 4 and 5 events.
static __inline Rsb toc5_fill (LSEP_evtToc0_4_tem tems[16], const LSEP_evtBdy0_5 *evt5, int bridge, const unsigned int *src_end, int dst_bytes)
 Fills a format 4 style table of contents from a format 5 style.

Variables

static const
QSEP_evt_decoder 
Decode [16]
 The dispatch table for the 16 format of level 0 encoded events.
static const
QSEP_evt_updater 
Update [16]
 The dispatch table for the 16 format of level 0 encoded events.

Detailed Description

Driver routines to decode Format 0 events.

Author:
JJRussell - russell@slac.stanford.edu

   CVS $Id: QSEP_evt0.c,v 1.22 2009/06/19 17:26:59 russell Exp $

Define Documentation

#define _extractL ( _bfu,
_wrds,
_position,
_width   ) 

Value:

(_bfu       = BFU_wordL (_wrds, _bfu.cur, _position, _width),\
                  _position += _width,                                        \
                  _bfu.val)

#define _extractR ( _bfu,
_wrds,
_position,
_width   ) 

Value:

(_bfu       = BFU_wordR (_wrds, _bfu.cur, _position, _width),\
                  _position += _width,                                        \
                  _bfu.val)

#define ADVANCE ( _ptr,
_nbytes   )     (void *)((unsigned char *)(_ptr) + (_nbytes))

Advances the specified pointer, _ptr by _nbytes.

Parameters:
_ptr The pointer to advance
_nbytes The number of bytes to advance the pointer

#define KNOWN

Value:

((1 << 0) |  \
                   (1 << 1) |  \
                   (1 << 2) |  \
                   (1 << 3) |  \
                   (1 << 4) |  \
                   (1 << 5) |  \
                   (0 << 6) |  \
                   (0 << 7) |  \
                   (1 << 8))
Defines a bit mask of the known.

#define PARITY_K_ODD   0x9669

A vector of bits whose bit number (counting from least significant bit = 0) gives the odd parity of a nibble of that bit number.

This is a bit vector whose bit number gives the odd parity of that bit number, The array is indexed by left shifting by the bit number. This array is used to return a 0 if the parity is ODD and a 1 if the parity is EVEN.
The following table maps a number idx into an even parity. The bottom line is the hex number representing the parity bit array.

       Idx  Parity    Index  Parity   Index Parity    Index Parity
         C       1        8       0       4      0        0      1
         D       0        9       1       5      1        1      0
         E       0        A       1       6      1        2      0
         F       1        B       0       7      0        3      1
      0x         9                6              6               9
  

#define RND_LEN32_TO_CELL ( _n32   )     (((_n32) + 3) & ~0x3)

Round a length, in 32-bit ints, to a 16 byte cell.

Returns:
The rounded length
Parameters:
_n32 The 32-bit length to round


Typedef Documentation

int(* QSEP_evt_decoder)(QSEP_dtx *dtx, const unsigned int *edata, size_t nbytes, int bridge, QSE_ebfEvt *ebf, int ebf_size, unsigned int *ret_size)

Call back signature for an event decoding routine.

Returns:
Status
Parameters:
dtx Decoding context
evt The event data to decode
nbytes The number of bytes in the event
bridge The bridge word. This contains up to 8 bits of format specific decoding information.
ebf The output event structure to fill
ebf_size The number of bytes available in ebf
ret_size The number of bytes actually used in ebf.

int(* QSEP_evt_updater)(QSEP_dtx *dtx, const unsigned int *edata, size_t nbytes, int bridge, QSE_ctxUpdateInfo *info)

Call back signature for an event decoding routine.

Returns:
Status
Parameters:
dtx Decoding context
evt The event data to use in filling the update information
nbytes The number of bytes in the event
bridge The bridge word. This contains up to 8 bits of format specific decoding information.
info The update information structure to fill


Function Documentation

static __inline unsigned int checksum_check ( QSEP_dtxChecksum checksum,
unsigned int *  data,
int  ndata 
) [static]

Computes the checksum over the indicated data and compares it with the checksum in the checksum context structure.

Return values:
0,if the checksums compare
QSEP_STATUS_K_CHECKSUM,if the checksums do not compare
Parameters:
checksum The checksum context. Contains a flag indicating whether the checksum should be checked and the comparision value of the checksum
data The 32-bit data array to checksum
ndata The number of 32-bit elements in the data array

static __inline unsigned int checksum_compute ( const unsigned int *  data,
int  ndata 
) [static]

Compute the Fletcher checksum on the data array.

Returns:
The 32-bit Fletcher checksum
Parameters:
data The array of 32-bit data to checksum
ndata The number of elements in the data array

static __inline const unsigned int * checksum_fill ( QSEP_dtxChecksum checksum,
const unsigned int *  cur,
int  bridge 
) [static]

Fills the checksum structure.

Returns:
The next input location to decode
Parameters:
checksum The checksum context to fill
cur The current decoding location
bridge The event record's bridge word

static __inline void * copy ( void *  dst,
const void *  src,
size_t  nbytes 
) [static]

Copies the specified number of bytes from the source to the destination.

Returns:
Pointer to the next destination
Parameters:
dst The destination
src The source
nbytes The number of bytes to copy. This must be a multiple of 4 bytes
Convenience routine to copy the specified number of bytes from the source address to the destination. This differs from memcpy in that it returns the address of the next destination address rather than the input source address. The code for appending data to a current destination address is cleaner with this return code.

static unsigned int decode0_4_5 ( QSEP_dtx dtx,
const unsigned int *  src,
LSEP_evtToc0_4_ctl  ctl,
unsigned int  dstu,
unsigned int  no_tack,
const LSEP_evtToc0_4_tem  tems[16],
QSE_ebfEvt *  ebf 
) [static]

Workhorse routine to decode version 0, format 4 and 5 events.

Returns:
The size of the event, in bytes or -1 in case of failure
Parameters:
dtx The decoding context
src The start of input event data, this is the common piece of format 4 and 5 events, just past the header
ctl The template for restoring the Event Summary Word.
dstu The unique piece of the destination adddress
no_tack The value of NOT TACK.
tems The header information. This is in the format of event 4 events, so format 5 events must be first translated to this format before calling this routine
ebf The output EBF event structure to fill
Note:
This function does not do integrity checking. The sizes of both the input and output buffers can and must be pre-calculated by the calling routines. Once this is done, the calling routine can check that the buffers are correct.

static __inline unsigned int ebw_reconstruct ( const QSEP_dtx dtx,
unsigned int  dstu 
) [static]

Reconstruct the Event Builder Word.

Returns:
The reconstructed the Event Builder Word
Parameters:
dtx The event context information. This contains the original CPU number
dstu The unique piece of the destination node address

static unsigned int esw_reconstruct0_4 ( LSEP_evtToc0_4_ctl  ctl,
unsigned int  no_tack 
) [static]

Reconstruct the Event Summary Word from a version 0, format 4 control word.

Returns:
The reconstructed Event Summary Word
Parameters:
ctl The control word
no_tack The value of no_tack. This value is inverted and stored as the value of the tack bit of the ESW.

static int evt0_0_decode ( QSEP_dtx dtx,
const unsigned int *  edata,
size_t  nbytes,
int  bridge,
QSE_ebfEvt *  ebf,
int  ebf_size,
unsigned int *  ret_size 
) [static]

Decodes Version 0, Format 0 events.

Returns:
Decoding status
Parameters:
dtx The decoding context
edata The input event data to decode
nbytes The number of bytes in the event
bridge The bridge word. Unused for format 0.
ebf The output EBF event structure to fill
ebf_size The number of bytes available in ebf
ret_size The number of bytes actually used in ebf.
Version 0, Format 0 events are as is from the Event Builder. This means that multi-packet events are presented as such and must be processed a packet at a time just as they would be in the embedded systems.

ADVANCE (edata, rsd_bytes);

static int evt0_0_update ( QSEP_dtx dtx,
const unsigned int *  edata,
size_t  nbytes,
int  bridge,
QSE_ctxUpdateInfo *  info 
) [static]

Provides update information Version 0, Format 0 events.

Returns:
Update status
Parameters:
dtx The decoding context
edata The input event data to get the update info from
nbytes The number of bytes in the event
bridge The bridge word. Unused for format 0
info The event update structure to complete

static int evt0_1_decode ( QSEP_dtx dtx,
const unsigned int *  edata,
size_t  nbytes,
int  bridge,
QSE_ebfEvt *  ebf,
int  ebf_size,
unsigned int *  ret_size 
) [static]

Decodes Version 0, Format 1 events.

Returns:
Decoding status
Parameters:
dtx The decoding context
edata The input event data to decode
nbytes The number of bytes in the event
bridge The bridge word. Unused for format 1.
ebf The output EBF event structure to fill
ebf_size The number of bytes available in ebf
ret_size The number of bytes actually used in ebf.
Version 0, Format 1 events are almost as is from the Event Builder. The almost is that multi-packet events have been reassembled into one packet and the trailing padding has been removed.

ADVANCE (edata, rsd_bytes);

static int evt0_1_update ( QSEP_dtx dtx,
const unsigned int *  edata,
size_t  nbytes,
int  bridge,
QSE_ctxUpdateInfo *  info 
) [static]

Provides update information Version 0, Format 1 events.

Returns:
Update status
Parameters:
dtx The decoding context
edata The input event data to get the update info from
nbytes The number of bytes in the event
bridge The bridge word. Unused for format 1.
info The event update structure to complete

static int evt0_2_decode ( QSEP_dtx dtx,
const unsigned int *  edata,
size_t  nbytes,
int  bridge,
QSE_ebfEvt *  ebf,
int  ebf_size,
unsigned int *  ret_size 
) [static]

Decodes Version 0, Format 2 events.

Returns:
Decoding status
Parameters:
dtx The decoding context
edata The input event data to decode
nbytes The number of bytes in the event
bridge The bridge word. Unused for format 2.
ebf The output EBF event structure to fill
ebf_size The number of bytes available in ebf
ret_size The number of bytes actually used in ebf.
Version 0, Format 2 events are almost as is from the Event Builder. The almost is that multi-packet events have been reassembled into one packet and the leading 6 32-bit words and trailing padding has been removed.

ADVANCE (edata, rsd_bytes);

static int evt0_2_update ( QSEP_dtx dtx,
const unsigned int *  edata,
size_t  nbytes,
int  bridge,
QSE_ctxUpdateInfo *  info 
) [static]

Provides update information Version 0, Format 2 events.

Returns:
Update status
Parameters:
dtx The decoding context
edata The input event data to get the update info from
nbytes The number of bytes in the event
bridge The bridge word. Unused for format 2.
info The event update structure to complete
Version 0, Format 2 events are almost as is from the Event Builder. The almost is that multi-packet events have been reassembled into one packet and the leading 6 32-bit words and trailing padding has been removed.

static int evt0_3_decode ( QSEP_dtx dtx,
const unsigned int *  edata,
size_t  nbytes,
int  bridge,
QSE_ebfEvt *  ebf,
int  ebf_size,
unsigned int *  ret_size 
) [static]

Decodes Version 0, Format 3 events.

Returns:
Status
Return values:
-1,Serious decode error.
Parameters:
dtx The decoding context
edata The input event data to decode
nbytes The number of bytes in the event
bridge The bridge word. Unused for format 3.
ebf The output EBF event structure to fill
ebf_size The number of bytes available in ebf
ret_size The number of bytes actually used in ebf.

static int evt0_3_update ( QSEP_dtx dtx,
const unsigned int *  edata,
size_t  nbytes,
int  bridge,
QSE_ctxUpdateInfo *  info 
) [static]

Provides update information Version 0, Format 3 events.

Returns:
Update status
Parameters:
dtx The decoding context
edata The input event data to get the update info from
nbytes The number of bytes in the event
bridge The bridge word. Unused for format 3.
info The event update structure to complete

static int evt0_4_decode ( QSEP_dtx dtx,
const unsigned int *  edata,
size_t  nbytes,
int  bridge,
QSE_ebfEvt *  ebf,
int  ebf_size,
unsigned int *  ret_size 
) [static]

Decodes Version 0, Format 4 events.

Returns:
Status
Return values:
-1,Serious decode error.
Parameters:
dtx The decoding context
edata The input event data to decode
nbytes The number of bytes in the event
bridge The bridge word. Unused for format 4.
ebf The output EBF event structure to fill
ebf_size The number of bytes available in ebf
ret_size The number of bytes actually used in ebf.

static int evt0_4_update ( QSEP_dtx dtx,
const unsigned int *  edata,
size_t  nbytes,
int  bridge,
QSE_ctxUpdateInfo *  info 
) [static]

Provides update information Version 0, Format 4 events.

Returns:
Update status
Parameters:
dtx The decoding context
edata The input event data to get the update info from
nbytes The number of bytes in the event
bridge The bridge word. Unused for format 4.
info The event update structure to complete

static int evt0_5_decode ( QSEP_dtx dtx,
const unsigned int *  edata,
size_t  nbytes,
int  bridge,
QSE_ebfEvt *  ebf,
int  ebf_size,
unsigned int *  ret_size 
) [static]

Decodes Version 0, Format 5 events.

Returns:
Status
Return values:
-1,Serious decode error.
Parameters:
dtx The decoding context
edata The input event data to decode
bridge The bridge word. If the LSB is set, this indicates the presence of the TEM contribution word immediately after the table of contents.
nbytes The number of bytes in the event
ebf The output EBF event structure to fill
ebf_size The number of bytes available in ebf
ret_size The number of bytes actually used in ebf.

static int evt0_5_update ( QSEP_dtx dtx,
const unsigned int *  edata,
size_t  nbytes,
int  bridge,
QSE_ctxUpdateInfo *  info 
) [static]

Parameters:
dtx The decoding context
edata The input event data to get the update info from
nbytes The number of bytes in the event
bridge The bridge word. If the LSB is set, this indicates the presence of the TEM contribution word immediately after the table of contents.
info The event update structure to complete

static int evt0_8_decode ( QSEP_dtx dtx,
const unsigned int *  edata,
size_t  nbytes,
int  bridge,
QSE_ebfEvt *  ebf,
int  ebf_size,
unsigned int *  ret_size 
) [static]

Decodes Version 0, Format 8 events.

Returns:
Status
Return values:
-1,Serious decode error.
Parameters:
dtx The decoding context
edata The input event data to decode
bridge The bridge word.
nbytes The number of bytes in the event
ebf The output EBF event structure to fill
ebf_size The number of bytes available in ebf
ret_size The number of bytes actually used in ebf.

static int evt0_8_update ( QSEP_dtx dtx,
const unsigned int *  edata,
size_t  nbytes,
int  bridge,
QSE_ctxUpdateInfo *  info 
) [static]

Parameters:
dtx The decoding context
edata The input event data to get the update info from
nbytes The number of bytes in the event
bridge The bridge word. If the LSB is set, this indicates the presence of the TEM contribution word immediately after the table of contents.
info The event update structure to complete

static int evt0_decode_noop ( QSEP_dtx dtx,
const unsigned int *  edata,
size_t  nbytes,
int  bridge,
QSE_ebfEvt *  ebf,
int  ebf_size,
unsigned int *  ret_size 
) [static]

Punts on unknown Version 0, formats.

Return values:
-1,Serious decode error.
Parameters:
dtx The decoding context, ignored
edata The input event data to decode, ignored
bridge The bridge word. Unused for NOOP.
nbytes The number of bytes in the event, ignored
ebf The output EBF event structure to fill, ignored
ebf_size The number of bytes available in ebf
ret_size The number of bytes actually used in ebf.

static int evt0_update_noop ( QSEP_dtx dtx,
const unsigned int *  edata,
size_t  nbytes,
int  bridge,
QSE_ctxUpdateInfo *  info 
) [static]

Punts on unknown Version 0 formats.

Return values:
-1,Serious decode error.
Parameters:
dtx The decoding context, ignored
edata The input event data to decode, ignored
bridge The bridge word,ignored
nbytes The number of bytes in the event, ignored
info The event update structure to complete, ignored

static __inline unsigned int * header_add ( unsigned int *  dst  )  [static]

Adds the padding for the 8-word LCB header.

Returns:
Pointer to the next output word
Parameters:
dst Pointer to where to add the header

static int is_known ( unsigned char  level  )  [static]

Tests if the format/compression level is known.

Return values:
== 0 if not known
!= 0 if known
Parameters:
level The compression lelve to check

static __inline unsigned char * pad ( unsigned char *  dst,
int  lwrd_cnt 
) [static]

Zeroes the specified number of longwords.

Returns:
The address after the last word written
Parameters:
dst The destination address
lwrd_cnt The number of 32-bit words to zero
This routine exists mainly to laundry the casts to and from unsigned chars and unsigned ints. It was made necessary by the newer compilers enforcing rules on not doing casts of lvalues.

static __inline unsigned int pad_to_cell ( unsigned int *  dst,
unsigned int  nbytes 
) [static]

Pads the destination address up to the next cell (16-byte) boundary. The number of pad bytes is computed by how short nbytes is from a 16-byte boundary. It is assumed that nbytes is a multiple of 4.

Returns:
Parameters:
dst The destination address
nbytes The number of bytes. (As an explanatory note, the beginning of the buffer is at (char *)dst - nbytes. This most be a multiple of 4 bytes

int parityOdd16Calc ( unsigned short int  hword  )  [static]

Calculates the odd parity over the 16 bits in the specified half word.

Returns:
The odd parity, either 0 or 1, over the 16 bits the specified half word.
Parameters:
hword The half word (short int) to calculate the parity of.

int QSEP_evt0_decode ( QSEP_dtx dtx,
const LSF_record *  ievt,
QSE_ebfEvt *  ebf,
int  ebf_size,
unsigned int *  ret_size 
)

Dispatches the input event to the proper handler.

Returns:
Decoding status
Parameters:
dtx The decoding context
ievt The input event data to decode
ebf The output EBF event structure
ebf_size The number of bytes available in ebf
ret_size The number of bytes actually used.

int QSEP_evt0_update ( QSEP_dtx dtx,
const LSF_record *  ievt,
QSE_ctxUpdateInfo *  info 
)

Dispatches the input event to the proper update handler.

Returns:
Status
Parameters:
dtx The decoding context
ievt The input event data
info The event update structure to complete

static const void * rsd_fill ( QSEP_ctxRsd rsd,
unsigned char  bridge,
const unsigned int *  src 
) [static]

Copies the result summary data into the memory pointed to by the valid descriptors.

Returns:
Pointer to the next read location
Parameters:
rsd The result summary data structure to fill
bridge The bridge word, carries status information, in this case whether the event carries a result summary data.
src The source data

static __inline Rsb toc5_fill ( LSEP_evtToc0_4_tem  tems[16],
const LSEP_evtBdy0_5 *  evt5,
int  bridge,
const unsigned int *  src_end,
int  dst_bytes 
) [static]

Fills a format 4 style table of contents from a format 5 style.

Returns:
Return status block
Parameters:
tems The array of TOC 4 style entries to fill
evt5 Pointer to the input event
bridge If bit 0 is set, then src[0] contains a bit mask of the containing missing contributors.
src_end The ending source address
dst_bytes The number of bytes in the destination data
If the status in the return status block is < 0, then this is an error If the status in the return status block is >=0, then this is the number of words to skip to get to the data.

static __inline int update_check ( int  rsd_bytes,
int  gem_bytes,
unsigned char  bridge,
int  nbytes 
) [static]

Checks if there is enough input data to accomodate both a possible result summary data block and a GEM contribution.

Return values:
0 The is enough data
QSEP_STATUS_K_UNDRUN More data is needed than is available
Parameters:
rsd_bytes Number of bytes in the result summary data block
gem_bytes Number of bytes in the GEM contribution
bridge The bridge word, carries status information, in this case whether the event carries a result summary data.
nbytes The number of bytes that are available


Variable Documentation

static const QSEP_evt_decoder Decode[16] [static]

Initial value:

{
  evt0_0_decode,
  evt0_1_decode,
  evt0_2_decode,
  evt0_3_decode,

  evt0_4_decode,
  evt0_5_decode,
  evt0_decode_noop,
  evt0_decode_noop,

  evt0_8_decode,
                    evt0_decode_noop, evt0_decode_noop,  evt0_decode_noop,
  evt0_decode_noop, evt0_decode_noop,  evt0_decode_noop,  evt0_decode_noop
}
The dispatch table for the 16 format of level 0 encoded events.

static const QSEP_evt_updater Update[16] [static]

Initial value:

{
  evt0_0_update,
  evt0_1_update,
  evt0_2_update,
  evt0_3_update,

  evt0_4_update,
  evt0_5_update,
  evt0_update_noop,
  evt0_update_noop,

  evt0_8_update,    evt0_update_noop,  evt0_update_noop,  evt0_update_noop,
  evt0_update_noop, evt0_update_noop,  evt0_update_noop,  evt0_update_noop
}
The dispatch table for the 16 format of level 0 encoded events.


Generated on Sat Jun 20 01:49:21 2009 by  doxygen 1.5.3