GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSE / V2-3-0 > qse / sun-gcc


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/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.5 2008/07/17 04:20:08 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


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

int QSE_aemUnpackDat ( QSE_aem aem,
const void *  dat,
unsigned int  len 
)

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

Returns:
Status. The only failure is if more than 18 PHAs are found to be present on an given FREE board or the serial decode extends beyond the maxwrds
Parameters:
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

int QSE_aemUnpackInit ( QSE_aem aem  ) 

One-time initialization an QSE_aem structure.

Returns:
0, always
Parameters:
aem The QSE_aem structure to initialize

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

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 Thu Sep 2 14:54:57 2010 by  doxygen 1.5.3