GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSE / dev > qse / rhel5-64
#include <QSE/QSE_aemUnpack.h>
#include <QSE/QSE_aem.h>
#include <QSE/QSE_map.h>
#include <EDS/EBF_cid.h>
#include <EDS/EBF_dir.h>
#include <EDS/EBF_ctb.h>
#include <PBI/PTR.h>
#include <PBI/Endianness.h>
Defines | |
#define | HW_ACCESS(_hwa, _idx) _hwa[_idx]; |
Addresses the ACD half-word array in a way that is compatiable with big or little endian machines. | |
#define | channel_print(_chn) |
#define | DPRINTF(format,...) |
Functions | |
int | QSE_aemUnpack (QSE_aem *aem, const EBF_dir *dir) |
Unpacks an ACD record from the AEM into a standard structure. | |
int | QSE_aemUnpackDat (QSE_aem *aem, const void *dat, unsigned int len) |
Unpacks an ACD record from the AEM into a standard structure. | |
int | QSE_aemUnpackInit (QSE_aem *aem) |
One-time initialization an QSE_aem structure. | |
void | QSE_aemUnpackReset (QSE_aem *aem) |
Resets the QSE_aem structure, preparing it for a new event. | |
unsigned int | QSE_aemUnpackSizeof (void) |
Returns the size, in bytes, of an QSE_aem structure. |
CVS $Id: QSE_aemUnpack.c,v 1.6 2011/03/27 01:45:45 russell Exp $
#define HW_ACCESS | ( | _hwa, | |||
_idx | ) | _hwa[_idx]; |
Addresses the ACD half-word array in a way that is compatiable with big or little endian machines.
_hwa | The halfword array to be accessed | |
_idx | The value to be transformed |
Referenced by QSE_acdUnpack(), and QSE_aemUnpackDat().
int QSE_aemUnpack | ( | QSE_aem * | aem, | |
const EBF_dir * | dir | |||
) |
Unpacks an ACD record from the AEM into a standard structure.
aem | Pointer to the data structure to receive the unpacked data | |
dir | The EBF directory |
References QSE_AEM_STATUS_M_ABSENT, QSE_AEM_STATUS_M_FATAL, QSE_aemUnpackDat(), and _QSE_aem::status.
int QSE_aemUnpackDat | ( | QSE_aem * | aem, | |
const void * | dat, | |||
unsigned int | len | |||
) |
Unpacks an ACD record from the AEM into a standard structure.
aem | Pointer to the data structure to receive the unpacked data | |
dat | The AEM data for this event | |
len | The length of the data in bytes |
References _QSE_aem::cable, _QSE_aem::chns, DPRINTF, _QSE_aem_cableStatus::hdr_parity, HW_ACCESS, _QSE_aem::nchns, _QSE_aem::nphas, _QSE_aem_cableStatus::pha_overrun, _QSE_aem_cableStatus::pha_parity, _QSE_aem_cableStatus::pha_underrun, _QSE_aem_cableStatus::present, QSE_AEM_K_NCABLES, QSE_AEM_K_NCHNS_PER_CABLE, QSE_AEM_STATUS_M_ABORTED, QSE_AEM_STATUS_M_CBL_DUP, QSE_AEM_STATUS_M_CBL_ILL, QSE_AEM_STATUS_M_CBL_OVRRUN, QSE_AEM_STATUS_M_CBL_PARITY, QSE_AEM_STATUS_M_CBL_TIMEOUT, QSE_AEM_STATUS_M_DAT_OVRRUN, QSE_AEM_STATUS_M_DAT_UNDRUN, QSE_AEM_STATUS_M_FATAL, QSE_AEM_STATUS_M_PHA_OVRRUN, QSE_AEM_STATUS_M_PHA_PARITY, QSE_AEM_STATUS_M_PHA_UNDRUN, QSE_mapMask(), QSE_mapScanR(), _QSE_aem::remaining, _QSE_aem::status, and _QSE_aem_cableStatus::timeout.
Referenced by QSE_aemUnpack().
int QSE_aemUnpackInit | ( | QSE_aem * | aem | ) |
One-time initialization an QSE_aem structure.
aem | The QSE_aem structure to initialize |
References _QSE_aem::unpacked.
void QSE_aemUnpackReset | ( | QSE_aem * | aem | ) |
Resets the QSE_aem structure, preparing it for a new event.
aem | The QSE_ame structure to reset |
References _QSE_aem::unpacked.
unsigned int QSE_aemUnpackSizeof | ( | void | ) |
Returns the size, in bytes, of an QSE_aem structure.
After allocating an QSE_aem structure, the structure should be initialized using QSE_aemUnpackInit().