GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EDS / V2-11-5 > edsprint / rhel5-32
#include <PBI/Endianness.h>
Classes | |
struct | _EBF_calLogData_bf |
Maps out the 32-bit value of a CAL log data field as bit fields. More... | |
struct | _EBF_calLogData_cf |
Maps out the 32-bit value of a CAL log data field as bit fields. This mapping keeps the RNG and ADC value contigious. More... | |
union | _EBF_calLogData |
Maps out the 32-bit value of a CAL log data field both in bit fields and as an unsigned 32-bit integer. More... | |
struct | _EBF_cal |
Lays out the format of the CAL data block from the event builder. More... | |
Defines | |
#define | EBF_CALLOGCNT_MASK 0x0f0f0f0f |
Value to be supplied as the second argument in EBF__calLogCntM. | |
#define | EBF_CAL_SATURATION ((7 * (1 << 12)) / 8) |
Suggestion ADC saturation value. | |
Typedefs | |
typedef enum _EBF_CAL_LOGDATA_S | EBF_CAL_LOGDATA_S |
Typedef for struct _EBF_CAL_LOGDATA_S. | |
typedef enum _EBF_CAL_LOGDATA_V | EBF_CAL_LOGDATA_V |
Typedef for struct _EBF_CAL_LOGDATA_V. | |
typedef enum _EBF_CAL_LOGDATA_M | EBF_CAL_LOGDATA_M |
Typedef for struct _EBF_CAL_LOGDATA_M. | |
typedef struct _EBF_calLogData_bf | EBF_calLogData_bf |
Typedef for struct _EBF_calLogData_bf. | |
typedef struct _EBF_calLogData_cf | EBF_calLogData_cf |
Typedef for struct _EBF_calLogData_cf. | |
typedef union _EBF_calLogData | EBF_calLogData |
Typedef for union _EBF_calLogData. | |
typedef struct _EBF_cal | EBF_cal |
Typedef for struct _EBF_cal. | |
Enumerations | |
enum | _EBF_CAL_LOGDATA_S { EBF_CAL_LOGDATA_S_COL = 4, EBF_CAL_LOGDATA_S_RNGN = 2, EBF_CAL_LOGDATA_S_VALN = 12, EBF_CAL_LOGDATA_S_RNGP = 2, EBF_CAL_LOGDATA_S_VALP = 12 } |
Maps out the sizes of the bit fields for a CAL log data word. More... | |
enum | _EBF_CAL_LOGDATA_V { EBF_CAL_LOGDATA_V_COL = 28, EBF_CAL_LOGDATA_V_RNGN = 26, EBF_CAL_LOGDATA_V_VALN = 14, EBF_CAL_LOGDATA_V_RNGP = 12, EBF_CAL_LOGDATA_V_VALP = 0 } |
Maps out the amount need to right justify the bit fields for a CAL log data word. More... | |
enum | _EBF_CAL_LOGDATA_M { EBF_CAL_LOGDATA_M_COL = 0xf0000000, EBF_CAL_LOGDATA_M_RNGN = 0x0c000000, EBF_CAL_LOGDATA_M_VALN = 0x03ffc000, EBF_CAL_LOGDATA_M_RNGP = 0x00003000, EBF_CAL_LOGDATA_M_VALP = 0x00000fff } |
Maps out the in place mask needed to extract the bit fields of a CAL log data word. More... | |
Functions | |
static __inline unsigned char | EBF__calLogCntM (unsigned int layerCnts, unsigned int mask) |
Calculates the total number of logs struck in this contributor's CAL record. | |
static __inline unsigned char | EBF__calLogCnt (unsigned int layerCnts) |
Calculates the total number of logs struck in this contributor's CAL record. | |
static __inline unsigned int | EBF__calAutoRange (const EBF_calLogData *rngs, int inc, unsigned int saturation) |
Selects the best range to use. |
CVS $Id: EBF_cal.h,v 1.5 2011/03/25 22:16:54 russell Exp $
#define EBF_CAL_SATURATION ((7 * (1 << 12)) / 8) |
Suggestion ADC saturation value.
#define EBF_CALLOGCNT_MASK 0x0f0f0f0f |
Value to be supplied as the second argument in EBF__calLogCntM.
Referenced by EBF__calLogCnt().
Typedef for struct _EBF_cal.
Typedef for union _EBF_calLogData.
Mapping the CAL log data in this manner allows the programmer to assign a CAL log data value with a simple assignment statement, but then to access the fields using the bit field structure.
enum _EBF_CAL_LOGDATA_M |
Maps out the in place mask needed to extract the bit fields of a CAL log data word.
enum _EBF_CAL_LOGDATA_S |
Maps out the sizes of the bit fields for a CAL log data word.
enum _EBF_CAL_LOGDATA_V |
Maps out the amount need to right justify the bit fields for a CAL log data word.
static __inline unsigned int EBF__calAutoRange | ( | const EBF_calLogData * | rngs, | |
int | inc, | |||
unsigned int | saturation | |||
) | [static] |
Selects the best range to use.
rngs | Pointer to the first of the four ranges | |
inc | The increment, in units of 32-bit words to advance from one range to the next. | |
saturation | ADC values greater than or equal to this value are considered saturated. |
References _EBF_calLogData::bf, _EBF_calLogData_bf::rngN, _EBF_calLogData_bf::rngP, _EBF_calLogData::ui, _EBF_calLogData_bf::valN, and _EBF_calLogData_bf::valP.
unsigned char EBF__calLogCnt | ( | unsigned int | layerCnts | ) | [static] |
Calculates the total number of logs struck in this contributor's CAL record.
layerCnts | 8 nibbles representing the number of counts in each of the 8 CAL layers. |
References EBF__calLogCntM(), and EBF_CALLOGCNT_MASK.
unsigned char EBF__calLogCntM | ( | unsigned int | layerCnts, | |
unsigned int | mask | |||
) | [static] |
Calculates the total number of logs struck in this contributor's CAL record.
layerCnts | 8 nibbles representing the number of counts in each of the 8 CAL layers. | |
mask | A bit mask with every other nibble being 0 of 0xf. This is really not a parameter, but including allows the compiler to optimize its placement in a register. |
Referenced by EBF__calLogCnt().