GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LCI / V6-0-4 > lci_host / rhel5-64


Interface   Data Structures   File List   Data Fields   Globals  

compile.c File Reference

XML parser for the LCI package. More...

#include <compile_p.h>
#include <compile_s.h>
#include <lci_host_p.h>
#include <LCI/LCI_msgs.h>
#include <LSEC/LSEC_ctx.h>
#include <MSG/MSG_pubdefs.h>
#include <PBS/MBA.h>
#include <XLX/XLX.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>

Defines

#define COUNT(x)   (sizeof x / sizeof x[0])

Functions

unsigned LCI_compile (const char *mode, const char *infile, const char *outfile, unsigned vol)
 Compile an XML "source" file into a LCI binary configuration file.
LCI_compilationLCI_newCompilation (void)
 Initialise a compilation.
void LCI_deleteCompilation (LCI_compilation *cmp)
 Delete a compilation.
unsigned LCI_setMode (const char *mode, LCI_compilation *cmp)
 Set the calibration type (mode).
void LCI_procDoctype (XLX_state *xst, const char *type, const char *sysId, const char *pubId, int intSub)
 Obtain information from the DOCTYPE declaration.
void LCI_writeOnExit (XLX_state *xst)
 Process configuration end tag.
void LCI_enterLatcDelay (XLX_state *xst, const char **attr)
 Process the common "latc_delay" tag.
void LCI_enterDelay (XLX_state *xst, const char **attr)
 Process the common "delay" tag.
void LCI_enterPeriod (XLX_state *xst, const char **attr)
 Process the common "period" tag.
void LCI_enterNumber (XLX_state *xst, const char **attr)
 Process the common "number" tag.
void LCI_enterStrobe (XLX_state *xst, const char **attr)
 Process the common "strobe" tag.
void LCI_enterSuppress (XLX_state *xst, const char **attr)
 Process the common "zero_suppress" tag.
void LCI_enterAcdPha (XLX_state *xst, const char **attr)
 Process the ACD "pha" tag.
void LCI_enterAcdVeto (XLX_state *xst, const char **attr)
 Process the ACD "veto" tag.
void LCI_enterAcdVernier (XLX_state *xst, const char **attr)
 Process the ACD "veto_vernier" tag.
void LCI_enterAcdHld (XLX_state *xst, const char **attr)
 Process the ACD "hld" tag.
void LCI_enterAcdInj (XLX_state *xst, const char **attr)
 Process the ACD "inject" tag.
void LCI_enterAcdBias (XLX_state *xst, const char **attr)
 Process the ACD "bias" tag.
void LCI_enterAcdHoldDelay (XLX_state *xst, const char **attr)
 Process the ACD "hold_delay" tag.
void LCI_enterAcdHitmapDelay (XLX_state *xst, const char **attr)
 Process the ACD "hitmap_delay" tag.
void LCI_enterAcdChnl (XLX_state *xst, const char **attr)
 Process the ACD "channel" tag.
void LCI_enterAcdRange (XLX_state *xst, const char **attr)
 Process the ACD "range" tag.
void LCI_enterCalTrgLo (XLX_state *xst, const char **attr)
 Process the CAL "trigger/low" tag.
void LCI_enterCalTrgHi (XLX_state *xst, const char **attr)
 Process the CAL "trigger/high" tag.
void LCI_enterCalTack (XLX_state *xst, const char **attr)
 Process the CAL "tack" tag.
void LCI_enterCalAcc (XLX_state *xst, const char **attr)
 Process the CAL "log_accept" tag.
void LCI_enterCalUld (XLX_state *xst, const char **attr)
 Process the CAL "range_uld" tag.
void LCI_enterCalInj (XLX_state *xst, const char **attr)
 Process the CAL "inject" tag.
void LCI_enterCalCol (XLX_state *xst, const char **attr)
 Process the CAL "column" tag.
void LCI_enterCalFourRng (XLX_state *xst, const char **attr)
 Process the CAL "four_range" and obsolete "auto_range" tags.
void LCI_enterCalFirstRng (XLX_state *xst, const char **attr)
 Process the CAL "first_range" tag.
void LCI_enterCalGainLo (XLX_state *xst, const char **attr)
 Process the CAL "gain/low" tag.
void LCI_enterCalGainHi (XLX_state *xst, const char **attr)
 Process the CAL "gain/high" tag.
void LCI_enterCalRngEnabLo (XLX_state *xst, const char **attr)
 Process the CAL "range_enab/low" tag.
void LCI_enterCalRngEnabHi (XLX_state *xst, const char **attr)
 Process the CAL "range_enab/high" tag.
void LCI_enterCalTrgEnabLo (XLX_state *xst, const char **attr)
 Process the CAL "trig_enab/low" tag.
void LCI_enterCalTrgEnabHi (XLX_state *xst, const char **attr)
 Process the CAL "trig_enab/high" tag.
void LCI_enterCalCalEnabLo (XLX_state *xst, const char **attr)
 Process the CAL "calib_enab/low" tag.
void LCI_enterCalCalEnabHi (XLX_state *xst, const char **attr)
 Process the CAL "calib_enab/high" tag.
void LCI_enterCalCalGain (XLX_state *xst, const char **attr)
 Process the CAL "calib_gain" tag.
void LCI_enterTkrThr (XLX_state *xst, const char **attr)
 Process the TKR "threshold" tag.
void LCI_enterTkrInj (XLX_state *xst, const char **attr)
 Process the TKR "inject" tag.
void LCI_enterTkrChnl (XLX_state *xst, const char **attr)
 Process the TKR "channel" tag.
void LCI_enterTkrTack (XLX_state *xst, const char **attr)
 Process the TKR "tack" tag.
void LCI_enterTkrSplitLo (XLX_state *xst, const char **attr)
 Process the TKR "split/low" tag.
void LCI_enterTkrSplitHi (XLX_state *xst, const char **attr)
 Process the TKR "split/high" tag.
