GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EDS / V2-11-5 > eds / mv2304
#include <EDS/EBF_pkt.h>
#include <EDS/EBF_siv.h>
#include <EDS/EBF_edw.h>
#include <PARITY.ih>
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. |
CVS $Id: EBF_siv.c,v 1.6 2011/03/25 22:16:56 russell Exp $
#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.
_ebm_err | The EBM's error field |
Referenced by EBF_sivUpdate().
#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))
#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.
_xstatus | The event descriptor's transfer status |
Referenced by EBF_sivUpdate().
#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)) \
#define MORE_ERR_RCV | ( | _rstatus | ) |
Value:
((MORE_ERR_RCV_BY_RSTATUS << (3 * _rstatus)) & \ (EBF_SIV_M_STATE_MORE | EBF_SIV_M_ERR_RCV))
_rstatus | The event descriptor receive status |
Referenced by EBF_sivUpdate().
#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))
#define NOTFIRST | ( | _siv | ) |
Value:
((((unsigned int)(_siv)) >> \ (EBF_SIV_V_STATE_MORE-EBF_SIV_V_STATE_NOTFIRST)) \ & EBF_SIV_M_STATE_NOTFIRST)
_siv | The State Information Vector |
Referenced by EBF_sivUpdate().
EBF_siv EBF_sivInit | ( | void | ) |
Returns an initializes the Packet Reassembly State Information Vector.
Referenced by EDS_fwConstruct1().
Returns the updated the State Information Vector.
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 |
References _EBF_ebw::bf, _EBF_edw::bf, EBF_EDW_M_STATUS, EBF_EDW_V_STATUS, EBF_SIV_M_ERR, EBF_SIV_M_STATE_MORE, EBF_SIV_M_VAL, EBF_SIV_M_VAL_EBMSEQ, EBF_SIV_V_ERR_PARITY, EBF_SIV_V_ERR_SEQ0, EBF_SIV_V_STATE_NOTFIRST, EBF_SIV_V_VAL_EBMERR, EBF_SIV_V_VAL_EBMSEQ, EBF_SIV_V_VAL_EDWSTATUS, _EBF_pkt::ebw, ERR_EBM, ERR_XFR, MORE_ERR_RCV, NOTFIRST, PARITY__calcOdd16(), _EBF_edw_bf::rstatus, _EBF_ebw::ui, _EBF_edw::ui, and _EBF_edw_bf::xstatus.
Referenced by EDS_fwHandlerProcess().