GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LATC / dev > reg_parser / rhel4-32


Interface   Data Structures   File List   Data Fields   Globals  

files.c File Reference

Structures and functions associated with the files produced by the LRD parser. More...

#include <LATC/LATC_msgs.h>
#include <files_p.h>
#include <fileUtils_p.h>
#include <lString_p.h>
#include <LEM/msg_macros.h>
#include <PBS/MBA.h>
#include <string.h>
#include <stdlib.h>

Defines

#define BAIL_OUT(code, time, nprm, args...)
 Report an error and then exit.
#define CHECK_BAIL(fn)
 If the function returns an error code then exit.

Enumerations

enum  {
  IS_IMPL = 0,
  IS_HEADER = 1
}
enum  { INITIAL_STACK_LIMIT = 8 }

Functions

void init_filelatcType (FilelatcType *file)
 Initialise the file structure by opening the file, writing some intial statements to it and initialising any lists.
void scpt_filelatcType (FilelatcType *file, const char *name)
 Add the compoment name to the list of names held in the structure.
void sreg_filelatcType (FilelatcType *file)
 NO-OP.
void sfld_filelatcType (FilelatcType *file)
 NO_OP.
void ereg_filelatcType (FilelatcType *file)
 NO_OP.
void ecpt_filelatcType (FilelatcType *file)
 NO_OP.
void fini_filelatcType (FilelatcType *file)
 Write out an array of component name strings using the list of strings held in the structure, then close the file.
void init_fileTypeEnum (FileTypeEnum *file)
 Initialise the file structure by opening the file, writing some intial statements to it and initialising any lists.
void scpt_fileTypeEnum (FileTypeEnum *file, const char *name)
 Add the component name to the list of held in the file structure.
void sreg_fileTypeEnum (FileTypeEnum *file)
 NO_OP.
void sfld_fileTypeEnum (FileTypeEnum *file)
 NO_OP.
void ereg_fileTypeEnum (FileTypeEnum *file)
 NO_OP.
void ecpt_fileTypeEnum (FileTypeEnum *file)
 NO_OP.
void fini_fileTypeEnum (FileTypeEnum *file)
 Write out an enumeration of the component types using the list held in the file structure, then close the file.
void init_fileRegEnum (FileRegEnum *file)
 Initialise the file structure by opening the file, writing some intial statements to it and initialising any lists.
void scpt_fileRegEnum (FileRegEnum *file)
 NO_OP.
void sreg_fileRegEnum (FileRegEnum *file)
 NO_OP.
void sfld_fileRegEnum (FileRegEnum *file)
 NO_OP.
void ereg_fileRegEnum (FileRegEnum *file)
 NO_OP.
void ecpt_fileRegEnum (FileRegEnum *file, L_head *enums)
 Write out an enumeration of the registers within a component.
void fini_fileRegEnum (FileRegEnum *file)
 Close the file.
void init_fileFldEnum (FileFldEnum *file)
 Initialise the file structure by opening the file, writing some intial statements to it and initialising any lists.
void scpt_fileFldEnum (FileFldEnum *file)
 NO_OP.
void sreg_fileFldEnum (FileFldEnum *file, const char *cptName, const char *regName)
 Start an enumeration of the fields inside this register, begining with a special "register" field that represents the whole register.
void sfld_fileFldEnum (FileFldEnum *file, const char *cptName, const char *regName, const char *fldName, unsigned nFld)
 Write out an enumeration for the field.
void ereg_fileFldEnum (FileFldEnum *file)
 Finish off the enumeration.
void ecpt_fileFldEnum (FileFldEnum *file)
 NO_OP.
void fini_fileFldEnum (FileFldEnum *file)
 Close the file.
void init_fileDescription (FileDescription *file)
 Initialise the file structure by opening the file, writing some intial statements to it and initialising any lists.
void scpt_fileDescription (FileDescription *file, const char *name)
 Add the component name to the list held in the file structure.
void sreg_fileDescription (FileDescription *file, const char *cptName, const char *regName, unsigned regWidth)
 Start an array of Field Descriptions for this register, begining with the special "register" field that holds the whole register.
void sfld_fileDescription (FileDescription *file, unsigned width, unsigned offset)
 Add an element to the array of Field Descriptions for this field.
void ereg_fileDescription (FileDescription *file)
 Close out the array of Field Descriptions.
void ecpt_fileDescription (FileDescription *file, L_head *regs, const char *name, unsigned regWidth, unsigned nReg)
 Write out the Register and Component Descriptions.
void fini_fileDescription (FileDescription *file)
 Write out an array of Component Descriptions to complete the LAT description and close the file.
void init_fileXMLTags (FileXMLTags *file)
 Initialise the file structure by opening the file, writing some intial statements to it and initialising any lists.
