GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > EDS / V2-10-0

Constituent: eds     Tag: mv2304


Interface   Data Structures   File List   Data Fields   Globals  

EBF_siv.c File Reference

The packet reassemble state information vector code. More...

#include "EDS/EBF_pkt.h"
#include "EDS/EBF_siv.h"
#include "EDS/EBF_edw.h"
#include "PARITY.ih"

Include dependency graph for EBF_siv.c:


Defines

#define ERR_XFR_BY_XSTATUS
 Bit array giving the ERR_XFR bit as a function of the transfer status field in the event descriptor word.
#define ERR_XFR(_xstatus)   ((ERR_XFR_BY_XSTATUS << (_xstatus)) & EBF_SIV_M_ERR_XFR)
 Translates the event descriptors's transfer status, _xstatus into the corresponding ERR_XFR mask.
#define MORE_ERR_RCV_BY_RSTATUS
 Bit array giving the MORE and ERR_RCV bit by rstatus.
#define MORE_ERR_RCV(_rstatus)
 Translates the event descriptors's receive status, _rstatus into the corresponding MORE and ERR_RCV mask.
#define ERR_EBM_BY_EBMERR
 Bit array giving 0 or depending on whether the EBM error field contains an error.
#define ERR_EBM(_ebm_err)   (((ERR_EBM_BY_EBMERR >> (_ebm_err)) & 1) << EBF_SIV_V_ERR_EBM)
 Translates the EBM's 3 bit error field.
#define NOTFIRST(_siv)
 Sets the NOTFIRST bit based on the state of the MORE bit in the State Information Vector, _siv.

Functions

EBF_siv EBF_sivInit (void)
 Returns an initializes the Packet Reassembly State Information Vector.
EBF_siv EBF_sivUpdate (EBF_siv siv, unsigned int edw, const EBF_pkt *pkt)
 Returns the updated the State Information Vector.

Detailed Description

The packet reassemble state information vector code.

Author:
JJRussell - russell@slac.stanford.edu
   CVS $Id: EBF_siv.c,v 1.5 2009/05/07 00:34:52 russell Exp $

Define Documentation

#define ERR_EBM ( _ebm_err   )     (((ERR_EBM_BY_EBMERR >> (_ebm_err)) & 1) << EBF_SIV_V_ERR_EBM)

Translates the EBM's 3 bit error field.

Returns:
The value of the ERR_EBM mask corresponding to the _ebm_err
Parameters:
_ebm_err The EBM's error field

#define ERR_EBM_BY_EBMERR

Value:

( (0 << 0)  /* Success     */           \
                           | (1 << 1)  /* Parity      */           \
                           | (1 << 2)  /* Truncated   */           \
                           | (1 << 3)  /* Write Fault */           \
                           | (1 << 4)  /* Timed out   */           \
                           | (1 << 5)  /* Undefined   */           \
                           | (1 << 6)  /* Undefined   */           \
                           | (1 << 7))
Bit array giving 0 or depending on whether the EBM error field contains an error.

If one shifts this word up by EBF_SIV_V_ERR_EBM, the resulting bit will occupy its orresponding position in the SIV.
Warning:
This word is not made for public consumption. It is only used in support of the ERR_EBM macro.

#define ERR_XFR ( _xstatus   )     ((ERR_XFR_BY_XSTATUS << (_xstatus)) & EBF_SIV_M_ERR_XFR)

Translates the event descriptors's transfer status, _xstatus into the corresponding ERR_XFR mask.

Returns:
The value of the ERR_XFR mask corresponding to the _xstatus
Parameters:
_xstatus The event descriptor's transfer status

#define ERR_XFR_BY_XSTATUS

Value:

((0                      >> 0)                 \
                             |   (EBF_SIV_M_ERR_XFR >> 1)                 \
                             |   (EBF_SIV_M_ERR_XFR >> 2)                 \
                             |   (EBF_SIV_M_ERR_XFR >> 3)                 \
                             |   (EBF_SIV_M_ERR_XFR >> 4)                 \
                             |   (EBF_SIV_M_ERR_XFR >> 5)                 \
                             |   (EBF_SIV_M_ERR_XFR >> 6)                 \
                             |   (EBF_SIV_M_ERR_XFR >> 7))                \
Bit array giving the ERR_XFR bit as a function of the transfer status field in the event descriptor word.

If one shifts this word up xstatus, the ERR_XFR bits will occupy its orresponding position in the SIV.
Warning:
This word is not made for public consumption. It is only used in support of the ERR_XFR macro.

#define MORE_ERR_RCV ( _rstatus   ) 

Value:

Translates the event descriptors's receive status, _rstatus into the corresponding MORE and ERR_RCV mask.

Returns:
The value of the MORE and ERR_RCV bits corresponding to the _rstatus
Parameters:
_rstatus The event descriptor receive status

#define MORE_ERR_RCV_BY_RSTATUS

Value:

/* Status     More      RErr    */   \
    ((0                                  >> 3*0)  /*  No       No     */   \
    |((unsigned int)EBF_SIV_M_ERR_RCV    >> 3*1)  /*  No      Yes     */   \
    |((unsigned int)EBF_SIV_M_ERR_RCV    >> 3*2)  /*  No      Yes     */   \
    |((unsigned int)EBF_SIV_M_STATE_MORE >> 3*3))
Bit array giving the MORE and ERR_RCV bit by rstatus.

If one shifts this word up by 2*rstatus, the MORE and ERR_RCV bits will occupy their corresponding positions in the SIV.
Warning:
This word is not made for public consumption. It is only used in support of the MORE_ERR_RCV macro.

#define NOTFIRST ( _siv   ) 

Value:

Sets the NOTFIRST bit based on the state of the MORE bit in the State Information Vector, _siv.

Returns:
The new value of the NOTFIRST bit
Parameters:
_siv The State Information Vector


Function Documentation

EBF_siv EBF_sivInit ( void   ) 

Returns an initializes the Packet Reassembly State Information Vector.

Returns:
The inialization value of the Packet Reassembly State Information

EBF_siv EBF_sivUpdate ( EBF_siv  siv,
unsigned int  edw,
const EBF_pkt pkt 
)

Returns the updated the State Information Vector.

Returns:
The updated the State Information Vector
Parameters:
siv The current value of the State Information Vector
edw The event descriptor word
pkt The new EBF packet. This contains the information used to perform the update


Generated on Sat Jun 20 01:25:36 2009 by  doxygen 1.5.3