void LCI_enterItemCnst (XLX_state *xst, const char **attr)
 Process the common "constant" tag.
void LCI_enterItemInit (XLX_state *xst, const char **attr)
 Process the common "initial" tag.
void LCI_enterItemDelta (XLX_state *xst, const char **attr)
 Process the common "delta" tag.
void LCI_enterItemCount (XLX_state *xst, const char **attr)
 Process the common "count" tag.
void LCI_charSetAcdChnl (XLX_state *xst, const char *element, int len)
 Process the ACD "channel" tag value.
void LCI_charSetCalCol (XLX_state *xst, const char *element, int len)
 Process the CAL "column" tag value.
void LCI_charSetTkrChnl (XLX_state *xst, const char *element, int len)
 Process the TKR "channel" tag value.
void LCI_fillItemKeyword (XLX_state *xst, const char *element, int len)
 Process the value of a general iterator tag.
void LCI_fillItemCnst (XLX_state *xst, const char *element, int len)
 Process the common "constant" tag value.
void LCI_fillItemInit (XLX_state *xst, const char *element, int len)
 Process the common "initial" tag value.
void LCI_fillItemDelta (XLX_state *xst, const char *element, int len)
 Process the common "delta" tag value.
void LCI_fillItemCount (XLX_state *xst, const char *element, int len)
 Process the common "count" tag value.
void LCI_charSetParam (XLX_state *xst, const char *element, int len)
 Process the value for a simple parameter tag.
void LCI_charSetParamLatc (XLX_state *xst, const char *element, int len)
 Process the value for a parameter tag with LATC possible.
void LCI_charSetParamOnOff (XLX_state *xst, const char *element, int len)
 Process the value for a on/off parameter tag.
void LCI_charSetParamHiLo (XLX_state *xst, const char *element, int len)
 Process the value for a high/low parameter tag.
void LCI_charSetPeriod (XLX_state *xst, const char *element, int len)
 Process the common "period" tag value.
void LCI_charSetStrobe (XLX_state *xst, const char *element, int len)
 Process the common "strobe" tag value.
void LCI_charSetSuppress (XLX_state *xst, const char *element, int len)
 Process the common "zero_suppress" tag value.
void LCI_charSetCalAutoRng (XLX_state *xst, const char *element, int len)
 Process the CAL "auto_range" tag value (obsolete).
void LCI_charSetCalFourRng (XLX_state *xst, const char *element, int len)
 Process the CAL "four_range" tag value.
void LCI_charSetCalFirstRng (XLX_state *xst, const char *element, int len)
 Process the CAL "first_range" tag value.
void LCI_exitIter (XLX_state *xst)
 Process the end tag for an iterator.
void LCI_exitParam (XLX_state *xst)
 Process the end tag for a parameter or iterator item.
void LCI_startItem (LCI_compilation *cmp, void *item, int tag, unsigned int maxm)
 Start a new item.
unsigned LCI_keyword (const char *element, int len, const char *keyword)
 Check if tag value matches a keyword.
unsigned LCI_strtoi (LCI_compilation *cmp, const char *string, int len, int *value)
 Convert a string to a signed 32-bit integer.
unsigned LCI_strtou (LCI_compilation *cmp, const char *string, int len, unsigned *value)
 Convert a string to an unsigned 32-bit integer.
unsigned LCI_strtoll (LCI_compilation *cmp, const char *string, int len, long long *value)
 Convert a string to a signed 64-bit integer.
unsigned LCI_strtoull (LCI_compilation *cmp, const char *string, int len, unsigned long long *value)
 Convert a string to an unsigned 64-bit integer.
void LCI_getTagName (LCI_compilation *cmp, char *name, int leng)
 Get the current tag name.
void LCI_getMapName (LCI_tagIdMap *map, char *name, int leng)
 Get the tag name for a tag map entry.


Detailed Description

XML parser for the LCI package.

Author:
James Swain & Owen Saxton
$Id: compile.c,v 1.18 2011/03/29 19:32:56 saxton Exp $

Function Documentation

void LCI_charSetAcdChnl ( XLX_state *  xst,
const char *  element,
int  len 
)

Process the ACD "channel" tag value.

Fill in the the fields of the ACD channels configuration item

Parameters:
xst Pointer to the compilation structure
element Pointer to the start of the character element (beware leading and trailing spaces)
len Length of the character element

References _LCI_compilation::badval, LCI_cnfItem::count, _LCI_compilation::curItem, _LCI_compilation::curMaxm, _LCI_compilation::curStat, _LCI_compilation::curTag, LCI_cnfItem::delta, LCI_keyword(), LCI_cnfItem::start, and STS_GOTITER.

void LCI_charSetCalAutoRng ( XLX_state *  xst,
const char *  element,
int  len 
)

Process the CAL "auto_range" tag value (obsolete).

Set the auto range bit to 1 if the tag contains the ON keyword, or to 0 if it contains OFF.

Parameters:
xst Pointer to the compilation structure
element Pointer to the start of the character element (beware leading and trailing spaces)
len Length of the character element

References _LCI_compilation::badval, _LCI_compilation::cnf, _LCI_compilation::curStat, _LCI_compilation::curTag, LCI_cnfInput::gem, _LCI_configuration::inp, LCI_keyword(), LCI_gemInput::one_range, and STS_GOTVALUE.

void LCI_charSetCalCol ( XLX_state *  xst,
const char *  element,
int  len 
)

Process the CAL "column" tag value.

Fill in the fields of the calorimeter columns configuration item

Parameters:
xst Pointer to the compilation structure
element Pointer to the start of the character element (beware leading and trailing spaces)
len Length of the character element

References _LCI_compilation::badval, LCI_cnfItem::count, _LCI_compilation::curItem, _LCI_compilation::curMaxm, _LCI_compilation::curStat, _LCI_compilation::curTag, LCI_cnfItem::delta, LCI_keyword(), LCI_cnfItem::start, and STS_GOTITER.

