GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSEP / dev > qsepdgm / rhel5-32


Interface   Data Structures   File List   Data Fields   Globals  

QSEP_dgmDvr.c File Reference

Convenience file to tailor a QSE_dgmDvr specifically for use in a QSEP environment. More...

#include <QSEP/QSEP_dgmDvr.h>
#include <QSEP/QSEP.h>
#include <QSE/QSE_dgmDvr.h>
#include <QSE/QSE_update.h>
#include <LSEP/LSEP_ids.h>
#include <LSF/LSF_scan.h>
#include <LSF/LSF.h>

Defines

#define RND_TO(_x, _r)   (((_x) + (_r) - 1) / (_r)) * (_r)
 Round _x up to the nearest boundary of _r.

Functions

void QSEP_dgmDvrConstruct (QSEP_dgmDvr *dgmDvr, unsigned int resource_level, void *qsepCfg, const unsigned int *dgmDvrCfg, void *handler_ctx, QSEP_dgmDvrDgm handler_dgm, QSEP_dgmDvrCtb handler_ctb, QSEP_dgmDvrRec handler_rec)
 Constructs/initializes the print driver handle used in formatting the events.
LSF_scanContributionHandler QSEP_dgmDvrDatagramProcess (QSEP_dgmDvr *dvr, const LSF_datagram *dgm)
 Handles each datagram.
void QSEP_dgmDvrDestruct (QSEP_dgmDvr *dvr)
 Frees the QSEP datagram driver context.
const unsigned int * QSEP_dgmDvrPrmsConstruct (unsigned int *prms, int nevents, int nskip)
 Convenience routine to construct the QSE driver parameter list.
const unsigned int * QSEP_dgmDvrPrmsShrConstruct (unsigned int *prms, int *pevents, int *pskip)
 Convenience routine to construct the QSE driver parameter list for shared parameters. These are parameters that are potentially shared by multiple QSEP_dgmDvr's.
int QSEP_dgmDvrSizeof (int resource_level, void *qsepCfg, const unsigned int *qseDgmDvrCfg)
 Returns the size, in bytes, of the control handle.


Detailed Description

Convenience file to tailor a QSE_dgmDvr specifically for use in a QSEP environment.

Author:
JJRussell - russell@slac.stanford.edu

   CVS $Id: QSEP_dgmDvr.c,v 1.3 2011/03/29 18:49:04 russell Exp $

Define Documentation

#define RND_TO ( _x,
_r   )     (((_x) + (_r) - 1) / (_r)) * (_r)

Round _x up to the nearest boundary of _r.

Returns:
The rounded of value
Parameters:
_x The value to round
_r The rounding

Referenced by QSEP_dgmDvrConstruct(), and QSEP_dgmDvrSizeof().


Function Documentation

void QSEP_dgmDvrConstruct ( QSEP_dgmDvr *  dgmDvr,
unsigned int  resource_level,
void *  qsepCfg,
const unsigned int *  dgmDvrCfg,
void *  handler_ctx,
QSEP_dgmDvrDgm  handler_dgm,
QSEP_dgmDvrCtb  handler_ctb,
QSEP_dgmDvrRec  handler_rec 
)

Constructs/initializes the print driver handle used in formatting the events.

Parameters:
dgmDvr The datagram driver handle to initialize
resource_level The maximum QSEP resource level to support
qsepCfg The QSEP configuration, may be NULL
dgmDvrCfg Datagram driver configuration parameters construction routine, may be NULL
handler_ctx User context. Passed as the first parameter in the datagram, contributor and record handling routines
handler_dgm The datagram handling routine
handler_ctb The contribution handling routine
handler_rec The record handling routine

References RND_TO.

LSF_scanContributionHandler QSEP_dgmDvrDatagramProcess ( QSEP_dgmDvr *  dvr,
const LSF_datagram *  dgm 
)

Handles each datagram.

Return values:
The contribution level handler (routine + parameter)
Parameters:
dvr Datagram driver context parameter
dgm The datagram to print

void QSEP_dgmDvrDestruct ( QSEP_dgmDvr *  dvr  ) 

Frees the QSEP datagram driver context.

Parameters:
dvr The datagram context to destruct

const unsigned int * QSEP_dgmDvrPrmsConstruct ( unsigned int *  prms,
int  nevents,
int  nskip 
)

Convenience routine to construct the QSE driver parameter list.

Return values:
NULL If the list is empty, i.e. nevents is specified to process all the events and nskip is specified as 0
non - NULL If either nevents is not specified to process all the events or nskip is non-zero
Parameters:
prms Pointer to an array of 32-bit words to hold the list The maximum size of this list is 5 32-bit words
nevents The number of events to process. If this is specified as -1, then no limit will be configured
nskip The number of events to skip. If this is specified as 0, then no skip parameter will be configured.

const unsigned int * QSEP_dgmDvrPrmsShrConstruct ( unsigned int *  prms,
int *  pevents,
int *  pskip 
)

Convenience routine to construct the QSE driver parameter list for shared parameters. These are parameters that are potentially shared by multiple QSEP_dgmDvr's.

Return values:
NULL If the list is empty, i.e. nevents is specified to process all the events and nskip is specified as 0
non - NULL If either nevents is not specified to process all the events or nskip is non-zero
Parameters:
prms Pointer to an array of 32-bit words to hold the list The maximum size of this list is 5 32-bit words
pevents Pointer to the number of events to process. If this is specified as NULL, then no limit will be configured
pskip Pointer to The number of events to skip. If this is specified as 0, then no skip parameter will be configured.

int QSEP_dgmDvrSizeof ( int  resource_level,
void *  qsepCfg,
const unsigned int *  qseDgmDvrCfg 
)

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

Returns:
The size, in bytes, of the control handle.
Parameters:
resource_level The QSEP resource level
qsepCfg The QSEP configuration parameters, may be NULL
qseDgmDvrCfg The QSE datagram driver configuration, may be NULL
The amount of memory returned by this routine should be allocated by caller and passed, along with prm, to construction routine

References RND_TO.


Generated on Fri Nov 30 10:50:01 2012 by  doxygen 1.5.8