GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSE / V2-4-1 > qsedgm / rhel5-32


Interface   Data Structures   File List   Data Fields   Globals  

QSE_dgmDvr.c File Reference

Dumps events. More...

#include <QSE/QSE_dgmDvr.h>
#include <QSE/QSE_update.h>
#include <QSE/QSE_evt.h>
#include <QSE/QSE_dgmEventSkip.h>
#include <LSE/LSE_stdCtb.h>
#include <LSE/LSE_ids.h>
#include <LSF/LSF.h>
#include <LSF/LSF_scan.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

Classes

struct  _QSE_dgmDvr
 Datagram context. More...

Typedefs

typedef struct _QSE_dgmDvr QSE_dgmDvr
 struct _QSE_dgmDvr

Functions

static LSF_scanRecordHandler evt_contribution_handler (QSE_dgmDvr *dvr, const LSF_contribution *ctb)
 Handles the specified contribution.
static unsigned int evt_record_handler (QSE_dgmDvr *dvr, const LSF_record *rec)
 Handles the specified event record.
static unsigned int handle_dgm_noop (void *stream, const LSF_datagram *dgm, void *qsex)
 Noop routine to handle a datatgram. This is used when no datagram handling routine was provided.
static unsigned int handle_ctb_noop (void *stream, const LSF_contribution *ctb, void *qsex)
 Noop routine to handle a contribution. This is used when no contribution handling routine was provided.
static unsigned int handle_rec_noop (void *stream, const LSF_record *rec, void *qsex)
 Noop routine to handle a record. This is used when no routine handling routine was provided.
static const unsigned int * load_ptr (int **ptr, const unsigned int *cfg)
 Load a pointer from the configuration array.
unsigned int QSE_dgmDvrSizeof (const unsigned int *cfg)
 Returns the size, in bytes of a QSE_dgmDvr structure.
QSE_dgmDvrQSE_dgmDvrConstruct (QSE_dgmDvr *dvr, const unsigned int *dvr_cfg, QSE_updateAtDatagram update_dgm, QSE_updateAtContribution update_ctb, QSE_updateAtRecord update_rec, void *update_ctx, QSE_dgmDvrDgm handle_dgm, QSE_dgmDvrCtb handle_ctb, QSE_dgmDvrRec handle_rec, void *handle_ctx)
 Constructs/initializes the datagram context control block.
int QSE_dgmDvrProcess (QSE_dgmDvr *dvr, const LSF_datagram *dgms, int dgms_len)
 Convenience routine for the CCSDS_istreamProcess routine.
LSF_scanContributionHandler QSE_dgmDvrDatagram (QSE_dgmDvr *dvr, const LSF_datagram *dgm)
 Handles each datagram.
void QSE_dgmDvrDestruct (QSE_dgmDvr *dvr)
 Frees the QSE datagram driver context.
const QSE_dgmDvrStatsQSE_dgmDvrStatsLocate (QSE_dgmDvr *dvr)
 Retrieves a pointer to the statistics.
void QSE_dgmDvrStatsClear (QSE_dgmDvr *dvr)
 Clears the datagram driver statistics.


Detailed Description

Dumps events.

Author:
JJRussell - russell@slac.stanford.edu

   CVS $Id: QSE_dgmDvr.c,v 1.5 2011/03/27 01:45:45 russell Exp $

Function Documentation

LSF_scanRecordHandler evt_contribution_handler ( QSE_dgmDvr dvr,
const LSF_contribution *  ctb 
) [static]

static unsigned int evt_record_handler ( QSE_dgmDvr dvr,
const LSF_record *  rec 
) [static]

static unsigned int handle_ctb_noop ( void *  stream,
const LSF_contribution *  ctb,
void *  qsex 
) [static]

Noop routine to handle a contribution. This is used when no contribution handling routine was provided.

Returns:
QSE_DGMDVR_FATE_K_CONTINUE, always
Parameters:
stream The apid stream context (ignored)
ctb The datagram contribution (ignored)
qsex The QSEP/QSEC context (ignored)

References QSE_DGMDVR_FATE_K_CONTINUE.

Referenced by QSE_dgmDvrConstruct().

static unsigned int handle_dgm_noop ( void *  stream,
const LSF_datagram *  dgm,
void *  ctx 
) [static]

Noop routine to handle a datatgram. This is used when no datagram handling routine was provided.

Returns:
QSE_DGMDVR_FATE_K_CONTINUE, always
Parameters:
stream The apid stream context (ignored)
dgm The datagram (ignored)
ctx The QSEP/QSEC context (ignored)

References QSE_DGMDVR_FATE_K_CONTINUE.

Referenced by QSE_dgmDvrConstruct().

static unsigned int handle_rec_noop ( void *  astream,
const LSF_record *  rec,
void *  ctx 
) [static]