void LCI_charSetCalFirstRng ( XLX_state *  xst,
const char *  element,
int  len 
)

Process the CAL "first_range" tag value.

Convert the character element into the first range to be read from the calorimeter

Parameters:
xst Pointer to the compilation structure
element Pointer to the start of the character element (beware leading and trailing spaces)
len Length of the character element

References _LCI_compilation::badval, _LCI_compilation::curItem, _LCI_compilation::curMaxm, _LCI_compilation::curStat, _LCI_compilation::curTag, LCI_keyword(), LCI_strtou(), and STS_GOTVALUE.

void LCI_charSetCalFourRng ( XLX_state *  xst,
const char *  element,
int  len 
)

Process the CAL "four_range" tag value.

Set the auto range bit to 0 if the tag contains the ON keyword, or to 1 if it contains OFF.

Parameters:
xst Pointer to the compilation structure
element Pointer to the start of the character element (beware leading and trailing spaces)
len Length of the character element

References _LCI_compilation::badval, _LCI_compilation::cnf, _LCI_compilation::curStat, _LCI_compilation::curTag, LCI_cnfInput::gem, _LCI_configuration::inp, LCI_keyword(), LCI_gemInput::one_range, and STS_GOTVALUE.

void LCI_charSetParam ( XLX_state *  xst,
const char *  element,
int  len 
)

Process the value for a simple parameter tag.

Convert the character element into a number and store it in the current location. A message is issued and an error flag set if the element contains an invalid or out-of-range number.

Parameters:
xst Pointer to the compilation structure
element Pointer to the start of the character element (beware leading and trailing spaces)
len Length of the character element

References _LCI_compilation::badval, _LCI_compilation::curItem, _LCI_compilation::curMaxm, _LCI_compilation::curStat, _LCI_compilation::curTag, LCI_strtou(), and STS_GOTVALUE.

void LCI_charSetParamHiLo ( XLX_state *  xst,
const char *  element,
int  len 
)

Process the value for a high/low parameter tag.

Allowed values are "LATC" to use the LATC value, "LOW" to set it to 0, and "HIGH" to set it to 1.

Parameters:
xst Pointer to the compilation structure
element Pointer to the start of the character element (beware leading and trailing spaces)
len Length of the character element

References _LCI_compilation::badval, _LCI_compilation::curItem, _LCI_compilation::curStat, _LCI_compilation::curTag, LCI_keyword(), and STS_GOTVALUE.

void LCI_charSetParamLatc ( XLX_state *  xst,
const char *  element,
int  len 
)

Process the value for a parameter tag with LATC possible.

If the character element is "LATC", set the "use LATC" value in the current location. Otherwise convert the character element into a number and store it in the current location. Error flags are set or cleared according to whether the element contained a valid number.

Parameters:
xst Pointer to the compilation structure
element Pointer to the start of the character element (beware leading and trailing spaces)
len Length of the character element

References _LCI_compilation::badval, _LCI_compilation::curItem, _LCI_compilation::curMaxm, _LCI_compilation::curStat, _LCI_compilation::curTag, LCI_keyword(), LCI_strtou(), and STS_GOTVALUE.

void LCI_charSetParamOnOff ( XLX_state *  xst,
const char *  element,
int  len 
)

Process the value for a on/off parameter tag.

Allowed values are "LATC" to use the LATC value, "OFF" to set it to 0, and "ON" to set it to 1.

Parameters:
xst Pointer to the compilation structure
element Pointer to the start of the character element (beware leading and trailing spaces)
len Length of the character element

References _LCI_compilation::badval, _LCI_compilation::curItem, _LCI_compilation::curStat, _LCI_compilation::curTag, LCI_keyword(), and STS_GOTVALUE.

void LCI_charSetPeriod ( XLX_state *  xst,
const char *  element,
int  len 
)

Process the common "period" tag value.

Convert the character element into the period between pulses (in clock ticks), enforces the minimum period (20000 ticks), and sets the value into the configuration structure

Parameters:
xst Pointer to the compilation structure
element Pointer to the start of the character element (beware leading and trailing spaces)
len Length of the character element

References _LCI_compilation::cnf, _LCI_compilation::curStat, LCI_cnfInput::gem, _LCI_configuration::inp, LCI_keyword(), LCI_strtou(), LCI_gemInput::period, period, and STS_GOTVALUE.

void LCI_charSetStrobe ( XLX_state *  xst,
const char *  element,
int  len 
)

Process the common "strobe" tag value.

Set the CALSTROBE bit to 1 if the tag contains the ON keyword, or to 0 if it contains OFF.

Parameters:
xst Pointer to the compilation structure
element Pointer to the start of the character element (beware leading and trailing spaces)
len Length of the character element

References _LCI_compilation::badval, _LCI_compilation::cnf, _LCI_compilation::curStat, _LCI_compilation::curTag, LCI_cnfInput::gem, _LCI_configuration::inp, LCI_keyword(), LCI_gemInput::strobe, and STS_GOTVALUE.

void LCI_charSetSuppress ( XLX_state *  xst,
const char *  element,
int  len 
)

Process the common "zero_suppress" tag value.

Set the zero suppression to 1 if the tag contains the ON keyword, or to 0 if it contains OFF.

Parameters:
xst Pointer to the compilation structure
element Pointer to the start of the character element (beware leading and trailing spaces)
len Length of the character element

References _LCI_compilation::badval, _LCI_compilation::cnf, _LCI_compilation::curStat, _LCI_compilation::curTag, LCI_cnfInput::gem, _LCI_configuration::inp, LCI_keyword(), STS_GOTVALUE, and LCI_gemInput::zero_suppress.

void LCI_charSetTkrChnl ( XLX_state *  xst,
const char *  element,
int  len 
)

Process the TKR "channel" tag value.

Fill in the fields for the tracker channel configuration item

