GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EDS / dev > edsd / rhel5-64


Interface   Data Structures   File List   Data Fields   Globals  

EDSD_unpack.h File Reference

Unpacking demonstration and test routines. More...

#include <EDS/LCBV.h>

Typedefs

typedef enum _EDSD_UNPACK_OBJ_K EDSD_UNPACK_OBJ_K
 Typedef for enum _EDSD_UNPACK_OBJ_K.
typedef enum _EDSD_UNPACK_OBJ_V EDSD_UNPACK_OBJ_V
 Typedef for enum _EDSD_UNPACK_OBJ_V.
typedef enum _EDSD_UNPACK_OBJ_M EDSD_UNPACK_OBJ_M
 Typedef for enum _EDSD_UNPACK_OBJ_M.

Enumerations

enum  _EDSD_UNPACK_OBJ_K {
  EDSD_UNPACK_OBJ_K_DIR = 0,
  EDSD_UNPACK_OBJ_K_ACD = 1,
  EDSD_UNPACK_OBJ_K_TKR = 2,
  EDSD_UNPACK_OBJ_K_TOT = 3,
  EDSD_UNPACK_OBJ_K_CAL = 4,
  EDSD_UNPACK_OBJ_K_CNT = 5,
  EDSD_UNPACK_OBJ_K_EVT = 16,
  EDSD_UNPACK_OBJ_K_SUM = 17
}
 Enumerates what to unpack. More...
enum  _EDSD_UNPACK_OBJ_V {
  EDSD_UNPACK_OBJ_V_DIR = EDSD_UNPACK_OBJ_K_DIR,
  EDSD_UNPACK_OBJ_V_ACD = EDSD_UNPACK_OBJ_K_ACD,
  EDSD_UNPACK_OBJ_V_TKR = EDSD_UNPACK_OBJ_K_TKR,
  EDSD_UNPACK_OBJ_V_TOT = EDSD_UNPACK_OBJ_K_TOT,
  EDSD_UNPACK_OBJ_V_CAL = EDSD_UNPACK_OBJ_K_CAL,
  EDSD_UNPACK_OBJ_V_SUM = EDSD_UNPACK_OBJ_K_SUM,
  EDSD_UNPACK_OBJ_V_EVT = EDSD_UNPACK_OBJ_K_EVT
}
 Enumerates the bit positions of the unpack objects. More...
enum  _EDSD_UNPACK_OBJ_M {
  EDSD_UNPACK_OBJ_M_DIR = (1<<EDSD_UNPACK_OBJ_V_DIR),
  EDSD_UNPACK_OBJ_M_ACD = (1<<EDSD_UNPACK_OBJ_V_ACD),
  EDSD_UNPACK_OBJ_M_TKR = (1<<EDSD_UNPACK_OBJ_V_TKR),
  EDSD_UNPACK_OBJ_M_TOT = (1<<EDSD_UNPACK_OBJ_V_TOT),
  EDSD_UNPACK_OBJ_M_CAL = (1<<EDSD_UNPACK_OBJ_V_CAL),
  EDSD_UNPACK_OBJ_M_ALL = (1<<EDSD_UNPACK_OBJ_K_CNT)-1,
  EDSD_UNPACK_OBJ_M_SUM = (1<<EDSD_UNPACK_OBJ_V_SUM),
  EDSD_UNPACK_OBJ_M_EVT = (1<<EDSD_UNPACK_OBJ_V_EVT)
}
 Enumerates the bit masks of the unpack objects. More...

Functions

int EDSD_unpackSizeof (void)
 Returns the size, in bytes, of the control structure.
int EDSD_unpackConstruct (EDSD_unpackCtl *ctl, int nevts, unsigned int objects, LCBV_pktsRngFreeCb freeRtn, void *freePrm)
 Allocates and initializes the unpacking buffers.
unsigned int EDSD_unpackProcess (EDSD_unpackCtl *ctl, unsigned int edw, EBF_pkt *pkt)
 Loops through the events, printing the contents to stdout.
void EDSD_unpackReport (const EDSD_unpackCtl *ctl)
 The reporting function.
int EDSD_unpackDestruct (EDSD_unpackCtl *ctl)
 DeAllocates and the unpacking buffers.