void scpt_fileXMLTags (FileXMLTags *file)
 NO_OP.
void sreg_fileXMLTags (FileXMLTags *file, const char *cptName, const char *regName)
 Print out the structure defining the XML tag for this register.
void sfld_fileXMLTags (FileXMLTags *file, const char *cptName, const char *regName, const char *fldName)
 Print out the structure defining the XML tag for this field.
void ereg_fileXMLTags (FileXMLTags *file, const char *cptName, const char *regName)
 Print out the array of children for this register and the register tag.
void ecpt_fileXMLTags (FileXMLTags *file, L_head *children, const char *tag, const char *base_name)
 Print out the structures defining the XML tags associated with this component.
void fini_fileXMLTags (FileXMLTags *file)
 Finish off the XML vocabulary for the latc_parser by writing out an array of tags that are children of the document element, the base tags.
void init_fileXMLDTD (FileXMLDTD *file)
 Initialise the file structure by opening the file, writing some intial statements to it and initialising any lists.
void scpt_fileXMLDTD (FileXMLDTD *file, const char *base_name)
 If this component has no parent then base_name is not NULL and should be added the list of base tags.
void sreg_fileXMLDTD (FileXMLDTD *file, L_head *cptDtd, const char *regName)
 Add this register to the list of elements contained by the parent component.
void sfld_fileXMLDTD (FileXMLDTD *file, const char *fldName)
 Add the field name to the list of field names held in the file structure and add an XML element declaration to the list of field elements held in this structure.
void ereg_fileXMLDTD (FileXMLDTD *file, const char *regName)
 Add a declaration of the register element to the list of strings making up the DTD.
void ecpt_fileXMLDTD (FileXMLDTD *file, const char *cptName, L_head *dtdCpt, unsigned multi)
 Write out the component portion of the DTD.
void fini_fileXMLDTD (FileXMLDTD *file)
 Write out the complete DTD and close the file.
void init_fileMapTags (FileMapTags *file)
 Initialise the file structure by opening the file, writing some intial statements to it and initialising any lists.
void scpt_fileMapTags (FileMapTags *file)
 NO_OP.
void sreg_fileMapTags (FileMapTags *file)
 NO_OP.
void sfld_fileMapTags (FileMapTags *file)
 NO_OP.
void ereg_fileMapTags (FileMapTags *file)
 NO_OP.
void ecpt_fileMapTags (FileMapTags *file, L_head *children, const char *tag, const char *base_name)
 Print out the structures defining the Map tags associated with this component.
void fini_fileMapTags (FileMapTags *file)
 Finish off the Map vocabulary for the latc_parser by writing out an array of tags that are children of the document element, the base tags.
void init_fileMapDTD (FileMapDTD *file)
 Initialise the file structure by opening the file, writing some intial statements to it and initialising any lists.
void scpt_fileMapDTD (FileMapDTD *file, const char *base_name)
 If this component has no parent then base_name is not NULL and should be added the list of base tags.
void sreg_fileMapDTD (FileMapDTD *file)
 NO_OP.
void sfld_fileMapDTD (FileMapDTD *file)
 NO_OP.
void ereg_fileMapDTD (FileMapDTD *file)
 NO_OP.
void ecpt_fileMapDTD (FileMapDTD *file, const char *cptName, L_head *dtdCpt)
 Write out the component portion of the DTD.
void fini_fileMapDTD (FileMapDTD *file)
 Write out the complete DTD and close the file.
void init_fileTree_c (FileTree_c *file)
 Initialise the file structure by opening the file, writing some intial statements to it and initialising any lists.
void scpt_fileTree_c (FileTree_c *file, const char *name)
 Add the component name to the list held in the file structure.
void sreg_fileTree_c (FileTree_c *file)
 NO_OP.
void sfld_fileTree_c (FileTree_c *file)
 NO_OP.
void ereg_fileTree_c (FileTree_c *file)
 NO_OP.
void ecpt_fileTree_c (FileTree_c *file)
 NO_OP.
void fini_fileTree_c (FileTree_c *file)
 Write out the initTree function and close the file.
void init_fileTree_h (FileTree_h *file)
 Initialise the file structure by opening the file, writing some intial statements to it and initialising any lists.
void scpt_fileTree_h (FileTree_h *file, const char *name)
 Add the component name to the list held in the file structure.
void sreg_fileTree_h (FileTree_h *file)
 NO_OP.
void sfld_fileTree_h (FileTree_h *file)
 NO_OP.
void ereg_fileTree_h (FileTree_h *file)
 NO_OP.
void ecpt_fileTree_h (FileTree_h *file)
 NO_OP.
void fini_fileTree_h (FileTree_h *file)
 Write out the LATCtree structure and close the file.
void init_fileNumber (FileNumber *file)
 Initialise the file structure by opening the file, writing some intial statements to it and initialising any lists.