Parameters:
xst Pointer to the compilation structure
element Pointer to the start of the character element (beware leading and trailing spaces)
len Length of the character element

References _LCI_compilation::badval, LCI_cnfItem::count, _LCI_compilation::curItem, _LCI_compilation::curMaxm, _LCI_compilation::curStat, _LCI_compilation::curTag, LCI_cnfItem::delta, LCI_keyword(), LCI_cnfItem::start, and STS_GOTITER.

unsigned LCI_compile ( const char *  mode,
const char *  infile,
const char *  outfile,
unsigned  vol 
)

Compile an XML "source" file into a LCI binary configuration file.

Parameters:
mode Type of configuration file to process (ACD, CAL or TKR)
infile Name of the input file
outfile Name of the output file
vol Set the level of verbosity for the parser
Return values:
LCI_SUCCESS If all goes well
LCI_MEMERROR If the create of a compilation object fails
LCI_XMLPARSE If there is an error within the XLX routines.
LCI_FOPEN If the output file fails to open

References _LCI_compilation::cnf, _LCI_compilation::doc, LCI_create(), LCI_deleteCompilation(), LCI_finish(), LCI_newCompilation(), LCI_procDoctype(), LCI_setMode(), _LCI_compilation::mode, _LCI_compilation::nCfgIn, _LCI_compilation::nCfgOut, _LCI_compilation::status, STS_NODOCTYPE, and _LCI_compilation::xst.

void LCI_deleteCompilation ( LCI_compilation cmp  ) 

Delete a compilation.

Parameters:
cmp Pointer to a compilation structure created with LCI_newCompilation

References _LCI_compilation::cnf.

Referenced by LCI_compile().

void LCI_enterAcdBias ( XLX_state *  xst,
const char **  attr 
)

Process the ACD "bias" tag.

Set the current item address to point to the bias voltage value.

Parameters:
xst Pointer to the compilation structure
attr Attribute list

References LCI_cnfInput::acd, LCI_acdInput::bias, _LCI_compilation::cnf, _LCI_configuration::inp, and LCI_startItem().

void LCI_enterAcdChnl ( XLX_state *  xst,
const char **  attr 
)

Process the ACD "channel" tag.

Set the current item address to point to the channel value.

Parameters:
xst Pointer to the compilation structure
attr Attribute list

References LCI_cnfInput::acd, LCI_acdInput::chnl, _LCI_compilation::cnf, _LCI_configuration::inp, and LCI_startItem().

void LCI_enterAcdHitmapDelay ( XLX_state *  xst,
const char **  attr 
)

Process the ACD "hitmap_delay" tag.

Set the current item address to point to the hitmap delay value.

Parameters:
xst Pointer to the compilation structure
attr Attribute list

References LCI_cnfInput::acd, _LCI_compilation::cnf, LCI_acdInput::hitm, _LCI_configuration::inp, and LCI_startItem().

void LCI_enterAcdHld ( XLX_state *  xst,
const char **  attr 
)

Process the ACD "hld" tag.

Set the current item address to point to the high level discriminator DAC value.

Parameters:
xst Pointer to the compilation structure
attr Attribute list

References LCI_cnfInput::acd, _LCI_compilation::cnf, LCI_acdInput::hld, _LCI_configuration::inp, and LCI_startItem().

void LCI_enterAcdHoldDelay ( XLX_state *  xst,
const char **  attr 
)

Process the ACD "hold_delay" tag.

Set the current item address to point to the hold delay value.

Parameters:
xst Pointer to the compilation structure
attr Attribute list

References LCI_cnfInput::acd, _LCI_compilation::cnf, LCI_acdInput::hold, _LCI_configuration::inp, and LCI_startItem().

void LCI_enterAcdInj ( XLX_state *  xst,
const char **  attr 
)

Process the ACD "inject" tag.

Set the current item address to point to the calibration charge DAC value.

Parameters:
xst Pointer to the compilation structure
attr Attribute list

References LCI_cnfInput::acd, _LCI_compilation::cnf, LCI_acdInput::inj, _LCI_configuration::inp, and LCI_startItem().

void LCI_enterAcdPha ( XLX_state *  xst,
const char **  attr 
)

Process the ACD "pha" tag.

Set the current item address to point to the PHA threshold DAC value.

Parameters:
xst Pointer to the compilation structure
attr Attribute list

References LCI_cnfInput::acd, _LCI_compilation::cnf, _LCI_configuration::inp, LCI_startItem(), and LCI_acdInput::pha.

void LCI_enterAcdRange ( XLX_state *  xst,
const char **  attr 
)

Process the ACD "range" tag.

Set the current item address to point to the PHA range value.

Parameters:
xst Pointer to the compilation structure
attr Attribute list

References LCI_cnfInput::acd, _LCI_compilation::cnf, _LCI_configuration::inp, LCI_startItem(), and LCI_acdInput::range.

void LCI_enterAcdVernier ( XLX_state *  xst,
const char **  attr 
)

Process the ACD "veto_vernier" tag.

Set the current item address to point to the veto vernier DAC value.

Parameters:
xst Pointer to the compilation structure
attr Attribute list

References LCI_cnfInput::acd, _LCI_compilation::cnf, _LCI_configuration::inp, LCI_startItem(), and LCI_acdInput::vern.

void LCI_enterAcdVeto ( XLX_state *  xst,
const char **  attr 
)

Process the ACD "veto" tag.

Set the current item address to point to the veto threshold DAC value.

Parameters:
xst Pointer to the compilation structure
attr Attribute list

References LCI_cnfInput::acd, _LCI_compilation::cnf, _LCI_configuration::inp, LCI_startItem(), and LCI_acdInput::veto.

void LCI_enterCalAcc ( XLX_state *  xst,
const char **  attr 
)

Process the CAL "log_accept" tag.

Set the current item address to point to the log accept threshold value.

Parameters:
xst Pointer to the compilation structure
attr Attribute list