Detailed Description

Unpacking demonstration and test routines.

Author:
JJRussell - russell@slac.stanford.edu
   CVS $Id: EDSD_unpack.h,v 1.5 2011/03/25 22:16:55 russell Exp $

This consists of a unpacking demonstration and test routines.

Enumeration Type Documentation

Enumerates what to unpack.

Enumerator:
EDSD_UNPACK_OBJ_K_DIR  ID for the DIR
EDSD_UNPACK_OBJ_K_ACD  ID for the ACD
EDSD_UNPACK_OBJ_K_TKR  ID for the TKR
EDSD_UNPACK_OBJ_K_TOT  ID for the TOT
EDSD_UNPACK_OBJ_K_CAL  ID for the CAL
EDSD_UNPACK_OBJ_K_CNT  Number of objects to time
EDSD_UNPACK_OBJ_K_EVT  Report event-by-event statistics
EDSD_UNPACK_OBJ_K_SUM  Report summary statistics

Enumerates the bit masks of the unpack objects.

Enumerator:
EDSD_UNPACK_OBJ_M_DIR  Bit mask, DIR
EDSD_UNPACK_OBJ_M_ACD  Bit mask, ACD
EDSD_UNPACK_OBJ_M_TKR  Bit mask, TKR
EDSD_UNPACK_OBJ_M_TOT  Bit mask, TOT
EDSD_UNPACK_OBJ_M_CAL  Bit mask, CAL
EDSD_UNPACK_OBJ_M_ALL  Bit mask, ALL
EDSD_UNPACK_OBJ_M_SUM  Bit mask, SUM
EDSD_UNPACK_OBJ_M_EVT  Bit mask, EVT

Enumerates the bit positions of the unpack objects.

Enumerator:
EDSD_UNPACK_OBJ_V_DIR  Bit offset, DIR
EDSD_UNPACK_OBJ_V_ACD  Bit offset, ACD
EDSD_UNPACK_OBJ_V_TKR  Bit offset, TKR
EDSD_UNPACK_OBJ_V_TOT  Bit offset, TOT
EDSD_UNPACK_OBJ_V_CAL  Bit offset, CAL
EDSD_UNPACK_OBJ_V_SUM  Bit offset, SUM
EDSD_UNPACK_OBJ_V_EVT  Bit offset, EVT


Function Documentation

int EDSD_unpackConstruct ( EDSD_unpackCtl ctl,
int  nevts,
unsigned int  objects,
LCBV_pktsRngFreeCb  freeRtn,
void *  freePrm 
)

Allocates and initializes the unpacking buffers.

Returns:
Status
Parameters:
ctl Pointer to the control buffer
nevts The number of events to process
objects Which objects to unpack
freeRtn Virtual packet free routine
freePrm Parameter passed to the free routine, likely the LCB device handle

References _EDSD_unpackCtl::acd, alloc(), _EDSD_unpackCtl::cal, _EDSD_unpackCtl::calCal, _EDSD_unpackCtl::dir, EDSD_UNPACK_OBJ_M_ACD, EDSD_UNPACK_OBJ_M_CAL, EDSD_UNPACK_OBJ_M_DIR, EDSD_UNPACK_OBJ_M_TKR, _EDSD_unpackCtl::freePrm, _EDSD_unpackCtl::freeRtn, _EDSD_unpackCtl::ievts, _EDSD_unpackCtl::nevts, _EDSD_unpackCtl::nobjects, _EDSD_unpackCtl::objects, _EDSD_unpackCtl::result, _EDSD_unpackCtl::results, _EDSD_unpackCtl::siv, and _EDSD_unpackCtl::tkr.

int EDSD_unpackDestruct ( EDSD_unpackCtl ctl  ) 

static unsigned int EDSD_unpackProcess ( EDSD_unpackCtl ctl,
unsigned int  edw,
EBF_pkt *  pkt 
)

void EDSD_unpackReport ( const EDSD_unpackCtl ctl  ) 

int EDSD_unpackSizeof ( void   ) 

Returns the size, in bytes, of the control structure.

Returns:
The size, in bytes, of the control structure


Generated on Fri Nov 30 09:26:03 2012 by  doxygen 1.5.8