GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSE / dev > qse / rhel5-64


Interface   Data Structures   File List   Data Fields   Globals  

QSE_aemUnpack.c File Reference

Routines to unpack the AEM data. More...

#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.


Detailed Description

Routines to unpack the AEM data.

Author:
JJRussell - russell@slac.stanford.edu
    CVS $Id: QSE_aemUnpack.c,v 1.6 2011/03/27 01:45:45 russell Exp $

Define Documentation

#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.

Returns:
Value at the halfword index
Parameters:
_hwa The halfword array to be accessed
_idx The value to be transformed

Referenced by QSE_acdUnpack(), and QSE_aemUnpackDat().


Function Documentation

int QSE_aemUnpack ( QSE_aem aem,
const EBF_dir *  dir 
)

Unpacks an ACD record from the AEM into a standard structure.

Returns:
Status. This is a bit mask of the enumeration QSE_AEM_STATUS_M. In general, negative values are failures and positive values are successes, but with possible qualifications.
Parameters:
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 
)

int QSE_aemUnpackInit ( QSE_aem aem  ) 

One-time initialization an QSE_aem structure.

Returns:
0, always
Parameters:
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.

Parameters:
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.

Returns:
The size, in bytes, of an ACD_rec structure
This function should be called to determine the size of an QSE_aem structure. This allows the calling program to avoid including the structure definition an QSE_aem.

After allocating an QSE_aem structure, the structure should be initialized using QSE_aemUnpackInit().


Generated on Fri Nov 30 10:25:34 2012 by  doxygen 1.5.8