References LCI_calInput::acc, LCI_cnfInput::cal, _LCI_compilation::cnf, _LCI_configuration::inp, and LCI_startItem().

void LCI_enterCalCalEnabHi ( XLX_state *  xst,
const char **  attr 
)

Process the CAL "calib_enab/high" tag.

Set the current item address to point to the high energy calibration enable value.

Parameters:
xst Pointer to the compilation structure
attr Attribute list

References LCI_cnfInput::cal, LCI_calInput::calEnabHe, _LCI_compilation::cnf, _LCI_configuration::inp, and LCI_startItem().

void LCI_enterCalCalEnabLo ( XLX_state *  xst,
const char **  attr 
)

Process the CAL "calib_enab/low" tag.

Set the current item address to point to the low energy calibration enable value.

Parameters:
xst Pointer to the compilation structure
attr Attribute list

References LCI_cnfInput::cal, LCI_calInput::calEnabLe, _LCI_compilation::cnf, _LCI_configuration::inp, and LCI_startItem().

void LCI_enterCalCalGain ( XLX_state *  xst,
const char **  attr 
)

Process the CAL "calib_gain" tag.

Set the current item address to point to the calibration gain value.

Parameters:
xst Pointer to the compilation structure
attr Attribute list

References LCI_cnfInput::cal, LCI_calInput::calGain, _LCI_compilation::cnf, _LCI_configuration::inp, and LCI_startItem().

void LCI_enterCalCol ( XLX_state *  xst,
const char **  attr 
)

Process the CAL "column" tag.

Set the current item address to point to the column value.

Parameters:
xst Pointer to the compilation structure
attr Attribute list

References LCI_cnfInput::cal, _LCI_compilation::cnf, LCI_calInput::col, _LCI_configuration::inp, and LCI_startItem().

void LCI_enterCalFirstRng ( XLX_state *  xst,
const char **  attr 
)

Process the CAL "first_range" tag.

Set the current item address to point to the first range value.

Parameters:
xst Pointer to the compilation structure
attr Array of tag attributes (not used)

References LCI_cnfInput::cal, _LCI_compilation::cnf, LCI_calInput::firstRng, _LCI_configuration::inp, and LCI_startItem().

void LCI_enterCalFourRng ( XLX_state *  xst,
const char **  attr 
)

Process the CAL "four_range" and obsolete "auto_range" tags.

Set the current tag ID to be that of the four range tag.

Parameters:
xst Pointer to the compilation structure
attr Array of tag attributes (not used)

References LCI_startItem().

void LCI_enterCalGainHi ( XLX_state *  xst,
const char **  attr 
)

Process the CAL "gain/high" tag.

Set the current item address to point to the high energy gain value.

Parameters:
xst Pointer to the compilation structure
attr Attribute list

References LCI_cnfInput::cal, _LCI_compilation::cnf, LCI_calInput::gainHe, _LCI_configuration::inp, and LCI_startItem().

void LCI_enterCalGainLo ( XLX_state *  xst,
const char **  attr 
)

Process the CAL "gain/low" tag.

Set the current item address to point to the low energy gain value.

Parameters:
xst Pointer to the compilation structure
attr Attribute list

References LCI_cnfInput::cal, _LCI_compilation::cnf, LCI_calInput::gainLe, _LCI_configuration::inp, and LCI_startItem().

void LCI_enterCalInj ( XLX_state *  xst,
const char **  attr 
)

Process the CAL "inject" tag.

Set the current item address to point to the injection DAC value.

Parameters:
xst Pointer to the compilation structure
attr Attribute list

References LCI_cnfInput::cal, _LCI_compilation::cnf, LCI_calInput::inj, _LCI_configuration::inp, and LCI_startItem().

void LCI_enterCalRngEnabHi ( XLX_state *  xst,
const char **  attr 
)

Process the CAL "range_enab/high" tag.

Set the current item address to point to the high energy range enable value.

Parameters:
xst Pointer to the compilation structure
attr Attribute list

References LCI_cnfInput::cal, _LCI_compilation::cnf, _LCI_configuration::inp, LCI_startItem(), and LCI_calInput::rngEnabHe.

void LCI_enterCalRngEnabLo ( XLX_state *  xst,
const char **  attr 
)

Process the CAL "range_enab/low" tag.

Set the current item address to point to the low energy range enable value.

Parameters:
xst Pointer to the compilation structure
attr Attribute list

References LCI_cnfInput::cal, _LCI_compilation::cnf, _LCI_configuration::inp, LCI_startItem(), and LCI_calInput::rngEnabLe.

void LCI_enterCalTack ( XLX_state *  xst,
const char **  attr 
)

Process the CAL "tack" tag.

Set the current item address to point to the TACK delay value.

Parameters:
xst Pointer to the compilation structure
attr Attribute list

References LCI_cnfInput::cal, _LCI_compilation::cnf, _LCI_configuration::inp, LCI_startItem(), and LCI_calInput::tack.

void LCI_enterCalTrgEnabHi ( XLX_state *  xst,
const char **  attr 
)

Process the CAL "trig_enab/high" tag.

Set the current item address to point to the high energy trigger enable value.

Parameters:
xst Pointer to the compilation structure
attr Attribute list

References LCI_cnfInput::cal, _LCI_compilation::cnf, _LCI_configuration::inp, LCI_startItem(), and LCI_calInput::trgEnabHe.

void LCI_enterCalTrgEnabLo ( XLX_state *  xst,
const char **  attr 
)

Process the CAL "trig_enab/low" tag.

Set the current item address to point to the low energy trigger enable value.

Parameters:
xst Pointer to the compilation structure
attr Attribute list

References LCI_cnfInput::cal, _LCI_compilation::cnf, _LCI_configuration::inp, LCI_startItem(), and LCI_calInput::trgEnabLe.

void LCI_enterCalTrgHi ( XLX_state *  xst,
const char **  attr 
)

