GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSE / V2-3-0 > qsedgm / linux-gcc


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.
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.4 2009/06/19 17:15:48 russell Exp $

Function Documentation

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

Handles the specified contribution.

Return values:
0,indicating to continue the scan
Parameters:
dvr Datagram driver context parameter
ctb The contribution to handle

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

Handles the specified event record.

Return values:
0,indicating to continue the scan
Parameters:
dvr Datagram driver context parameter
rec The record to print

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)

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)

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)

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

LSF_scanContributionHandler QSE_dgmDvrDatagram ( QSE_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 QSE_dgmDvrDestruct ( QSE_dgmDvr dvr  ) 

Frees the QSE datagram driver context.

Parameters:
dvr The datagram context to destruct

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

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

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


Generated on Thu Sep 2 14:38:42 2010 by  doxygen 1.5.3