GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QCFG / V1-1-3 > qcfg / sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

QCFG_create.c File Reference

Functions that create binary configuration files. More...

#include <QCFG_p.h>
#include <QCFG/QCFG_msgs.h>
#include <RIM/RIM.h>
#include <RIM/RIM_msgs.h>
#include <MSG/MSG_pubdefs.h>
#include <PBS/MBA.h>
#include <string.h>
#include <stdio.h>

Functions

static unsigned exportMask (RIM *rim, int type)
 Generate a type mask for RIM_export.
unsigned QCFG_createMap (RIM_map *map, const char *filename)
 Write out the data of a RIM map structure.
unsigned QCFG_create (RIM *rim, unsigned filter, const char *stub)
 Create a set of binary configuration files based on the contents of the rim, using stub as the stub of the output file names.


Detailed Description

Functions that create binary configuration files.

Author:
James Swain & Owen Saxton
$Id: QCFG_create.c,v 1.6 2011/03/29 21:47:53 saxton Exp $

Function Documentation

unsigned exportMask ( RIM *  rim,
int  type 
) [static]

Generate a type mask for RIM_export.

Given a file type, this routine generates a bitmask indicating which types are to be inserted into the file by RIM_export. If there is no data for a particular file type, the mask will be zero.

Parameters:
rim Pointer to the in-memory model data
type The type of file to be created.
Returns:
Bit mask indicating the types of files that can be created

References QCFG_genTypeMasks().

Referenced by QCFG_create().

unsigned QCFG_create ( RIM *  rim,
unsigned  filter,
const char *  stub 
)

Create a set of binary configuration files based on the contents of the rim, using stub as the stub of the output file names.

Parameters:
rim RIM structure used as the basis of the binary configuration
stub Stub to use as a basis for the output filenames
filter Bitmask of LAT component files to create
Return values:
QCFG_SUCCESS Success
QCFG_BADFOPEN A file could not be opened
QCFG_BADWRITE An error occured while writing a file
QCFG_BADCLOSE A file close failed
QCFG_BADALLOC No memory available for temporary name

References exportMask(), QCFG_fioClose(), QCFG_fioCreate(), QCFG_fioWriteData(), and QCFG_fioWriteRecd().

Referenced by QCFG_parse().

unsigned QCFG_createMap ( RIM_map *  map,
const char *  filename 
)

Write out the data of a RIM map structure.

Parameters:
map Pointer to the RIM_map whose data should be written to file
filename Name of the destination file
Return values:
QCFG_SUCCESS Success
QCFG_BADFOPEN The file could not be opened.
QCFG_BADWRITE An error occured while writing the file
QCFG_BADCLOSE The file close failed

References QCFG_fioClose(), QCFG_fioCreate(), QCFG_fioWriteData(), and QCFG_fioWriteRecd().

Referenced by QCFG_parseMap().


Generated on Wed Nov 21 22:35:53 2012 by  doxygen 1.5.8