void scpt_fileNumber (FileNumber *file, const char *name, unsigned multi)
 Add the name and maximum ID for this component to the lists held in the file structure and update the array describing the acceptable ranges of the address indicies.
void sreg_fileNumber (FileNumber *file)
 NO_OP.
void sfld_fileNumber (FileNumber *file)
 NO_OP.
void ereg_fileNumber (FileNumber *file)
 NO_OP.
void ecpt_fileNumber (FileNumber *file)
 Peel back the hierarchy by decrementing the index and clearing one element of the addrRng array.
void fini_fileNumber (FileNumber *file)
 Write out the eumerations giving the number of LAT components and an array connnecting these enums to the LAT component types, then close the file.
void init_fileLEM (FileLEM *file)
 Initialise the file structure by opening the file, writing some intial statements to it and initialising any lists.
void scpt_fileLEM (FileLEM *file, const char *name)
 Add the component name to the list held in the file structure.
void sreg_fileLEM (FileLEM *file)
 NO_OP.
void sfld_fileLEM (FileLEM *file)
 NO_OP.
void ereg_fileLEM (FileLEM *file)
 NO_OP.
void ecpt_fileLEM (FileLEM *file)
 NO_OP.
void fini_fileLEM (FileLEM *file)
 Write out arrays connected load and read functions to LAT component types.
void init_fileAddr (FileAddr *file)
 Initialise the file structure by opening the file, writing some intial statements to it and initialising any lists.
void scpt_fileAddr (FileAddr *file, unsigned multi)
 Adds the address range to the list.
void sreg_fileAddr (FileAddr *file)
 NO_OP.
void sfld_fileAddr (FileAddr *file)
 NO_OP.
void ereg_fileAddr (FileAddr *file)
 NO_OP.
void ecpt_fileAddr (FileAddr *file)
 Decrements the index indicating depth in the hierarchy and clears the relevant addr bit.
void fini_fileAddr (FileAddr *file)
 Write out an array indicating the accptable ranges of address indicies for each LAT component.

Variables

static const Filenames rfn
 Definition of the filenames used by the parser.


Detailed Description

Structures and functions associated with the files produced by the LRD parser.

Author:
James Swain & Owen Saxton
Id
files.c,v 1.4 2011/04/08 00:20:44 apw Exp

Define Documentation

#define BAIL_OUT ( code,
time,
nprm,
args...   ) 

#define CHECK_BAIL ( fn   ) 

Value:

{\
  unsigned status = fn; \
  if(_msg_failure(status)) \
    exit(status);\
}
If the function returns an error code then exit.

Parameters:
fn Function whose response is to be checked

Referenced by init_fileAddr(), init_fileDescription(), init_fileFldEnum(), init_filelatcType(), init_fileLEM(), init_fileMapTags(), init_fileNumber(), init_fileRegEnum(), init_fileTree_c(), init_fileTree_h(), init_fileTypeEnum(), and init_fileXMLTags().


Function Documentation

void ecpt_fileAddr ( FileAddr file  ) 

Decrements the index indicating depth in the hierarchy and clears the relevant addr bit.

Parameters:
file Pointer to structure holding the data required for creating this file

References FileAddr::addrRng, and FileAddr::index.

Referenced by ecpt_regState().

void ecpt_fileDescription ( FileDescription file,
L_head *  regs,
const char *  name,
unsigned  regWidth,
unsigned  nReg 
)

Write out the Register and Component Descriptions.

Parameters:
file Pointer to structure holding the data required for creating this file
regs List of strings used to construct the Register Description
name Component name
regWidth Number of bits in the registers of this component
nReg Number of registers in this component

References FileDescription::fp, and print_list().

Referenced by ecpt_regState().

