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

Constituent: qcfg     Tag: sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

QCFG.h File Reference

Public definitions for the ground configuration (QCFG) programs. More...

#include "RIM/RIM.h"

Include dependency graph for QCFG.h:

This graph shows which files directly or indirectly include this file:


Data Structures

struct  _QCFG_cmdOptns
 Command line options block. More...

Typedefs

typedef _QCFG_cmdOptns QCFG_cmdOptns
 Command line options block.
typedef int QCFG_rimProcCB (RIM *rim, unsigned int secs, void *parm)
 Callback routine for processing a populated RIM.

Functions

unsigned QCFG_consume (RIM *rim, const char *const *filelist, int nFile)
 Read a configuration into a RIM structure.
unsigned QCFG_consumeMap (RIM_map *map, const char *filename)
 Read map data into the map structure.
unsigned QCFG_filterCollect (const char *filt, unsigned int *fMask)
 Generate filter mask from list of type names.
int QCFG_getOptns (int argc, char *const *argv, const char *optStr, QCFG_cmdOptns *optns)
 Get command line options and parameters.
unsigned QCFG_ingest (RIM *rim, const char *filename, QCFG_rimProcCB procRtn, void *parm)
 Process a file of LAT configuration datagrams.
unsigned QCFG_makeFileList (const char *stem, const char *filt, int *nFile, const char *const **pFList)
 Make file name list.
void QCFG_msgInit (void)
 Initialize the message system.
RIM * QCFG_newRIM (void)
 Allocate and construct a RIM structure.
RIM_map * QCFG_newRIMmap (void)
 Allocate and construct a RIM_map structure.
unsigned QCFG_parse (const char *const *filelist, int nFile, const char *stub, unsigned int fMask, int verb)
 Parse a set of XML files and create the binary configuration files.
unsigned QCFG_parseMap (const char *const *filelist, int nFile, const char *outname, int verb)
 Read XML describing a map of the LAT components and create the equivalent binary file.

Detailed Description

Public definitions for the ground configuration (QCFG) programs.

Author:
James Swain & Owen Saxton
Id
QCFG.h,v 1.3 2008/12/16 21:11:54 saxton Exp

Function Documentation

unsigned QCFG_consume RIM *  rim,
const char *const *  filelist,
int  nFile
 

Read a configuration into a RIM structure.

The supplied list of binary configuration files is read into the supplied RIM structure.

Parameters:
rim Pointer to the RIM to repopulate with the configuration information
filelist List of binary configuration files
nFile Number of binary configuration files
Return values:
QCFG_SUCCESS Success
QCFG_BADFOPEN The file could not be opened.
QCFG_BADVERSN The file contained a bad version number
QCFG_BADREAD An error occured while reading the file

unsigned QCFG_consumeMap RIM_map *  map,
const char *  filename
 

Read map data into the map structure.

Parameters:
map Map structure to populate from file
filename Name of the binary map file to consume
Return values:
QCFG_SUCCESS Success
QCFG_BADFOPEN The file could not be opened.
QCFG_BADREAD An error occured while reading the file

unsigned QCFG_filterCollect const char *  filt,
unsigned int *  fMask
 

Generate filter mask from list of type names.

Parameters:
filt The string consisting of the filter specifications.
fMask The address of a word to receive the filter mask.
Return values:
QCFG_SUCCESS The string is valid
QCFG_BADTYPNM The string contains an unrecognized type.

int QCFG_getOptns int  argc,
char *const *  argv,
const char *  optStr,
QCFG_cmdOptns optns
 

Get command line options and parameters.

Parameters:
argc Number of command-line arguments
argv List of command line arguments
optStr Address of string of valid options
optns Address of options block to be filled
Return values:
0 Success
1 Help requested
-1 An error occurred

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

unsigned QCFG_makeFileList const char *  stem,
const char *  filt,
int *  nFile,
const char *const **  pFList
 

Make file name list.

A list of file names is generated from a file name stem and a comma- separated list of three-letter configuration filter type names. Only files that exist are include in the list.

Parameters:
stem The address of the file name stem. This may contain a single "%" character, in which case a list of names is generated with each of the names in filt in turn being substituted for "%". If no "% character is present, it is as if the string "%.lcb" were appended to stem. If the address is NULL, no list is generated.
filt The address of the string consisting of the filter specifications separated by commas. If NULL, all valid filter names are used.
nFile The address of a word to receive the number of files in the generated list.
pFList The address of a pointer to receive the address of the generated file name list, allocated from the heap. This should be freed when no longer needed, using free().
Return values:
QCFG_SUCCESS Success
QCFG_EXPNFAIL The search for matching files failed
QCFG_BADTYPNM The filter contains an unrecognized type.

void QCFG_msgInit void   ) 
 

Initialize the message system.

This routine initializes the message system so that it can be used.

RIM* QCFG_newRIM void   ) 
 

Allocate and construct a RIM structure.

Returns:
Pointer to an allocated and constructed RIM structure

RIM_map* QCFG_newRIMmap void   ) 
 

Allocate and construct a RIM_map structure.

Returns:
Pointer to an allocated and constructure RIM_map structure

unsigned QCFG_parse const char *const *  filelist,
int  nFile,
const char *  stub,
unsigned int  fMask,
int  verb
 

Parse a set of XML files and create the binary configuration files.

Parameters:
filelist List of strings containing the names of XML files to parse
nFile Number of XML files to parse
stub Filename stub to use a basis for output filenames
fMask Bit mask of the components for which to create output files
verb 1 for verbose, 0 for quiet
Return values:
QCFG_SUCCESS If all goes well
QCFG_BADALLOC If there is an error allocating memory
QCFG_BADWRITE if one of the file write operations failed
QCFG_BADOPEN if the file fails to open
QCFG_BADCLOSE if the file close failed
QCFG_XMLPARSE if there is an error parsing the XML

unsigned QCFG_parseMap const char *const *  filelist,
int  nFile,
const char *  outname,
int  verb
 

Read XML describing a map of the LAT components and create the equivalent binary file.

Parameters:
filelist List of strings containing the names of XML files to parse
nFile Number of XML files to parse
outname Name of the output file
verb 1 for verbose, 0 for quiet
Return values:
QCFG_SUCCESS if all goes well
QCFG_BADALLOC If there is an error allocating memory
QCFG_BADWRITE if writing to the file failed
QCFG_BADOPEN if the file fails to open
QCFG_BADCLOSE if the file close failed
QCFG_XMLPARSE if there is an error parsing the XML


Generated on Wed Dec 17 01:33:54 2008 by  doxygen 1.4.4