GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSEP / V3-5-1 > qsep / sun-gcc
Typedefs | |
typedef enum _SIV_V | SIV_V |
Typedef for enum _SIV_V. | |
typedef enum _SIV_M | SIV_M |
Typedef for SIV_M. | |
typedef signed int | SIV |
The state information vector. | |
Enumerations | |
enum | _SIV_V { SIV_V_STATE = 30, SIV_V_STATE_MORE = SIV_V_STATE + 1, SIV_V_STATE_NOTFIRST = SIV_V_STATE + 0, SIV_V_RSVD = 24, SIV_V_ERR = 16, SIV_V_ERR_RSVD_7 = SIV_V_ERR + 7, SIV_V_ERR_RSVD_6 = SIV_V_ERR + 6, SIV_V_ERR_SEQ = SIV_V_ERR + 5, SIV_V_ERR_SEQ0 = SIV_V_ERR + 4, SIV_V_ERR_EBM = SIV_V_ERR + 3, SIV_V_ERR_PARITY = SIV_V_ERR + 2, SIV_V_ERR_XFR = SIV_V_ERR + 1, SIV_V_ERR_RCV = SIV_V_ERR + 0, SIV_V_VAL = 0, SIV_V_VAL_RSVD = SIV_V_VAL + 13, SIV_V_VAL_EDWSTATUS = SIV_V_VAL + 8, SIV_V_VAL_EBMERR = SIV_V_VAL + 5, SIV_V_VAL_EBMSEQ = SIV_V_VAL + 0 } |
The right justified bit offsets of the Packet Reassembly state information vector. More... | |
enum | _SIV_M { SIV_M_STATE = (0x3 << SIV_V_STATE), SIV_M_STATE_MORE = (1 << SIV_V_STATE_MORE), SIV_M_STATE_NOTFIRST = (1 << SIV_V_STATE_NOTFIRST), SIV_M_RSVD = (0x3f << SIV_V_RSVD), SIV_M_ERR = (0xff << SIV_V_ERR), SIV_M_ERR_SEQ = (1 << SIV_V_ERR_SEQ ), SIV_M_ERR_SEQ0 = (1 << SIV_V_ERR_SEQ0), SIV_M_ERR_EBM = (1 << SIV_V_ERR_EBM), SIV_M_ERR_PARITY = (1 << SIV_V_ERR_PARITY), SIV_M_ERR_XFR = (1 << SIV_V_ERR_XFR ), SIV_M_ERR_RCV = (1 << SIV_V_ERR_RCV ), SIV_M_VAL = (0xffff << SIV_V_VAL), SIV_M_VAL_RSVD = (0x3 << SIV_V_VAL_RSVD), SIV_M_VAL_EDWSTATUS = (0x1f << SIV_V_VAL_EDWSTATUS), SIV_M_VAL_EBMERR = (0x7 << SIV_V_VAL_EBMERR), SIV_M_VAL_EBMSEQ = (0x1f << SIV_V_VAL_EBMSEQ) } |
The in place mask of the Packet Reassembly state information vector. More... | |
Functions | |
SIV | SIV_init (void) |
Returns an initializes the Packet Reassembly State Information Vector. | |
SIV | SIV_update (SIV siv, unsigned int edw, const EBF_pkt *pkt) |
Returns the updated the State Information Vector. | |
static __inline int | SIV__isFirst (SIV siv) |
Returns non-zero is this is the first or only packet in a sequence. | |
static __inline int | SIV__isNotFirst (SIV siv) |
Returns non-zero is this is the not first or only packet in a sequence. | |
static __inline int | SIV__isMid (SIV siv) |
Returns non-zero is this is not the first or last member of a sequence. | |
static __inline int | SIV__isFirstOrLast (SIV siv) |
Returns non-zero is this is the first or last member of a sequence. | |
static __inline int | SIV__isLast (SIV siv) |
Returns non-zero is this is not the last or only member of a sequence. | |
static __inline int | SIV__isMore (SIV siv) |
Returns non-zero if there are more packets to come. | |
static __inline int | SIV__isList (SIV siv) |
Returns non-zero is this is a member of a sequence. | |
static __inline int | SIV__isOnly (SIV siv) |
Returns non-zero is this is not the only member of a sequence. | |
static __inline int | SIV__isLastSeq (SIV siv) |
Returns non-zero if this is the last packet in a sequence. | |
static __inline int | SIV__hasErrors (SIV siv) |
Returns a non-zero value if errors are present. |
CVS $Id: SIV.h,v 1.1 2006/02/15 22:31:41 russell Exp $
State | Interpretation
|
Done, No list, No Error | Well-behaved single packet
|
Done, No list, Error | Single packet with an error
|
Done, List, No Error | Completed list of packets, no error
|
Done, List,Error | Completed list of packets, with error(s)
|
List in progress, No list, No Error | First packet in a list of packets
|
List in progress, No list, Error | First packet in a list of packets, with error(s)
|
List in progress, List, No Error | Middle packet in a list of packets, no error
|
List in progress, List,Error | Middle packet in a list of packets, with error(s)
siv = SIV_update (ctl->siv, edw, pkt); // Update the previous siv ctl->siv = siv; // Retain state EBF_dirCompose (dir, siv); // Always update the dir if (SIV_isFirst (siv)) // Check if first { ... } if (SIV_isLast (siv)) // Check is sequence is done { EBF_dirReassemble (dir, ALL); } |
enum _SIV_M |
The in place mask of the Packet Reassembly state information vector.
enum _SIV_V |
The right justified bit offsets of the Packet Reassembly state information vector.
static __inline int SIV__hasErrors | ( | SIV | siv | ) | [static] |
Returns a non-zero value if errors are present.
Non-zero | if errors are present | |
Zero | is error free |
siv | The state information vector to test |
References SIV_M_ERR.
Referenced by evtA_0_decode().
static __inline int SIV__isFirst | ( | SIV | siv | ) | [static] |
Returns non-zero is this is the first or only packet in a sequence.
== | 0 if this is not the first or only member of a sequence != 0 if this is the first or only member of a sequence |
siv | The state information vector to test |
References SIV_M_STATE_NOTFIRST.
static __inline int SIV__isFirstOrLast | ( | SIV | siv | ) | [static] |
Returns non-zero is this is the first or last member of a sequence.
== | 0 if this is the first or last member of a sequence != 0 if this is not the first or last member of a sequence |
siv | The state information vector to test |
References SIV_M_STATE_MORE, and SIV_M_STATE_NOTFIRST.
static __inline int SIV__isLast | ( | SIV | siv | ) | [static] |
Returns non-zero is this is not the last or only member of a sequence.
== | 0 if this is not the last or only member of a sequence != 0 if this is the last or only member of a sequence |
siv | The state information vector to test |
Referenced by evtA_0_decode().
static __inline int SIV__isLastSeq | ( | SIV | siv | ) | [static] |
Returns non-zero if this is the last packet in a sequence.
== | 0 if this is not the last member of a sequence != 0 if this is the last member of a sequence |
siv | The state information vector to test |
References SIV_M_STATE_MORE, and SIV_M_STATE_NOTFIRST.
static __inline int SIV__isList | ( | SIV | siv | ) | [static] |
Returns non-zero is this is a member of a sequence.
== | 0 if this is not a member of a sequence != 0 if this is a member of a sequence |
siv | The state information vector to test |
References SIV_M_STATE_MORE, and SIV_M_STATE_NOTFIRST.
static __inline int SIV__isMid | ( | SIV | siv | ) | [static] |
Returns non-zero is this is not the first or last member of a sequence.
== | 0 if this is not the first or last member of a sequence != 0 if this is the first or last member of a sequence |
siv | The state information vector to test |
References SIV_M_STATE_MORE, and SIV_M_STATE_NOTFIRST.
static __inline int SIV__isMore | ( | SIV | siv | ) | [static] |
Returns non-zero if there are more packets to come.
== | 0 if this is not the only member of a sequence != 0 if this is the only member of a sequence |
siv | The state information vector to test |
static __inline int SIV__isNotFirst | ( | SIV | siv | ) | [static] |
Returns non-zero is this is the not first or only packet in a sequence.
== | 0 if this is the first or only member of a sequence != 0 if this is not the first or only member of a sequence |
siv | The state information vector to test |
References SIV_M_STATE_NOTFIRST.
Referenced by evtA_0_decode().
static __inline int SIV__isOnly | ( | SIV | siv | ) | [static] |
Returns non-zero is this is not the only member of a sequence.
== | 0 if this is not the only member of a sequence != 0 if this is the only member of a sequence |
siv | The state information vector to test |
References SIV_M_STATE_MORE, and SIV_M_STATE_NOTFIRST.
SIV SIV_init | ( | void | ) |
Returns an initializes the Packet Reassembly State Information Vector.
Referenced by evtA_0_decode().
SIV_update | ( | SIV | siv, | |
unsigned int | edw, | |||
const EBF_pkt * | pkt | |||
) |
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 ERR_EBM, ERR_XFR, MORE_ERR_RCV, NOTFIRST, SIV_M_ERR, SIV_M_STATE_MORE, SIV_M_VAL, SIV_M_VAL_EBMSEQ, SIV_V_ERR_PARITY, SIV_V_ERR_SEQ0, SIV_V_STATE_NOTFIRST, SIV_V_VAL_EBMERR, SIV_V_VAL_EBMSEQ, and SIV_V_VAL_EDWSTATUS.
Referenced by evtA_0_decode().