GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > QCFG / V1-0-5

Constituent: qcfg     Tag: linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

QCFG_ingest.c File Reference

Functions to retrieve, and optionally print, captured RIMs from a set of datagrams. More...

#include "RIM/RIM.h"
#include "QCFG_p.h"
#include "QCFG/QCFG_msgs.h"
#include "DUMP/dump.h"
#include "LSF/LSF.h"
#include "LSF/LSF_ids.h"
#include "LSF/LSF_scan.h"
#include "MSG/MSG_pubdefs.h"
#include "PBS/MBA.h"
#include <string.h>

Include dependency graph for QCFG_ingest.c:


Data Structures

struct  _QCFG_ctl
 Structure holding the in-memory model and callback info. More...
struct  _QCFG_dgmParm
 Datagram parameter block. More...

Typedefs

typedef _QCFG_ctl QCFG_ctl
 Structure holding the in-memory model and callback info.
typedef _QCFG_dgmParm QCFG_dgmParm
 Datagram parameter block.

Functions

static LSF_scanContributionHandler procDgm (ApidStream *astream, const LSF_datagram *dgm)
 Process a datagram.
static unsigned getRecd (void *vParm, unsigned *type, int *leng)
 Get a record header.
static unsigned getData (void *vParm, void *data, int leng, int *rLeng)
 Get record data.
unsigned QCFG_ingest (RIM *rim, const char *filename, QCFG_rimProcCB procRtn, void *parm)
 Process a file of LAT configuration datagrams.

Detailed Description

Functions to retrieve, and optionally print, captured RIMs from a set of datagrams.

Author:
James Swain & Owen Saxton
Id
QCFG_ingest.c,v 1.1 2007/11/12 20:06:44 saxton Exp

Function Documentation

unsigned getData void *  vParm,
void *  data,
int  leng,
int *  rLeng
[static]
 

Get record data.

This routine, designed to work in conjunction with RIM_export, gets the next block of data from the datagram, making sure that it will not overflow the current record.

Parameters:
vParm The address of the file parameter block
data The address of the area to receive the data.
leng The number of bytes of data to get.
rLeng The address of an integer to receive the number of bytes actually obtained.
Return values:
QCFG_SUCCESS Success
QCFG_CTBSHRT Request extends beyond end of contribution

unsigned getRecd void *  vParm,
unsigned *  type,
int *  leng
[static]
 

Get a record header.

This routine, designed to work in conjunction with RIM_export, gets the next record (contribution) header from the datagram.

Parameters:
vParm The address of the datagram parameter block
type The address of an integer to receive the record type.
leng The address of an integer to receive the record length, in bytes. This is set to 0 if the end of the datagram was reached, or to -1 for other error conditions.
Return values:
QCFG_SUCCESS Success
QCFG_EOFREAD End of datagram was reached
QCFG_DGMSHRT Partial header was obtained

LSF_scanContributionHandler procDgm ApidStream *  astream,
const LSF_datagram *  dgm
[static]
 

Process a datagram.

This routine is called for each datagram found in the packet file. It assumes that a datagram contains the complete dump of the LAT registers and retrieves and prints out the register values.

Parameters:
astream The APID stream
dgm The datagram
Returns:
Either a stop scan signal or the contribution handler

unsigned QCFG_ingest RIM *  rim,
const char *  filename,
QCFG_rimProcCB  procRtn,
void *  parm
 

Process a file of LAT configuration datagrams.

This routine reads a file of LAT configuration datagrams and populates a RIM structure with each datagram. An optional callback routine may be called to process the contents of the RIM each time.

Parameters:
rim In-memory model to populate
filename Name of the file to use as the source of dgms
procRtn Routine to call to process the RIM each time it is populated from a new datagram. May be NULL.
parm User parameter to pass to the callback routine.
Returns:
Overall status
< The read buffer


Generated on Wed Oct 29 01:22:02 2008 by  doxygen 1.4.4