Process the CAL "trigger/high" tag.

Set the current item address to point to the high energy trigger threshold value.

Parameters:
xst Pointer to the compilation structure
attr Attribute list

References LCI_cnfInput::cal, _LCI_compilation::cnf, LCI_calInput::he, _LCI_configuration::inp, and LCI_startItem().

void LCI_enterCalTrgLo ( XLX_state *  xst,
const char **  attr 
)

Process the CAL "trigger/low" tag.

Set the current item address to point to the low energy trigger threshold value.

Parameters:
xst Pointer to the compilation structure
attr Attribute list

References LCI_cnfInput::cal, _LCI_compilation::cnf, _LCI_configuration::inp, LCI_startItem(), and LCI_calInput::le.

void LCI_enterCalUld ( XLX_state *  xst,
const char **  attr 
)

Process the CAL "range_uld" tag.

Set the current item address to point to the upper level discriminator value.

Parameters:
xst Pointer to the compilation structure
attr Attribute list

References LCI_cnfInput::cal, _LCI_compilation::cnf, _LCI_configuration::inp, LCI_startItem(), and LCI_calInput::uld.

void LCI_enterDelay ( XLX_state *  xst,
const char **  attr 
)

Process the common "delay" tag.

Set the current item address to point to the general delay. This is the delay (in 100ths of a second) after changing any set of configuration values.

Parameters:
xst Pointer to the compilation structure
attr Array of tag attributes (not used)

References _LCI_compilation::cnf, LCI_gemInput::delay, LCI_cnfInput::gem, _LCI_configuration::inp, and LCI_startItem().

void LCI_enterItemCnst ( XLX_state *  xst,
const char **  attr 
)

Process the common "constant" tag.

This routine checks that this element hasn't already been filled in.

Parameters:
xst Pointer to the compilation structure
attr Array of tag attributes (not used)

References _LCI_compilation::curStat, LCI_getTagName(), STS_GOTITER, and STS_GOTVALUE.

void LCI_enterItemCount ( XLX_state *  xst,
const char **  attr 
)

Process the common "count" tag.

This routine checks that this element hasn't already been filled in.

Parameters:
xst Pointer to the compilation structure
attr Array of tag attributes (not used)

References _LCI_compilation::curStat, LCI_getTagName(), STS_GOTCOUNT, and STS_GOTVALUE.

void LCI_enterItemDelta ( XLX_state *  xst,
const char **  attr 
)

Process the common "delta" tag.

This routine checks that this element hasn't already been filled in.

Parameters:
xst Pointer to the compilation structure
attr Array of tag attributes (not used)

References _LCI_compilation::curStat, LCI_getTagName(), STS_GOTDELTA, and STS_GOTVALUE.

void LCI_enterItemInit ( XLX_state *  xst,
const char **  attr 
)

Process the common "initial" tag.

This routine checks that this element hasn't already been filled in.

Parameters:
xst Pointer to the compilation structure
attr Array of tag attributes (not used)

References _LCI_compilation::curStat, LCI_getTagName(), STS_GOTINIT, and STS_GOTVALUE.

void LCI_enterLatcDelay ( XLX_state *  xst,
const char **  attr 
)

Process the common "latc_delay" tag.

Set the current item address to point to the LATC delay. This is the delay (in 100ths of a second) after doing a LATC configure.

Parameters:
xst Pointer to the compilation structure
attr Array of tag attributes (not used)

References _LCI_compilation::cnf, LCI_cnfInput::gem, _LCI_configuration::inp, LCI_gemInput::latcDelay, and LCI_startItem().

void LCI_enterNumber ( XLX_state *  xst,
const char **  attr 
)

Process the common "number" tag.

Set the current item address to point to the number of pulses.

Parameters:
xst Pointer to the compilation structure
attr Array of tag attributes (not used)

References _LCI_compilation::cnf, LCI_cnfInput::gem, _LCI_configuration::inp, LCI_startItem(), and LCI_gemInput::nev.

void LCI_enterPeriod ( XLX_state *  xst,
const char **  attr 
)

Process the common "period" tag.

Sets the current tag ID to be that of the period tag.

Parameters:
xst Pointer to the compilation structure
attr Array of tag attributes (not used)

References LCI_startItem().

void LCI_enterStrobe ( XLX_state *  xst,
const char **  attr 
)

Process the common "strobe" tag.

Set the current tag ID to be that of the strobe tag.

Parameters:
xst Pointer to the compilation structure
attr Array of tag attributes (not used)

References LCI_startItem().

void LCI_enterSuppress ( XLX_state *  xst,
const char **  attr 
)

Process the common "zero_suppress" tag.

Set the current tag ID to be zero suppress.

Parameters:
xst Pointer to the compilation structure
attr Array of tag attributes (not used)

References LCI_startItem().

void LCI_enterTkrChnl ( XLX_state *  xst,
const char **  attr 
)

Process the TKR "channel" tag.

Set the current item address to point to the channel value.

Parameters:
xst Pointer to the compilation structure
attr Attribute list

References LCI_tkrInput::chnl, _LCI_compilation::cnf, _LCI_configuration::inp, LCI_startItem(), and LCI_cnfInput::tkr.

void LCI_enterTkrInj ( XLX_state *  xst,
const char **  attr 
)

Process the TKR "inject" tag.

Set the current item address to point to the calibration charge DAC value.

Parameters:
xst Pointer to the compilation structure
attr Attribute list

References _LCI_compilation::cnf, LCI_tkrInput::inj, _LCI_configuration::inp, LCI_startItem(), and LCI_cnfInput::tkr.

void LCI_enterTkrSplitHi ( XLX_state *  xst,
const char **  attr 
)

Process the TKR "split/high" tag.

Set the current item address to point to the high side split value.

Parameters:
xst Pointer to the compilation structure
attr Attribute list

