GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LATC / V9-1-3 > latc_host / rhel4-32


Interface   Data Structures   File List   Data Fields   Globals  

parser_state.c File Reference

Initialisation of the LATC_state structure. More...

#include <LATC/LATC_msgs.h>
#include <LATC/latc.h>
#include <imm.h>
#include <data.h>
#include <addr.h>
#include <parser_state_p.h>
#include <parser_descriptor_p.h>
#include <parser_tag_p.h>
#include <number.ic>
#include <AG_descriptions_s.h>
#include <AG_latcType_s.h>
#include <XLX/XLX.h>
#include <MSG/MSG_pubdefs.h>
#include <ctype.h>
#include <string.h>
#include <stdlib.h>

Functions

unsigned readShort (LATC_imm *latc, LATC_type type, LATC_addr *addr, unsigned regId, unsigned fldId, const char *element, unsigned len)
 Convert a hexedecimal string into a bit mask of no more than 16 bits and then set the corresponding field of the config tree.
unsigned readLng (LATC_imm *latc, LATC_type type, LATC_addr *addr, unsigned regId, unsigned fldId, const char *element, unsigned len)
 Convert a hexedecimal string into a bit mask of no more than 32 bits and then set the corresponding field of the config tree.
unsigned readLngLng (LATC_imm *latc, LATC_type type, LATC_addr *addr, unsigned regId, unsigned fldId, const char *element, unsigned len)
 Convert a hexedecimal string into a bit mask of no more than 64 bits and then set the corresponding field of the config tree.
void readField (XLX_state *xState, const char *element, int len)
 Interprets a character element in the context of populating a LATC_imm.
void mapChar (XLX_state *xState, const char *element, int len)
 Interprets a character element in the context of setting and clearing map bits.


Detailed Description

Initialisation of the LATC_state structure.

Author:
James Swain -- jswain@slac.stanford.edu

Function Documentation

void mapChar ( XLX_state *  xState,
const char *  element,
int  len 
)

Interprets a character element in the context of setting and clearing map bits.

Parameters:
xState XLX State of the parser
element Character element
len Length of the character element

References LATC_state::addr, LATC_state::latc, and LATC_tag::type.

Referenced by LATC_parseMap().

void readField ( XLX_state *  xState,
const char *  element,
int  len 
)

Interprets a character element in the context of populating a LATC_imm.

Parameters:
xState XLX State of the parser
element Charater element
len Length of the character element

References LATC_state::addr, checkBit(), LATC_state::excptn, LATC_descriptor::fldId, LATC_state::latc, readLng(), readLngLng(), readShort(), LATC_descriptor::regId, and LATC_tag::type.

Referenced by LATC_parse().

unsigned readLng ( LATC_imm *  latc,
LATC_type  type,
LATC_addr addr,
unsigned  regId,
unsigned  fldId,
const char *  element,
unsigned  len 
)

Convert a hexedecimal string into a bit mask of no more than 32 bits and then set the corresponding field of the config tree.

Parameters:
latc Pointer to the LATC structure
type Component type being handled
addr Address of the component to set
regId Register to set
fldId Field to set
element Character element containing a text string of the value to set
len Length of the character element
Returns:
One of LATC_msgs, LATC_SUCCESS if all goes well

Referenced by readField().

unsigned readLngLng ( LATC_imm *  latc,
LATC_type  type,
LATC_addr addr,
unsigned  regId,
unsigned  fldId,
const char *  element,
unsigned  len 
)

Convert a hexedecimal string into a bit mask of no more than 64 bits and then set the corresponding field of the config tree.

Parameters:
latc Pointer to the LATC structure
type Component type being handled
addr Address of the component to set
regId Register to set
fldId Field to set
element Character element containing a text string of the value to set
len Length of the character element
Returns:
One of LATC_msgs, LATC_SUCCESS if all goes well

Referenced by readField().

unsigned readShort ( LATC_imm *  latc,
LATC_type  type,
LATC_addr addr,
unsigned  regId,
unsigned  fldId,
const char *  element,
unsigned  len 
)

Convert a hexedecimal string into a bit mask of no more than 16 bits and then set the corresponding field of the config tree.

Parameters:
latc Pointer to the LATC structure
type Component type being handled
addr Address of the component to set
regId Register to set
fldId Field to set
len Length of the character element
element Character element containing a text string of the value to set
Returns:
One of LATC_msgs, LATC_SUCCESS if all goes well

Referenced by readField().


Generated on Sat Apr 9 19:53:21 2011 by  doxygen 1.5.8