Noop routine to handle a record. This is used when no routine handling routine was provided.

Returns:
QSE_DGMDVR_FATE_K_CONTINUE, always
Extracts and writes the contents of the event
Parameters:
astream The apid stream context (ignored)
rec The LSF record containing the event (ignored)
ctx The QSEP/QSEC context (ignored)

References QSE_DGMDVR_FATE_K_CONTINUE.

Referenced by QSE_dgmDvrConstruct().

static const unsigned int * load_ptr ( int **  ptr,
const unsigned int *  cfg 
) [static]

Load a pointer from the configuration array.

Returns:
The advanced cfg pointer
Parameters:
[out] ptr The storage for the pointer
[in] cfg The configuration array

Referenced by QSE_dgmDvrConstruct().

QSE_dgmDvr * QSE_dgmDvrConstruct ( QSE_dgmDvr dvr,
const unsigned int *  dvr_cfg,
QSE_updateAtDatagram  update_dgm,
QSE_updateAtContribution  update_ctb,
QSE_updateAtRecord  update_rec,
void *  update_ctx,
QSE_dgmDvrDgm  handle_dgm,
QSE_dgmDvrCtb  handle_ctb,
QSE_dgmDvrRec  handle_rec,
void *  handle_ctx 
)

Constructs/initializes the datagram context control block.

Returns:
Pointer to the construct datagram driver context
Parameters:
dvr The datagram context to construct/initialize, if this is NULL, a QSE_dgmDvr context will be allocated using malloc.
dvr_cfg The driver configuration parameters, may be NULL
update_dgm The QSEP/QSEC update at datagram routine
update_ctb The QSEP/QSEC update at contribution routine
update_rec The QSEP/QSEC update at record routine
update_ctx The update routines' context parameter
handle_dgm The user routine to handle a datagram
handle_ctb The user routine to handle a contribution
handle_rec The user routine to handle a record
handle_ctx The user handler routines' context parameter

References _QSE_dgmDvr::free, _QSE_dgmDvr::handle_ctb, handle_ctb_noop(), _QSE_dgmDvr::handle_ctx, _QSE_dgmDvr::handle_dgm, handle_dgm_noop(), _QSE_dgmDvr::handle_rec, handle_rec_noop(), load_ptr(), _QSE_dgmDvr::nctb, _QSE_dgmDvr::nprocess, _QSE_dgmDvr::nskip, _QSE_dgmDvr::pprocess, _QSE_dgmDvr::pskip, QSE_DGMDVR_PRM_K_ECOUNT, QSE_DGMDVR_PRM_K_END, QSE_DGMDVR_PRM_K_ESKIP, QSE_DGMDVR_PRM_K_PCOUNT, QSE_DGMDVR_PRM_K_PSKIP, _QSE_dgmDvr::stats, _QSE_dgmDvr::update_ctb, _QSE_dgmDvr::update_ctx, _QSE_dgmDvr::update_dgm, and _QSE_dgmDvr::update_rec.

LSF_scanContributionHandler QSE_dgmDvrDatagram ( QSE_dgmDvr dvr,
const LSF_datagram *  dgm 
)

void QSE_dgmDvrDestruct ( QSE_dgmDvr dvr  ) 

Frees the QSE datagram driver context.

Parameters:
dvr The datagram context to destruct

References _QSE_dgmDvr::free.

int QSE_dgmDvrProcess ( QSE_dgmDvr dvr,
const LSF_datagram *  dgms,
int  dgms_len 
)

Convenience routine for the CCSDS_istreamProcess routine.

Return values:
== 0 Continue
!= 0 Stop
Parameters:
dvr The driver context parameter
dgms The datagrams to handle
dgms_len The length of the datagram

References QSE_dgmDvrDatagram().

unsigned int QSE_dgmDvrSizeof ( const unsigned int *  cfg  ) 

Returns the size, in bytes of a QSE_dgmDvr structure.

Returns:
The size, in bytes of a QSE_dgmDvr structure
Parameters:
cfg The datagram configuration list. This is a variable length list containing various configuration parameters. See the QSE__dgmDvrCfg routines for what can be specified and how to build this list.

void QSE_dgmDvrStatsClear ( QSE_dgmDvr dvr  ) 

Clears the datagram driver statistics.

Parameters:
dvr Datagram driver context parameter

References _QSE_dgmDvr::stats.

const QSE_dgmDvrStats * QSE_dgmDvrStatsLocate ( QSE_dgmDvr dvr  ) 

Retrieves a pointer to the statistics.

Returns:
A readonly pointer to the statistics
Parameters:
dvr Datagram driver context parameter

References _QSE_dgmDvr::stats.


Generated on Fri Nov 30 11:36:53 2012 by  doxygen 1.5.8