References _LCI_compilation::cnf, _LCI_configuration::inp, LCI_startItem(), LCI_tkrInput::splitHi, and LCI_cnfInput::tkr.

void LCI_enterTkrSplitLo ( XLX_state *  xst,
const char **  attr 
)

Process the TKR "split/low" tag.

Set the current item address to point to the low side split value.

Parameters:
xst Pointer to the compilation structure
attr Attribute list

References _LCI_compilation::cnf, _LCI_configuration::inp, LCI_startItem(), LCI_tkrInput::splitLo, and LCI_cnfInput::tkr.

void LCI_enterTkrTack ( XLX_state *  xst,
const char **  attr 
)

Process the TKR "tack" tag.

Set the current item address to point to the TACK delay value.

Parameters:
xst Pointer to the compilation structure
attr Attribute list

References _LCI_compilation::cnf, _LCI_configuration::inp, LCI_startItem(), LCI_tkrInput::tack, and LCI_cnfInput::tkr.

void LCI_enterTkrThr ( XLX_state *  xst,
const char **  attr 
)

Process the TKR "threshold" tag.

Set the current item address to point to the trigger threshold DAC value.

Parameters:
xst Pointer to the compilation structure
attr Attribute list

References _LCI_compilation::cnf, _LCI_configuration::inp, LCI_startItem(), LCI_tkrInput::thr, and LCI_cnfInput::tkr.

void LCI_exitIter ( XLX_state *  xst  ) 

Process the end tag for an iterator.

If not all components of the iterator were supplied, an incomplete error is reported. If any value is out of range, a range error is reported.

Parameters:
xst Pointer to the compilation structure

References _LCI_compilation::badval, LCI_cnfItem::count, _LCI_compilation::curItem, _LCI_compilation::curMaxm, _LCI_compilation::curStat, _LCI_compilation::curTag, LCI_cnfItem::delta, LCI_getTagName(), LCI_cnfItem::start, and STS_GOTITER.

void LCI_exitParam ( XLX_state *  xst  ) 

Process the end tag for a parameter or iterator item.

If no value, good or bad, was supplied, an invalid value error is reported.

Parameters:
xst Pointer to the compilation structure

References _LCI_compilation::badval, _LCI_compilation::curStat, _LCI_compilation::curTag, and STS_GOTVALUE.

void LCI_fillItemCnst ( XLX_state *  xst,
const char *  element,
int  len 
)

Process the common "constant" tag value.

Fill in the the fields of the current configuration item as a constant value

Parameters:
xst Pointer to the compilation structure
element Pointer to the start of the character element (beware leading and trailing spaces)
len Length of the character element

References _LCI_compilation::badval, LCI_cnfItem::count, _LCI_compilation::curItem, _LCI_compilation::curMaxm, _LCI_compilation::curStat, _LCI_compilation::curTag, LCI_cnfItem::delta, LCI_strtou(), LCI_cnfItem::start, and STS_GOTVALUE.

void LCI_fillItemCount ( XLX_state *  xst,
const char *  element,
int  len 
)

Process the common "count" tag value.

Fill in the the count field of the current configuration item

Parameters:
xst Pointer to the compilation structure
element Pointer to the start of the character element (beware leading and trailing spaces)
len Length of the character element

References _LCI_compilation::badval, LCI_cnfItem::count, _LCI_compilation::curItem, _LCI_compilation::curStat, _LCI_compilation::curTag, LCI_strtou(), and STS_GOTVALUE.

void LCI_fillItemDelta ( XLX_state *  xst,
const char *  element,
int  len 
)

Process the common "delta" tag value.

Fill in the the delta field of the current configuration item

Parameters:
xst Pointer to the compilation structure
element Pointer to the start of the character element (beware leading and trailing spaces)
len Length of the character element

References _LCI_compilation::badval, _LCI_compilation::curItem, _LCI_compilation::curStat, _LCI_compilation::curTag, LCI_cnfItem::delta, LCI_strtoi(), and STS_GOTVALUE.

void LCI_fillItemInit ( XLX_state *  xst,
const char *  element,
int  len 
)

Process the common "initial" tag value.

Fill in the the start field of the current configuration item

Parameters:
xst Pointer to the compilation structure
element Pointer to the start of the character element (beware leading and trailing spaces)
len Length of the character element

References _LCI_compilation::badval, _LCI_compilation::curItem, _LCI_compilation::curMaxm, _LCI_compilation::curStat, _LCI_compilation::curTag, LCI_strtou(), LCI_cnfItem::start, and STS_GOTVALUE.

void LCI_fillItemKeyword ( XLX_state *  xst,
const char *  element,
int  len 
)

Process the value of a general iterator tag.

Fill in the the fields of the current configuration item appropriately based on the keyword.

Parameters:
xst Pointer to the compilation structure
element Pointer to the start of the character element (beware leading and trailing spaces)
len Length of the character element

References _LCI_compilation::badval, LCI_cnfItem::count, _LCI_compilation::curItem, _LCI_compilation::curStat, _LCI_compilation::curTag, LCI_cnfItem::delta, LCI_keyword(), LCI_cnfItem::start, and STS_GOTITER.

void LCI_getMapName ( LCI_tagIdMap map,
char *  name,
int  leng 
)

Get the tag name for a tag map entry.

This routine returns the possibly composite name of the tag described by a tag map entry.

Parameters:
map The address of the tag map entry
name The address of an area to receive the name
leng The available length of the name area

References _LCI_tagIdMap::pTag, and _LCI_tagIdMap::tag.

Referenced by LCI_getTagName(), and LCI_writeOnExit().

void LCI_getTagName ( LCI_compilation cmp,
char *  name,
int  leng 
)

Get the current tag name.

This routine returns the name of the main tag currently being processed.

Parameters:
cmp The address of the compilation structure
name The address of an area to receive the name
leng The available length of the name area

References _LCI_compilation::curTag, _LCI_tagIdMap::id, LCI_getMapName(), _LCI_compilation::nTags, and _LCI_compilation::tagMap.

