GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSE / V2-3-2 > qse / sun-gcc
#include <dprintf.h>
#include <QSE/QDF_tkrRepack.h>
#include <QDF_tkr_def.h>
#include <LSE/CDF_tkrdef.h>
#include <LDT/BFP.h>
#include <LDT/BFU.h>
#include <LDT/BIT.h>
#include <PBI/PARITY.ih>
#include <PBI/FFS.ih>
#include <PBI/Endianness.h>
#include <string.h>
#include <qdf_tkr_repack_dbg.h>
Classes | |
struct | _LayerHdr_bf |
LayerHdr_bf. More... | |
union | _LayerHdr |
Union of an uninterpretted 32-bit value with the bit-field representation of the the layer count structure. More... | |
struct | _LayerCnt_bf |
LayerCnt_bf. More... | |
union | _LayerCnt |
Union of an uninterpretted 32-bit value with the bit-field representation of the the layer count structure. More... | |
Typedefs | |
typedef enum _LAYERHDR_S | LAYERHDR_S |
Typedef for enum _LAYERHDR_S. | |
typedef enum _LAYERHDR_V | LAYERHDR_V |
Typedef for enum _LAYERHDR_V. | |
typedef enum _LAYERHDR_M | LAYERHDR_M |
Typedef for enum _LAYERHDR_M. | |
typedef struct _LayerHdr_bf | LayerHdr_bf |
Typedef for struct _NormalHdr_bf. | |
typedef union _LayerHdr | LayerHdr |
Typedef for union _LayerCnt. | |
typedef enum _LAYERCNT_S | LAYERCNT_S |
Typedef for enum _LAYERCNT_S. | |
typedef enum _LAYERCNT_V | LAYERCNT_V |
Typedef for enum _LAYERCNT_V. | |
typedef enum _LAYERCNT_M | LAYERCNT_M |
Typedef for enum _LAYERCNT_M. | |
typedef struct _LayerCnt_bf | LayerCnt_bf |
Typedef for struct _LayerCnt_bf. | |
typedef union _LayerCnt | LayerCnt |
Typedef for union _LayerCnt. | |
Enumerations | |
enum | _LAYERHDR_S { LAYERHDR_S_PAD = 19, LAYERHDR_S_PARITY = 1, LAYERHDR_S_SPARE = 2, LAYERHDR_S_GTRC_TAG = 2, LAYERHDR_S_TAG_ERR = 1, LAYERHDR_S_ERROR = 1, LAYERHDR_S_DAV = 1, LAYERHDR_S_GTRC_ADR = 4, LAYERHDR_S_START = 1 } |
Enumerates the sizes of the fields in a GTRC layer header message. More... | |
enum | _LAYERHDR_V { LAYERHDR_V_PAD = 0, LAYERHDR_V_PARITY = 19, LAYERHDR_V_SPARE = 20, LAYERHDR_V_GTRC_TAG = 22, LAYERHDR_V_TAG_ERR = 24, LAYERHDR_V_ERROR = 25, LAYERHDR_V_DAV = 26, LAYERHDR_V_GTRC_ADR = 27, LAYERHDR_V_START = 31 } |
Enumerates the right-justified bit-field offsets of the fields in a GTRC layer header message. More... | |
enum | _LAYERHDR_M { LAYERHDR_M_PAD = 0X0007FFFF, LAYERHDR_M_PARITY = 0x00080000, LAYERHDR_M_SPARE = 0x00300000, LAYERHDR_M_GTRC_TAG = 0X00C00000, LAYERHDR_M_TAG_ERR = 0x01000000, LAYERHDR_M_ERROR = 0x02000000, LAYERHDR_M_DAV = 0x04000000, LAYERHDR_M_GTRC_ADR = 0x78000000, LAYERHDR_M_START = 0x80000000 } |
Enumerates the in place masks of the bit fields in a GTRC layer header message. More... | |
enum | _LAYERCNT_S { LAYERCNT_S_PAD = 20, LAYERCNT_S_PARITY = 1, LAYERCNT_S_NWRDS = 11 } |
Enumerates the sizes of the fields in a GTRC layer count message. More... | |
enum | _LAYERCNT_V { LAYERCNT_V_PAD = 0, LAYERCNT_V_PARITY = 20, LAYERCNT_V_NWRDS = 21 } |
Enumerates the right-justified bit-field offsets of the fields in a GTRC layer count message. More... | |
enum | _LAYERCNT_M { LAYERCNT_M_PAD = 0X000FFFFF, LAYERCNT_M_PARITY = 0x00100000, LAYERCNT_M_NWRDS = 0xFFE00000 } |
Enumerates the in place masks of the bit fields in a GTRC layer count message. More... | |
Functions | |
static __inline unsigned int | repackTkrHits (unsigned int *dst, unsigned int pos, unsigned char *tots, const QDF_tkrTwr *twr) |
Repacks the strip hits. | |
static __inline unsigned int | repackTkrTots (unsigned int *dst, unsigned int pos, const unsigned char *tots, int ntots) |
Repacks the strip hits. | |
static __inline unsigned int | expandClusters (unsigned int *dst, unsigned int pos, const QDF_tkrCluster *clusters, int nclusters) |
Expands the clusters back to the complete set of strip addresses and commits these strips to the output stream. | |
static __inline unsigned int * | repackTimeout (const QDF_tkrTwrErrTimeout *twr, unsigned int *dst, const EBF_ctb *end) |
Repacks a timeout tower. | |
static __inline unsigned int | layer_hdr_construct (int rc, int dav, int err, int tagerr, int tag, int spare, int parity) |
static __inline unsigned int | layer_cnt_construct (int cnt) |
static __inline unsigned int | add_12 (unsigned int *buf, unsigned int pos, unsigned int wrd, unsigned int lomsk, unsigned int himsk) |
Splits the 11 bit val, wrd into 2 pieces, inserting a 0 and adds it to the output buffer. | |
static __inline unsigned int | layer_cnt_add (unsigned int *buf, unsigned int pos, unsigned int cnt) |
Adds the precomposed layer count to the output stream. | |
static __inline unsigned int | layer_hdr_add (unsigned int *buf, unsigned int pos, unsigned int end, unsigned int zleading, unsigned int hdr) |
Adds the precomposed layer header to the output stream, prefacing it with the specified number of leading zeroes. | |
static __inline unsigned int | gtrc_add (unsigned int *buf, unsigned int pos, unsigned int end, unsigned int zleading, int rc, int dav, int tagerr, int err, int tag, int spare, int parity, const unsigned short int *dat) |
static __inline unsigned int | gtcc_add (unsigned int *buf, unsigned int pos, unsigned char davs, unsigned char tagerrs, unsigned char errors, const unsigned short int *lzs, unsigned int tag, const unsigned short int *dat, const unsigned short int **nxt) |
static __inline unsigned int * | repackZcopy (const QDF_tkrTwrErrZcopy *twr, unsigned int *dst, const EBF_ctb *end) |
Repacks a zcopy tower. | |
unsigned int * | QDF_tkrRepack (const QDF_tkrEvt *tkr, int tem, unsigned int *dst, const EBF_ctb *end) |
Repacks the TKR event for the specified TEM into its EBF format. |
CVS $Id: QDF_tkrRepack.c,v 1.3 2011/03/27 01:45:44 russell Exp $
enum _LAYERCNT_M |
enum _LAYERCNT_S |
enum _LAYERCNT_V |
enum _LAYERHDR_M |
Enumerates the in place masks of the bit fields in a GTRC layer header message.
enum _LAYERHDR_S |
Enumerates the sizes of the fields in a GTRC layer header message.
enum _LAYERHDR_V |
Enumerates the right-justified bit-field offsets of the fields in a GTRC layer header message.
static _inline unsigned int add_12 | ( | unsigned int * | buf, | |
unsigned int | pos, | |||
unsigned int | wrd, | |||
unsigned int | lomsk, | |||
unsigned int | himsk | |||
) | [static] |
Splits the 11 bit val, wrd into 2 pieces, inserting a 0 and adds it to the output buffer.
buf | The output buffer, | |
pos | The current bit position in the output buffer | |
wrd | The 11-bit word value to add | |
lomsk | The mask to extract the low bits of the value. | |
himsk | The mask to extract the high bits of the value. |
static __inline unsigned int expandClusters | ( | unsigned int * | dst, | |
unsigned int | pos, | |||
const QDF_tkrCluster * | clusters, | |||
int | nclusters | |||
) | [static] |
Expands the clusters back to the complete set of strip addresses and commits these strips to the output stream.
dst | The destination array | |
pos | The current bit position to write to | |
clusters | The list of clusters to expand | |
nclusters | The count of clusters to expand |
References print_declare.
Referenced by repackTkrHits().
static __inline unsigned int layer_cnt_add | ( | unsigned int * | buf, | |
unsigned int | pos, | |||
unsigned int | cnt | |||
) | [static] |
Adds the precomposed layer count to the output stream.
buf | The output buffer, | |
pos | The current bit position in the output buffer | |
cnt | The precomposed layer count to add |
static __inline unsigned int layer_hdr_add | ( | unsigned int * | buf, | |
unsigned int | pos, | |||
unsigned int | end, | |||
unsigned int | zleading, | |||
unsigned int | hdr | |||
) | [static] |
Adds the precomposed layer header to the output stream, prefacing it with the specified number of leading zeroes.
buf | The output buffer, | |
pos | The current bit position in the output buffer | |
end | The maximum bit position that the layer header may occupy. This occurs when the 127 cells are exhausted leaving insufficient space for the layer header word. | |
zleading | The number of leading zero bits to add before adding the layer header | |
hdr | The precomposed layer header to add |
unsigned int * QDF_tkrRepack | ( | const QDF_tkrEvt * | tkr, | |
int | tem, | |||
unsigned int * | dst, | |||
const EBF_ctb * | end | |||
) |
Repacks the TKR event for the specified TEM into its EBF format.
tkr | The unpacked TKR event data | |
tem | Which TEM | |
dst | The EBF destination address | |
end | The address just past the last legitimate address |
References _QDF_tkrEvt::errMap, _QDF_tkrEvt::errTwrs, _QDF_tkrEvt::map, repackTimeout(), repackTkrHits(), repackTkrMaps(), repackTkrTots(), repackZcopy(), _QDF_tkrTwrErr::style, _QDF_tkrTwrErr::timeout, _QDF_tkrEvt::twrs, and _QDF_tkrTwrErr::zcopy.
Referenced by temRepack().
static __inline unsigned int * repackTimeout | ( | const QDF_tkrTwrErrTimeout * | twr, | |
unsigned int * | dst, | |||
const EBF_ctb * | end | |||
) | [static] |
Repacks a timeout tower.
twr | The information about the tower to be repacked | |
dst | The EBF destination address | |
end | The address just past the last legitimate address |
References _QDF_tkrTwrErrTimeout::accepts, _QDF_tkrTwrErrData::buf, _QDF_tkrTwrErrTimeoutLzs::cnts, _QDF_tkrTwrErrTimeout::dat, _QDF_tkrTwrErrTimeout::lzs, _QDF_tkrTwrErrTots::nvals, _QDF_tkrTwrErrTimeoutLzs::rc, _QDF_tkrTwrErrTimeout::rc0s, _QDF_tkrTwrErrTimeout::rcs, _QDF_tkrTwrErrTimeout::tag, _QDF_tkrTwrErrTimeout::tos, _QDF_tkrTwrErrTimeout::tots, and _QDF_tkrTwrErrTots::vals.
Referenced by QDF_tkrRepack().
static __inline unsigned int repackTkrHits | ( | unsigned int * | dst, | |
unsigned int | pos, | |||
unsigned char * | tots, | |||
const QDF_tkrTwr * | twr | |||
) | [static] |
Repacks the strip hits.
dst | The destination array | |
pos | The next bit position to write to | |
tots | Buffer to extract the TOTs into | |
twr | The tower to repack |
References _QSE_tkrLyr::beg, expandClusters(), _QSE_tkrLyr::nsplit, _QSE_tkrLyr::nstrips, _QSE_tkrLyr::num, _QSE_tkrLyr::tots, and _QSE_tkrLyr::twr.
Referenced by QDF_tkrRepack().
static __inline unsigned int repackTkrTots | ( | unsigned int * | dst, | |
unsigned int | pos, | |||
const unsigned char * | tots, | |||
int | ntots | |||
) | [static] |
Repacks the strip hits.
dst | The destination array | |
pos | The next bit position to write to | |
tots | The buffer of TOTs to write out | |
ntots | The number of TOTS to write out |
Referenced by QDF_tkrRepack().
static __inline unsigned int repackZcopy | ( | const QDF_tkrTwrErrZcopy * | twr, | |
unsigned int * | dst, | |||
const EBF_ctb * | end | |||
) | [static] |
Repacks a zcopy tower.
twr | The information about the tower to be repacked | |
dst | The EBF destination address | |
end | The address just past the last legitimate address |
References _QDF_tkrTwrErrZcopy::n32, _QDF_tkrTwrErrZcopy::pos, _QDF_tkrTwrErrZcopy::src, _QDF_tkrTwrErrZcopy::zs_sum, and _QDF_tkrTwrErrZcopy::zs_wrds.
Referenced by QDF_tkrRepack().