GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EDS / V2-11-5 > eds / mv2304
#include <EDS/ACD_unpack.h>
#include <EDS/ACD_rec.h>
#include <PBI/FFS.ih>
#include <PBI/Endianness.h>
#include <PBI/PTR.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 | ACD_unpack (ACD_rec *acd, const void *dat, unsigned int len) |
Unpacks an ACD record from the AEM into a standard structure. | |
int | ACD_unpackInit (ACD_rec *acd) |
One-time initialization an ACD_rec structure. | |
void | ACD_unpackReset (ACD_rec *acd) |
Resets the ACD_rec structure, preparing it for a new event. | |
unsigned int | ACD_unpackSizeof (void) |
Returns the size, in bytes, of an ACD_rec structure. |
CVS $Id: ACD_unpack.c,v 1.6 2011/04/05 23:56:49 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 ACD_unpack(), and EDR_acdUnpack().
int ACD_unpack | ( | ACD_rec * | acd, | |
const void * | dat, | |||
unsigned int | len | |||
) |
Unpacks an ACD record from the AEM into a standard structure.
acd | Pointer to the data structure to receive the unpacked data | |
dat | The ACD data for this event | |
len | The length of the data in bytes |
References ACD_K_NCABLES, ACD_K_NCHNS_PER_CABLE, ACD_STATUS_M_ABORTED, ACD_STATUS_M_CBL_DUP, ACD_STATUS_M_CBL_ILL, ACD_STATUS_M_CBL_ORDER, ACD_STATUS_M_CBL_OVRRUN, ACD_STATUS_M_CBL_PARITY, ACD_STATUS_M_CBL_TIMEOUT, ACD_STATUS_M_DAT_OVRRUN, ACD_STATUS_M_DAT_UNDRUN, ACD_STATUS_M_FATAL, ACD_STATUS_M_PHA_OVRRUN, ACD_STATUS_M_PHA_PARITY, ACD_STATUS_M_PHA_UNDRUN, _ACD_rec::cable, _ACD_rec::chns, _ACD_cableStatus::hdr_parity, HW_ACCESS, _ACD_rec::nchns, _ACD_rec::nphas, _ACD_cableStatus::pha_overrun, _ACD_cableStatus::pha_parity, _ACD_cableStatus::pha_underrun, _ACD_cableStatus::present, _ACD_rec::remaining, _ACD_rec::status, _ACD_cableStatus::timeout, and _ACD_rec::unpacked.
int ACD_unpackInit | ( | ACD_rec * | acd | ) |
One-time initialization an ACD_rec structure.
acd | The ACD_rec structure to initialize |
References _ACD_rec::unpacked.
void ACD_unpackReset | ( | ACD_rec * | acd | ) |
Resets the ACD_rec structure, preparing it for a new event.
acd | The ACD_rec structure to reset |
References _ACD_rec::unpacked.
unsigned int ACD_unpackSizeof | ( | void | ) |
Returns the size, in bytes, of an ACD_rec structure.
After allocating an ACD_rec structure, the structure should be initialized using ACD_unpackInit().