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_utils.c File Reference

Utility routines for the QCFG facility. More...

#include "QCFG/QCFG.h"
#include "QCFG/QCFG_msgs.h"
#include "RIM/RIM.h"
#include "XLX/XLX.h"
#include "MSG/MSG_pubdefs.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <wordexp.h>

Include dependency graph for QCFG_utils.c:


Functions

unsigned QCFG_filterCollect (const char *filt, unsigned int *fMask)
 Generate filter mask from list of type names.
void QCFG_genTypeMasks (RIM *rim, int type, unsigned int *dMask, unsigned int *eMask)
 Generate type masks of requested present data.
int QCFG_getOptns (int argc, char *const *argv, const char *optStr, QCFG_cmdOptns *optns)
 Get command line options and parameters.
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.

Detailed Description

Utility routines for the QCFG facility.

Author:
Owen Saxton
Id
QCFG_utils.c,v 1.8 2008/12/16 21:28:03 saxton Exp

Function Documentation

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.

void QCFG_genTypeMasks RIM *  rim,
int  type,
unsigned int *  dMask,
unsigned int *  eMask
 

Generate type masks of requested present data.

Given a file type, this routine generates two bitmasks, one each for defaults and exception, indicating which types are to be inserted into the generated output stream. If there is no data for a particular file type, the masks will both be zero.

Parameters:
rim Pointer to the in-memory model data
type The type of output to be generated.
dMask The address of the generated defaults mask.
eMask The address of the generated exception mask.

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_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.


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