Referenced by LCI_enterItemCnst(), LCI_enterItemCount(), LCI_enterItemDelta(), LCI_enterItemInit(), and LCI_exitIter().

unsigned LCI_keyword ( const char *  element,
int  len,
const char *  keyword 
)

Check if tag value matches a keyword.

Checks to see if the element begins with zero or more whitespace characters followed by the keyword (case insensitive), followed by zero or more whitespace characters.

Parameters:
element Pointer to the string inside the tag
len Length of the element
keyword Keyword to look for
Return values:
1 If the element begins with zero or more whitespace characters followed by the keyword
0 If the element begins with something other than the keyword

Referenced by LCI_charSetAcdChnl(), LCI_charSetCalAutoRng(), LCI_charSetCalCol(), LCI_charSetCalFirstRng(), LCI_charSetCalFourRng(), LCI_charSetParamHiLo(), LCI_charSetParamLatc(), LCI_charSetParamOnOff(), LCI_charSetPeriod(), LCI_charSetStrobe(), LCI_charSetSuppress(), LCI_charSetTkrChnl(), and LCI_fillItemKeyword().

LCI_compilation* LCI_newCompilation ( void   ) 

void LCI_procDoctype ( XLX_state *  xst,
const char *  type,
const char *  sysId,
const char *  pubId,
int  intSub 
)

Obtain information from the DOCTYPE declaration.

Parameters:
xst Pointer to the compilation structure
type The DOCTYPE string
sysId The SYSID string
pubId The PUBID string
intSub True if internal subset present

References _LCI_compilation::doc, LCI_setMode(), _LCI_compilation::mode, _LCI_compilation::status, STS_BADDOCTYPE, and STS_NODOCTYPE.

Referenced by LCI_compile().

unsigned LCI_setMode ( const char *  mode,
LCI_compilation cmp 
)

Set the calibration type (mode).

Parameters:
mode Type of configuration file to process (ACD, CAL or TKR). If null, mode is to be determined later.
cmp The address of the compilation block
Return values:
LCI_SUCCESS If all goes well
LCI_MODE if invalid mode

References acdDocChild, acdTagMap, calDocChild, calTagMap, _LCI_compilation::cnf, _LCI_compilation::doc, LCI_cnfInput::gem, _LCI_configuration::inp, LCI_version::mode, _LCI_compilation::mode, _LCI_compilation::nTags, LCI_gemInput::one_range, _LCI_compilation::status, STS_NODOCTYPE, _LCI_compilation::tagMap, tkrDocChild, tkrTagMap, and _LCI_configuration::ver.

Referenced by LCI_compile(), and LCI_procDoctype().

void LCI_startItem ( LCI_compilation cmp,
void *  item,
int  tag,
unsigned int  maxm 
)

unsigned LCI_strtoi ( LCI_compilation cmp,
const char *  string,
int  len,
int *  value 
)

Convert a string to a signed 32-bit integer.

Parameters:
cmp Pointer to the compilation structure
string String to convert
len Length of the string (including whitespace)
value Address of the converted value
Return values:
0 If the string represents a valid integer
-1 If the string contains invalid characters

References _LCI_compilation::badval, _LCI_compilation::curTag, and _LCI_compilation::xst.

Referenced by LCI_fillItemDelta().

unsigned LCI_strtoll ( LCI_compilation cmp,
const char *  string,
int  len,
long long *  value 
)

Convert a string to a signed 64-bit integer.

Parameters:
cmp Pointer to the compilation structure
string String to convert
len Length of the string (including whitespace)
value Address of the converted value
Return values:
0 If the string represents a valid integer
-1 If the string contains invalid characters

References _LCI_compilation::badval, _LCI_compilation::curTag, and _LCI_compilation::xst.

unsigned LCI_strtou ( LCI_compilation cmp,
const char *  string,
int  len,
unsigned *  value 
)

Convert a string to an unsigned 32-bit integer.

Parameters:
cmp Pointer to the compilation structure
string String to convert
len Length of the string (including whitespace)
value Address of the converted value
Return values:
0 If the string represents a valid integer
-1 If the string contains invalid characters

References _LCI_compilation::badval, _LCI_compilation::curTag, and _LCI_compilation::xst.

Referenced by LCI_charSetCalFirstRng(), LCI_charSetParam(), LCI_charSetParamLatc(), LCI_charSetPeriod(), LCI_fillItemCnst(), LCI_fillItemCount(), and LCI_fillItemInit().

unsigned LCI_strtoull ( LCI_compilation cmp,
const char *  string,
int  len,
unsigned long long *  value 
)

Convert a string to an unsigned 64-bit integer.

Parameters:
cmp Pointer to the compilation structure
string String to convert
len Length of the string (including whitespace)
value Address of the converted value
Return values:
0 If the string represents a valid integer
-1 If the string contains invalid characters

References _LCI_compilation::badval, _LCI_compilation::curTag, and _LCI_compilation::xst.

void LCI_writeOnExit ( XLX_state *  xst  ) 

Process configuration end tag.

If no errors were found in the configuration, the configuration data is written to the output file. On the first write, the configuration header is written first.

Parameters:
xst Pointer to the compilation structure

References _LCI_compilation::badval, _LCI_compilation::cnf, LCI_cnfItem::count, LCI_cnfItem::delta, _LCI_compilation::found, LCI_cnfInput::gem, _LCI_tagIdMap::id, _LCI_configuration::inp, LCI_getMapName(), LCI_write(), LCI_writeHdr(), _LCI_compilation::nCfgIn, _LCI_compilation::nCfgOut, LCI_gemInput::nev, _LCI_compilation::nTags, LCI_cnfItem::start, _LCI_tagIdMap::tag, _LCI_compilation::tagMap, and _LCI_tagIdMap::valOff.


Generated on Tue Nov 29 18:58:18 2011 by  doxygen 1.5.8