GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > QSE / V1-6-4
Constituent: qse     Tag: linux-gcc
#include "QSE/QSE_aem.h"
#include "QSE/QSE_map.h"
Include dependency graph for QSE_aemRepack.c:
Defines | |
#define | HIT(_hit,_chn) ((_hit) << (T0_V_HIT + T0_S_HIT - 1 - (_chn))) |
Forms the hit mask to place into the T0 word for the specified channel. | |
#define | ACCEPT(_accept, _chn) ((_accept) << (T1_V_ACCEPT + T1_S_ACCEPT - 1 - (_chn))) |
Forms the accept mask to place into the T1 word for the specified channel. | |
#define | S0(_t0) ((_t0) >> 16) |
Extracts the bits from _t0 that comprise S0. | |
#define | S1(_t0, _t1) ((_t0) | ((_t1) >> 19)) |
#define | S2(_t1) ((_t1) >> 3) |
#define | SIZE(_ncables, _nphas) ((6 * (_ncables) + (_nphas) ) * sizeof (short int)) |
Calculates the size, in bytes, of the output record needed to hold an EBF record of ncables and _nphas. | |
#define | NCABLES_MAX 12 |
The maximum number of cables possible. | |
#define | NPHAS_MAX (NCABLES_MAX * 18) |
The maximum number of phas possible. | |
#define | SIZE_MAX SIZE(NCABLES_MAX, NPHAS_MAX) |
The maximum size, in bytes, of output EBF record. | |
Typedefs | |
typedef enum _T0_S | T0_S |
Typedef for enum _T0_S. | |
typedef enum _T0_V | T0_V |
Typedef for enum _T0_V. | |
typedef enum _T0_M | T0_M |
Typedef for enum _T0_M. | |
typedef enum _T1_S | T1_S |
Typedef for enum _T1_S. | |
typedef enum _T1_V | T1_V |
Typedef for enum _T1_V. | |
typedef enum _T1_M | T1_M |
Typedef for enum _T1_M. | |
typedef enum _PHA_S | PHA_S |
Typedef for enum _PHA_S. | |
typedef enum _PHA_V | PHA_V |
Typedef for enum _PHA_V. | |
typedef enum _PHA_M | PHA_M |
Typedef for enum _PHA_M. | |
Enumerations | |
enum | _T0_S { T0_S_START = 1, T0_S_HIT = 18, T0_S_MBZ = 12 } |
Map out the sizes, in bits of the first header word. | |
enum | _T0_V { T0_V_START = 31, T0_V_HIT = 13, T0_V_MBZ = 0 } |
Map out the right justified bit shifts of the first header word. | |
enum | _T0_M { T0_M_START = ((1 << T0_S_START) - 1) << T0_V_START, T0_M_HIT = ((1 << T0_S_HIT ) - 1) << T0_V_HIT, T0_M_MBZ = ((1 << T0_S_MBZ ) - 1) << T0_V_MBZ } |
Map out the in place bit masks of the first header word. | |
enum | _T1_S { T1_S_ACCEPT = 18, T1_S_VALID = 1, T1_S_PE = 1, T1_S_END = 1, T1_S_CABLE = 4, T1_S_MBZ = 7 } |
Map out the sizes, in bits of the 2rd word of the cable header. | |
enum | _T1_V { T1_V_ACCEPT = 14, T1_V_VALID = 13, T1_V_PE = 12, T1_V_END = 11, T1_V_CABLE = 7, T1_V_MBZ = 0 } |
Map out the right justified bit offsets 3rd word of the cable header. | |
enum | _T1_M { T1_M_ACCEPT = ((1 << T1_S_ACCEPT) - 1) << T1_V_ACCEPT, T1_M_VALID = ((1 << T1_S_VALID ) - 1) << T1_V_VALID, T1_M_PE = ((1 << T1_S_PE ) - 1) << T1_V_PE, T1_M_END = ((1 << T1_S_END ) - 1) << T1_V_END, T1_M_CABLE = ((1 << T1_S_CABLE ) - 1) << T1_V_CABLE, T1_M_MBZ = ((1 << T1_S_MBZ ) - 1) << T1_V_MBZ } |
Map out in in-place bit masks of the 2nd word of the cable header. | |
enum | _PHA_S { PHA_S_MBZ = 1, PHA_S_MORE = 1, PHA_S_RNG = 1, PHA_S_ADC = 12, PHA_S_PE = 1 } |
Size, in bits, of the fields in the PHA vector. | |
enum | _PHA_V { PHA_V_MBZ = 15, PHA_V_MORE = 14, PHA_V_RNG = 13, PHA_V_ADC = 1, PHA_V_PE = 0 } |
Right justified bit offset of the fields in the PHA vector. | |
enum | _PHA_M { PHA_M_MBZ = ((1 << PHA_S_MBZ ) - 1) << PHA_V_MBZ, PHA_M_MORE = ((1 << PHA_S_MORE) - 1) << PHA_V_MORE, PHA_M_RNG = ((1 << PHA_S_RNG ) - 1) << PHA_V_RNG, PHA_M_ADC = ((1 << PHA_S_ADC ) - 1) << PHA_V_ADC, PHA_M_PE = ((1 << PHA_S_PE ) - 1) << PHA_V_PE } |
In-place masks of the bit offset of the fields in the PHA vector. | |
Functions | |
static __inline int | count_phas (const QSE_aem_chn *chns, int nchns) |
Counts the number of PHAs in the channel array. | |
static __inline int | count_cables (unsigned short int present) |
Counts the number of cables present. | |
int | QSE_aemRepack (const unsigned int *dat, unsigned int len, const QSE_aem *aem) |
Repacks the ACD in record make into EBF format. |
CVS $Id: QSE_aemRepack.c,v 1.4 2006/11/10 22:35:55 russell Exp $
All references to the AEM hardware data format are from LAT-TD-00639, The ACD Electronics Module, Programming ICD, V2.11, September 8, 2004.
|
Forms the accept mask to place into the T1 word for the specified channel.
|
|
Forms the hit mask to place into the T0 word for the specified channel.
|
|
Extracts the bits from _t0 that comprise S0.
|
|
Calculates the size, in bytes, of the output record needed to hold an EBF record of ncables and _nphas.
|
|
Counts the number of cables present.
|
|
Counts the number of PHAs in the channel array.
|
|
Repacks the ACD in record make into EBF format.
|