GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> RIM / V3-1-2 > lrd_parser / rhel4-32


Interface   Data Structures   File List   Data Fields   Globals  

state.c File Reference

Initialisation of the parser structures. More...

#include <error_p.h>
#include <state_p.h>
#include <cptDetail_p.h>
#include <files_p.h>
#include <tags_p.h>
#include <string.h>
#include <stdlib.h>

Enumerations

enum  { INITIAL_STACK_LIMIT = 8 }

Functions

void init_regState (RegState *state, int verbose)
 Initialises a RegState object for parsing XML files.
void scpt_regState (RegState *state, const char *name, unsigned regWidth, unsigned multi, unsigned suppress)
 Handle the start of a new component by recording some information on a stack and calling the various scpt_file functions.
void sreg_regState (RegState *state, const char *name, unsigned regId, REG_TYPE type)
 Handle the start of a new register updating some state information and calling the various sreg_file functions.
void sfld_regState (RegState *state, const char *name, unsigned width, unsigned offset)
 Handle the start of a new field by calling the various sfld_file functions.
void ereg_regState (RegState *state)
 Call the ereg_file functions.
void ecpt_regState (RegState *state)
 Round out a component by popping some information off the stack and calling the various ecpt_file functions.
void fini_regState (RegState *state)
 Finish off the parsing by closing all the files and clearing the state information.


Detailed Description

Initialisation of the parser structures.

Author:
James Swain & Owen Saxton
$Id: state.c,v 1.6 2011/03/27 06:15:54 saxton Exp $

Function Documentation

void ecpt_regState ( RegState state  ) 

void ereg_regState ( RegState state  ) 

void fini_regState ( RegState state  ) 

void init_regState ( RegState state,
int  verbose 
)

void scpt_regState ( RegState state,
const char *  name,
unsigned  regWidth,
unsigned  multi,
unsigned  suppress 
)

Handle the start of a new component by recording some information on a stack and calling the various scpt_file functions.

Parameters:
state Parser state being manipulated
name Name of the component
regWidth Width (in bits) of the registers of this component
multi Multiplicity of this component
suppress 1 indicates that this component is not handled by RIM, so the parser should be suppressed.

References GenFiles::addr, RegState::cptDetail, GenFiles::description, RegState::file, GenFiles::mapdtd, newCptDetail(), RegState::nReg, GenFiles::number, GenFiles::numEnum, GenFiles::rimType, scpt_cptDetail(), scpt_fileAddr(), scpt_fileDescription(), scpt_fileMapDTD(), scpt_fileNumber(), scpt_fileNumEnum(), scpt_fileRimType(), scpt_fileTree_c(), scpt_fileTree_h(), scpt_fileTypeEnum(), scpt_fileXMLDTD(), RegState::suppressed, GenFiles::tree_c, GenFiles::tree_h, GenFiles::typeEnum, and GenFiles::xmldtd.

Referenced by startComponent().

void sfld_regState ( RegState state,
const char *  name,
unsigned  width,
unsigned  offset 
)

Handle the start of a new field by calling the various sfld_file functions.

Parameters:
state Parser state being manipulated
name Field name
width Number of bits in the field
offset Start bit of the field

References RegState::cptDetail, GenFiles::description, RegState::file, GenFiles::fldEnum, CptDetail::name, RegState::nFld, RegState::regName, RegState::regType, sfld_cptDetail(), sfld_fileDescription(), sfld_fileFldEnum(), sfld_fileXMLDTD(), sfld_fileXMLTags(), RegState::suppressed, GenFiles::xmldtd, and GenFiles::xmlTags.

Referenced by startField().

void sreg_regState ( RegState state,
const char *  name,
unsigned  regId,
REG_TYPE  type 
)

Handle the start of a new register updating some state information and calling the various sreg_file functions.

Parameters:
state Parser state being manipulated
name Register name
regId Register ID
type Type of register, IGN, LATC or INIT

References RegState::cptDetail, GenFiles::description, CptDetail::dtd, RegState::file, GenFiles::fldEnum, CptDetail::name, RegState::nFld, RegState::regId, RegState::regName, RegState::regType, CptDetail::regWidth, sreg_cptDetail(), sreg_fileDescription(), sreg_fileFldEnum(), sreg_fileXMLDTD(), sreg_fileXMLTags(), RegState::suppressed, GenFiles::xmldtd, and GenFiles::xmlTags.

Referenced by startRegister().


Generated on Fri Sep 30 18:26:45 2011 by  doxygen 1.5.8