void ecpt_fileFldEnum ( FileFldEnum file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by ecpt_regState().

void ecpt_filelatcType ( FilelatcType file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by ecpt_regState().

void ecpt_fileLEM ( FileLEM file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by ecpt_regState().

void ecpt_fileMapDTD ( FileMapDTD file,
const char *  cptName,
L_head *  dtdCpt 
)

Write out the component portion of the DTD.

Parameters:
file Pointer to structure holding the data required for creating this file
cptName Component name
dtdCpt List of children elements of the component

References appendString(), BAIL_OUT, FileMapDTD::cptDtd, newlString(), and lString::string.

Referenced by ecpt_regState().

void ecpt_fileMapTags ( FileMapTags file,
L_head *  children,
const char *  tag,
const char *  base_name 
)

Print out the structures defining the Map tags associated with this component.

Parameters:
file Pointer to structure holding the data required for creating this file
children List of strings that form an array of children of this component
tag String defining the Map tag for this component
base_name NULL if this component has a parent, otherwise the name of this component

References FileMapTags::base_tags, FileMapTags::fp, newlString(), and print_list().

Referenced by ecpt_regState().

void ecpt_fileNumber ( FileNumber file  ) 

Peel back the hierarchy by decrementing the index and clearing one element of the addrRng array.

Parameters:
file Pointer to structure holding the data required for creating this file

References FileNumber::addrRng, and FileNumber::index.

Referenced by ecpt_regState().

void ecpt_fileRegEnum ( FileRegEnum file,
L_head *  enums 
)

Write out an enumeration of the registers within a component.

Parameters:
file Pointer to structure holding the data required for creating this file
enums List of register enumerations

References FileRegEnum::fp, and lString::string.

Referenced by ecpt_regState().

void ecpt_fileTree_c ( FileTree_c file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by ecpt_regState().

void ecpt_fileTree_h ( FileTree_h file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by ecpt_regState().

void ecpt_fileTypeEnum ( FileTypeEnum file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by ecpt_regState().

void ecpt_fileXMLDTD ( FileXMLDTD file,
const char *  cptName,
L_head *  dtdCpt,
unsigned  multi 
)

Write out the component portion of the DTD.

Parameters:
file Pointer to structure holding the data required for creating this file
cptName Component name
dtdCpt List of children elements of the component
multi Multiplicity of this component

References appendString(), BAIL_OUT, FileXMLDTD::cptDtd, newlString(), and lString::string.

Referenced by ecpt_regState().

void ecpt_fileXMLTags ( FileXMLTags file,
L_head *  children,
const char *  tag,
const char *  base_name 
)

Print out the structures defining the XML tags associated with this component.

Parameters:
file Pointer to structure holding the data required for creating this file
children List of strings that form an array of children of this component
tag String defining the XML tag for this component
base_name NULL if this component has a parent, otherwise the name of this component

References FileXMLTags::base_tags, FileXMLTags::fp, newlString(), and print_list().

Referenced by ecpt_regState().

void ereg_fileAddr ( FileAddr file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by ereg_regState().

void ereg_fileDescription ( FileDescription file  ) 

Close out the array of Field Descriptions.

Parameters:
file Pointer to structure holding the data required for creating this file

References FileDescription::fp.

Referenced by ereg_regState().

void ereg_fileFldEnum ( FileFldEnum file  ) 

Finish off the enumeration.

Parameters:
file Pointer to structure holding the data required for creating this file

References FileFldEnum::fp.

Referenced by ereg_regState().

void ereg_filelatcType ( FilelatcType file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by ereg_regState().

void ereg_fileLEM ( FileLEM file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by ereg_regState().

void ereg_fileMapDTD ( FileMapDTD file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by ereg_regState().

void ereg_fileMapTags ( FileMapTags file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by ereg_regState().

void ereg_fileNumber ( FileNumber file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by ereg_regState().

void ereg_fileRegEnum ( FileRegEnum file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by ereg_regState().

void ereg_fileTree_c ( FileTree_c file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by ereg_regState().

void ereg_fileTree_h ( FileTree_h file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by ereg_regState().

void ereg_fileTypeEnum ( FileTypeEnum file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by ereg_regState().

void ereg_fileXMLDTD ( FileXMLDTD file,
const char *  regName 
)

Add a declaration of the register element to the list of strings making up the DTD.

Parameters:
file Pointer to structure holding the data required for creating this file
regName Register name

References appendString(), BAIL_OUT, FileXMLDTD::fldName, newlString(), FileXMLDTD::regDtd, and lString::string.

Referenced by ereg_regState().

void ereg_fileXMLTags ( FileXMLTags file,
const char *  cptName,
const char *  regName 
)

Print out the array of children for this register and the register tag.

Parameters:
file Pointer to structure holding the data required for creating this file
cptName Name of the current component
regName Name of register ending

References FileXMLTags::fp, newlString(), print_list(), and FileXMLTags::reg_tags.

Referenced by ereg_regState().

void fini_fileAddr ( FileAddr file  ) 

Write out an array indicating the accptable ranges of address indicies for each LAT component.

Parameters:
file Pointer to structure holding the data required for creating this file

References FileAddr::addr, closeFile(), FileAddr::fp, and lString::string.

Referenced by fini_regState().

void fini_fileDescription ( FileDescription file  ) 

Write out an array of Component Descriptions to complete the LAT description and close the file.

Parameters:
file Pointer to structure holding the data required for creating this file

References closeFile(), FileDescription::cpt, FileDescription::fp, and lString::string.

Referenced by fini_regState().

void fini_fileFldEnum ( FileFldEnum file  ) 

Close the file.

Parameters:
file Pointer to structure holding the data required for creating this file

References closeFile(), and FileFldEnum::fp.

Referenced by fini_regState().

void fini_filelatcType ( FilelatcType file  ) 

Write out an array of component name strings using the list of strings held in the structure, then close the file.

Parameters:
file Pointer to structure holding the data required for creating this file

References closeFile(), FilelatcType::cpt, FilelatcType::fp, and lString::string.

Referenced by fini_regState().

void fini_fileLEM ( FileLEM file  ) 

Write out arrays connected load and read functions to LAT component types.

Parameters:
file Pointer to structure holding the data required for creating this file

References closeFile(), FileLEM::cpt, FileLEM::fp, and lString::string.

Referenced by fini_regState().

void fini_fileMapDTD ( FileMapDTD file  ) 

Write out the complete DTD and close the file.

Parameters:
file Pointer to structure holding the data required for creating this file

References FileMapDTD::base_tags, FileMapDTD::cptDtd, FileMapDTD::fp, and lString::string.

Referenced by fini_regState().

void fini_fileMapTags ( FileMapTags file  ) 

Finish off the Map vocabulary for the latc_parser by writing out an array of tags that are children of the document element, the base tags.

Parameters:
file Pointer to structure holding the data required for creating this file

References FileMapTags::base_tags, closeFile(), FileMapTags::fp, and lString::string.

Referenced by fini_regState().

void fini_fileNumber ( FileNumber file  ) 

Write out the eumerations giving the number of LAT components and an array connnecting these enums to the LAT component types, then close the file.

Parameters:
file Pointer to structure holding the data required for creating this file

References closeFile(), FileNumber::cnt, FileNumber::cpt, FileNumber::fp, FileNumber::max, and lString::string.

Referenced by fini_regState().

void fini_fileRegEnum ( FileRegEnum file  ) 

Close the file.

Parameters:
file Pointer to structure holding the data required for creating this file

References closeFile(), and FileRegEnum::fp.

Referenced by fini_regState().

void fini_fileTree_c ( FileTree_c file  ) 

Write out the initTree function and close the file.

Parameters:
file Pointer to structure holding the data required for creating this file

References closeFile(), FileTree_c::cpt, FileTree_c::fp, and lString::string.

Referenced by fini_regState().

void fini_fileTree_h ( FileTree_h file  ) 

Write out the LATCtree structure and close the file.

Parameters:
file Pointer to structure holding the data required for creating this file

References closeFile(), FileTree_h::cpt, FileTree_h::fp, and lString::string.

Referenced by fini_regState().

void fini_fileTypeEnum ( FileTypeEnum file  ) 

Write out an enumeration of the component types using the list held in the file structure, then close the file.

Parameters:
file Pointer to structure holding the data required for creating this file

References closeFile(), FileTypeEnum::cpt, FileTypeEnum::fp, and lString::string.

Referenced by fini_regState().

void fini_fileXMLDTD ( FileXMLDTD file  ) 

Write out the complete DTD and close the file.

Parameters:
file Pointer to structure holding the data required for creating this file

References FileXMLDTD::base_tags, FileXMLDTD::cptDtd, FileXMLDTD::fldDtd, FileXMLDTD::fp, FileXMLDTD::regDtd, and lString::string.

Referenced by fini_regState().

void fini_fileXMLTags ( FileXMLTags file  ) 

Finish off the XML vocabulary for the latc_parser by writing out an array of tags that are children of the document element, the base tags.

Parameters:
file Pointer to structure holding the data required for creating this file

References FileXMLTags::base_tags, closeFile(), FileXMLTags::fp, and lString::string.

Referenced by fini_regState().

void init_fileAddr ( FileAddr file  ) 

Initialise the file structure by opening the file, writing some intial statements to it and initialising any lists.

Parameters:
file Pointer to structure holding the data required for creating this file

References FileAddr::addr, Filenames::addr, FileAddr::addrRng, BAIL_OUT, CHECK_BAIL, Filenames::cPath, FileAddr::fp, FileAddr::index, makeName(), FileAddr::name, newlString(), openFile(), lString::string, and Filenames::type.

Referenced by init_regState().

void init_fileDescription ( FileDescription file  ) 

Initialise the file structure by opening the file, writing some intial statements to it and initialising any lists.

Parameters:
file Pointer to structure holding the data required for creating this file

References BAIL_OUT, CHECK_BAIL, Filenames::cPath, FileDescription::cpt, Filenames::desc, FileDescription::fp, makeName(), FileDescription::name, newlString(), openFile(), lString::string, and Filenames::type.

Referenced by init_regState().

void init_fileFldEnum ( FileFldEnum file  ) 

Initialise the file structure by opening the file, writing some intial statements to it and initialising any lists.

Parameters:
file Pointer to structure holding the data required for creating this file

References BAIL_OUT, CHECK_BAIL, Filenames::cPath, Filenames::fldE, FileFldEnum::fp, makeName(), FileFldEnum::name, newlString(), openFile(), and lString::string.

Referenced by init_regState().

void init_filelatcType ( FilelatcType file  ) 

Initialise the file structure by opening the file, writing some intial statements to it and initialising any lists.

Parameters:
file Pointer to structure holding the data required for creating this file

References BAIL_OUT, CHECK_BAIL, Filenames::cPath, FilelatcType::cpt, FilelatcType::fp, makeName(), FilelatcType::name, newlString(), openFile(), lString::string, and Filenames::type.

Referenced by init_regState().

void init_fileLEM ( FileLEM file  ) 

Initialise the file structure by opening the file, writing some intial statements to it and initialising any lists.

Parameters:
file Pointer to structure holding the data required for creating this file

References BAIL_OUT, CHECK_BAIL, Filenames::cPath, FileLEM::cpt, FileLEM::fp, Filenames::lat, makeName(), FileLEM::name, newlString(), openFile(), lString::string, and Filenames::type.

Referenced by init_regState().

void init_fileMapDTD ( FileMapDTD file  ) 

Initialise the file structure by opening the file, writing some intial statements to it and initialising any lists.

Parameters:
file Pointer to structure holding the data required for creating this file

References BAIL_OUT, FileMapDTD::base_tags, FileMapDTD::cptDtd, FileMapDTD::fp, Filenames::hPath, Filenames::mapdtd, and FileMapDTD::name.

Referenced by init_regState().

void init_fileMapTags ( FileMapTags file  ) 

Initialise the file structure by opening the file, writing some intial statements to it and initialising any lists.

Parameters:
file Pointer to structure holding the data required for creating this file

References BAIL_OUT, FileMapTags::base_tags, CHECK_BAIL, Filenames::cPath, FileMapTags::fp, makeName(), Filenames::mapTags, FileMapTags::name, newlString(), openFile(), Filenames::pdesc, Filenames::ptag, lString::string, and Filenames::type.

Referenced by init_regState().

void init_fileNumber ( FileNumber file  ) 

Initialise the file structure by opening the file, writing some intial statements to it and initialising any lists.

Parameters:
file Pointer to structure holding the data required for creating this file

References FileNumber::addrRng, BAIL_OUT, CHECK_BAIL, FileNumber::cnt, Filenames::cPath, FileNumber::cpt, FileNumber::fp, FileNumber::index, makeName(), FileNumber::max, FileNumber::name, newlString(), Filenames::numb, openFile(), lString::string, and Filenames::type.

Referenced by init_regState().

void init_fileRegEnum ( FileRegEnum file  ) 

Initialise the file structure by opening the file, writing some intial statements to it and initialising any lists.

Parameters:
file Pointer to structure holding the data required for creating this file

References BAIL_OUT, CHECK_BAIL, Filenames::cPath, FileRegEnum::fp, makeName(), FileRegEnum::name, newlString(), openFile(), Filenames::regE, and lString::string.

Referenced by init_regState().

void init_fileTree_c ( FileTree_c file  ) 

Initialise the file structure by opening the file, writing some intial statements to it and initialising any lists.

Parameters:
file Pointer to structure holding the data required for creating this file

References BAIL_OUT, CHECK_BAIL, Filenames::cPath, FileTree_c::cpt, FileTree_c::fp, makeName(), FileTree_c::name, openFile(), and Filenames::tree.

Referenced by init_regState().

void init_fileTree_h ( FileTree_h file  ) 

Initialise the file structure by opening the file, writing some intial statements to it and initialising any lists.

Parameters:
file Pointer to structure holding the data required for creating this file

References BAIL_OUT, CHECK_BAIL, Filenames::cPath, FileTree_h::cpt, FileTree_h::fp, makeName(), Filenames::map, FileTree_h::name, newlString(), Filenames::numb, openFile(), lString::string, Filenames::tree, and Filenames::type.

Referenced by init_regState().

void init_fileTypeEnum ( FileTypeEnum file  ) 

Initialise the file structure by opening the file, writing some intial statements to it and initialising any lists.

Parameters:
file Pointer to structure holding the data required for creating this file

References BAIL_OUT, CHECK_BAIL, Filenames::cPath, FileTypeEnum::cpt, FileTypeEnum::fp, makeName(), FileTypeEnum::name, newlString(), openFile(), lString::string, and Filenames::type.

Referenced by init_regState().

void init_fileXMLDTD ( FileXMLDTD file  ) 

Initialise the file structure by opening the file, writing some intial statements to it and initialising any lists.

Parameters:
file Pointer to structure holding the data required for creating this file

References BAIL_OUT, FileXMLDTD::base_tags, FileXMLDTD::cptDtd, Filenames::dtd, FileXMLDTD::fldDtd, FileXMLDTD::fldName, FileXMLDTD::fp, Filenames::hPath, FileXMLDTD::name, and FileXMLDTD::regDtd.

Referenced by init_regState().

void init_fileXMLTags ( FileXMLTags file  ) 

Initialise the file structure by opening the file, writing some intial statements to it and initialising any lists.

Parameters:
file Pointer to structure holding the data required for creating this file

References BAIL_OUT, FileXMLTags::base_tags, CHECK_BAIL, Filenames::cPath, Filenames::fldE, FileXMLTags::fp, makeName(), FileXMLTags::name, newlString(), openFile(), Filenames::pdesc, Filenames::ptag, FileXMLTags::reg_tags, Filenames::regE, lString::string, Filenames::tags, and Filenames::type.

Referenced by init_regState().

void scpt_fileAddr ( FileAddr file,
unsigned  multi 
)

Adds the address range to the list.

Parameters:
file Pointer to structure holding the data required for creating this file
multi Multiplicity of this component

References FileAddr::addr, FileAddr::addrRng, FileAddr::index, and newlString().

Referenced by scpt_regState().

void scpt_fileDescription ( FileDescription file,
const char *  name 
)

Add the component name to the list held in the file structure.

Parameters:
file Pointer to structure holding the data required for creating this file
name Component name

References FileDescription::cpt, and newlString().

Referenced by scpt_regState().

void scpt_fileFldEnum ( FileFldEnum file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by scpt_regState().

void scpt_filelatcType ( FilelatcType file,
const char *  name 
)

Add the compoment name to the list of names held in the structure.

Parameters:
file Pointer to structure holding the data required for creating this file
name String giving the component name

References FilelatcType::cpt, and newlString().

Referenced by scpt_regState().

void scpt_fileLEM ( FileLEM file,
const char *  name 
)

Add the component name to the list held in the file structure.

Parameters:
file Pointer to structure holding the data required for creating this file
name Component name

References FileLEM::cpt, and newlString().

Referenced by scpt_regState().

void scpt_fileMapDTD ( FileMapDTD file,
const char *  base_name 
)

If this component has no parent then base_name is not NULL and should be added the list of base tags.

Parameters:
file Pointer to structure holding the data required for creating this file
base_name NULL if this component is contained by another component, otherwise the component name

References FileMapDTD::base_tags, and newlString().

Referenced by scpt_regState().

void scpt_fileMapTags ( FileMapTags file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by scpt_regState().

void scpt_fileNumber ( FileNumber file,
const char *  name,
unsigned  multi 
)

Add the name and maximum ID for this component to the lists held in the file structure and update the array describing the acceptable ranges of the address indicies.

Parameters:
file Pointer to structure holding the data required for creating this file
name Component name
multi Multiplicity of this component

References FileNumber::addrRng, FileNumber::cnt, FileNumber::cpt, FileNumber::index, FileNumber::max, and newlString().

Referenced by scpt_regState().

void scpt_fileRegEnum ( FileRegEnum file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by scpt_regState().

void scpt_fileTree_c ( FileTree_c file,
const char *  name 
)

Add the component name to the list held in the file structure.

Parameters:
file Pointer to structure holding the data required for creating this file
name Component name

References FileTree_c::cpt, and newlString().

Referenced by scpt_regState().

void scpt_fileTree_h ( FileTree_h file,
const char *  name 
)

Add the component name to the list held in the file structure.

Parameters:
file Pointer to structure holding the data required for creating this file
name Component name

References FileTree_h::cpt, and newlString().

Referenced by scpt_regState().

void scpt_fileTypeEnum ( FileTypeEnum file,
const char *  name 
)

Add the component name to the list of held in the file structure.

Parameters:
file Pointer to structure holding the data required for creating this file
name Component name

References FileTypeEnum::cpt, and newlString().

Referenced by scpt_regState().

void scpt_fileXMLDTD ( FileXMLDTD file,
const char *  base_name 
)

If this component has no parent then base_name is not NULL and should be added the list of base tags.

Parameters:
file Pointer to structure holding the data required for creating this file
base_name NULL if this component is contained by another component, otherwise the component name

References FileXMLDTD::base_tags, and newlString().

Referenced by scpt_regState().

void scpt_fileXMLTags ( FileXMLTags file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by scpt_regState().

void sfld_fileAddr ( FileAddr file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by sfld_regState().

void sfld_fileDescription ( FileDescription file,
unsigned  width,
unsigned  offset 
)

Add an element to the array of Field Descriptions for this field.

Parameters:
file Pointer to structure holding the data required for creating this file
width Number of bits in this field
offset Start bit of the field

References FileDescription::fp.

Referenced by sfld_regState().

void sfld_fileFldEnum ( FileFldEnum file,
const char *  cptName,
const char *  regName,
const char *  fldName,
unsigned  nFld 
)

Write out an enumeration for the field.

Parameters:
file Pointer to structure holding the data required for creating this file
cptName Name of the component containing this field
regName Name of the register holding this field
fldName Name of the field
nFld Number of this field

References FileFldEnum::fp.

Referenced by sfld_regState().

void sfld_filelatcType ( FilelatcType file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by sfld_regState().

void sfld_fileLEM ( FileLEM file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by sfld_regState().

void sfld_fileMapDTD ( FileMapDTD file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by sfld_regState().

void sfld_fileMapTags ( FileMapTags file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by sfld_regState().

void sfld_fileNumber ( FileNumber file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by sfld_regState().

void sfld_fileRegEnum ( FileRegEnum file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by sfld_regState().

void sfld_fileTree_c ( FileTree_c file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by sfld_regState().

void sfld_fileTree_h ( FileTree_h file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by sfld_regState().

void sfld_fileTypeEnum ( FileTypeEnum file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by sfld_regState().

void sfld_fileXMLDTD ( FileXMLDTD file,
const char *  fldName 
)

Add the field name to the list of field names held in the file structure and add an XML element declaration to the list of field elements held in this structure.

Parameters:
file Pointer to structure holding the data required for creating this file
fldName Name of the current field

References FileXMLDTD::fldDtd, FileXMLDTD::fldName, and newlString().

Referenced by sfld_regState().

void sfld_fileXMLTags ( FileXMLTags file,
const char *  cptName,
const char *  regName,
const char *  fldName 
)

Print out the structure defining the XML tag for this field.

Parameters:
file Pointer to structure holding the data required for creating this file
cptName Component name
regName Register name
fldName Field name

References FileXMLTags::fp, newlString(), print_des(), and FileXMLTags::reg_tags.

Referenced by sfld_regState().

void sreg_fileAddr ( FileAddr file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by sreg_regState().

void sreg_fileDescription ( FileDescription file,
const char *  cptName,
const char *  regName,
unsigned  regWidth 
)

Start an array of Field Descriptions for this register, begining with the special "register" field that holds the whole register.

Parameters:
file Pointer to structure holding the data required for creating this file
cptName Name of the compoment holding this register
regName Name of the register
regWidth Number of bits in the register

References FileDescription::fp.

Referenced by sreg_regState().

void sreg_fileFldEnum ( FileFldEnum file,
const char *  cptName,
const char *  regName 
)

Start an enumeration of the fields inside this register, begining with a special "register" field that represents the whole register.

Parameters:
file Pointer to structure holding the data required for creating this file
cptName Name of the component containing this register
regName Name of the register

References FileFldEnum::fp.

Referenced by sreg_regState().

void sreg_filelatcType ( FilelatcType file  ) 

NO-OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by sreg_regState().

void sreg_fileLEM ( FileLEM file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by sreg_regState().

void sreg_fileMapDTD ( FileMapDTD file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by sreg_regState().

void sreg_fileMapTags ( FileMapTags file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by sreg_regState().

void sreg_fileNumber ( FileNumber file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by sreg_regState().

void sreg_fileRegEnum ( FileRegEnum file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by sreg_regState().

void sreg_fileTree_c ( FileTree_c file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by sreg_regState().

void sreg_fileTree_h ( FileTree_h file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by sreg_regState().

void sreg_fileTypeEnum ( FileTypeEnum file  ) 

NO_OP.

Parameters:
file Pointer to structure holding the data required for creating this file

Referenced by sreg_regState().

void sreg_fileXMLDTD ( FileXMLDTD file,
L_head *  cptDtd,
const char *  regName 
)

Add this register to the list of elements contained by the parent component.

Parameters:
file Pointer to structure holding the data required for creating this file
cptDtd List of elements contained by the current component
regName Register name

References newlString().

Referenced by sreg_regState().

void sreg_fileXMLTags ( FileXMLTags file,
const char *  cptName,
const char *  regName 
)

Print out the structure defining the XML tag for this register.

Parameters:
file Pointer to structure holding the data required for creating this file
cptName Component name
regName Register name

References FileXMLTags::fp, newlString(), print_des(), and FileXMLTags::reg_tags.

Referenced by sreg_regState().


Variable Documentation

rfn [static]

Initial value:

 {
  "../LATC",
  "../src", 
  "latcType",
  "regEnums",
  "fldEnums",
  "descriptions",
  "xml_tags",
  "map_tags",
  "latc",
  "map",
  "initIMM",
  "number",
  "lem",
  "addr",
  "parser_descriptor_p.h",
  "parser_tag_p.h",
  "map_p.h"
}
Definition of the filenames used by the parser.


Generated on Thu Apr 7 17:31:12 2011 by  doxygen 1.5.8