GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LATC / V9-1-3 > latc_cmn_wb / linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

lrd.h File Reference

Interface to the LAT register description helper functions. More...

#include <LATC/structs.h>

Typedefs

typedef unsigned LATC_type
 Creates a new type used to identify components (TEM, TFE etc).

Enumerations

enum  { LATC_BAD_TYPE = -1 }

Functions

unsigned LATC_nTypes (void)
 Return the number of component types within the LAT register description.
LATC_type LATC_lookupType (const char *string)
 Hunt through the list of component types and return the index of the input string.
unsigned LATC_nameType (char *string, LATC_type type)
 Place the four character string describing this type into name.
int LATC_compareType (const char *string, LATC_type type)
 Compare string with the name of type.
unsigned LATC_getAddrRng (const char *string, LATC_addr *addr)
 Finds the address range associated with the type identifed by the string.
unsigned LATC_getLayerID (char sign, char xy, char index, unsigned *layer)
 Take three characters and convert them to a layer ID.
unsigned LATC_getLayerName (unsigned layer, char *sign, char *xy, char *index)
 Get the characters of the layer name from the layer ID.


Detailed Description

Interface to the LAT register description helper functions.

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

Function Documentation

int LATC_compareType ( const char *  string,
LATC_type  type 
)

Compare string with the name of type.

Parameters:
string Name of a component type
type Type to compare to
Return values:
-1 If the type is unknown (exceeds the range of acceptable types)
0 If the type is known, and the name matches the string
1 If the type is known, and the name does not match the string

unsigned LATC_getAddrRng ( const char *  string,
LATC_addr addr 
)

Finds the address range associated with the type identifed by the string.

Parameters:
string Identifies the address range required
addr Pointer to address stucture to populate with the address range
Return values:
LATC_BADSTR If the string does not match a known type
LATC_SUCCESS If the string is a good type name.

References LATC_addr::cpt, and LATC_lookupType().

unsigned LATC_getLayerID ( char  sign,
char  xy,
char  index,
unsigned *  layer 
)

Take three characters and convert them to a layer ID.

Parameters:
sign '+' or '-'
xy 'x' or 'y'
index '0' -> '8'
layer Location to store the layer ID
Return values:
LATC_BADLAY If the layer information is nonsensical
LATC_SUCCESS If the layer ID was successfully found

References tkr_layer.

unsigned LATC_getLayerName ( unsigned  layer,
char *  sign,
char *  xy,
char *  index 
)

Get the characters of the layer name from the layer ID.

Parameters:
layer ID of the layer to name
sign Pointer to location to place the sign character
xy Pointer to location to place the xy character
index Pointer to location to place the index character
Return values:
LCI_SUCCESS If the layer is located
LCI_BADLAY If the layer is out of range

References tkr_layer.

Referenced by LATC_contrast().

LATC_type LATC_lookupType ( const char *  string  ) 

Hunt through the list of component types and return the index of the input string.

Parameters:
string String corresponding to one of the component types used in the LAT register description
Returns:
integer corresponding to the type identified by string or LATC_BAD_TYPE if the string does not match any on the list

Referenced by LATC_getAddrRng().

unsigned LATC_nameType ( char *  string,
LATC_type  type 
)

Place the four character string describing this type into name.

Parameters:
type Type to be named
string Location to place name
Return values:
LATC_SUCCESS If the type is known to LATC
LATC_BADTYPE If the type is unknown

unsigned LATC_nTypes ( void   ) 

Return the number of component types within the LAT register description.

Returns:
Number of component types


Generated on Sat Apr 9 19:55:02 2011 by  doxygen 1.5.8