GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > RIM / V0-0-2

Constituent: rim     Tag: sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

lrd.h File Reference

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

#include "RIM/structs.h"

Include dependency graph for lrd.h:

This graph shows which files directly or indirectly include this file:


Typedefs

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

Enumerations

enum  { RIM_BAD_TYPE = -1 }

Functions

unsigned RIM_nTypes (void)
 Return the number of component types within the LAT register description.
RIM_type RIM_lookupType (const char *string)
 Hunt through the list of component types and return the index of the input string.
unsigned RIM_nameType (char *string, RIM_type type)
 Place the four character string describing this type into name.
int RIM_compareType (const char *string, RIM_type type)
 Compare string with the name of type.
unsigned RIM_getAddrRng (const char *string, RIM_addr *addr)
 Finds the address range associated with the type identifed by the string.
unsigned RIM_getLayerID (char sign, char xy, char index, unsigned *layer)
 Take three characters and convert them to a layer ID.
unsigned RIM_getLayerName (unsigned layer, char *sign, char *xy, char *index)
 Get the characters of the layer name from the layer ID.
unsigned RIM_getAddress (RIM_addr *addr, unsigned index, RIM_type type)
 Convert hierarchical bit addressing to flat addressing.
unsigned RIM_getIndex (const RIM_addr *addr, unsigned *index, RIM_type type)
 Convert hierarchical bit addressing to flat addressing.

Detailed Description

Interface to the LAT register description helper functions.

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

Function Documentation

int RIM_compareType const char *  string,
RIM_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 RIM_getAddress RIM_addr addr,
unsigned  index,
RIM_type  type
 

Convert hierarchical bit addressing to flat addressing.

Parameters:
addr Address to convert
type Type of address to conver
index Index corresponding to address
Return values:
0 if the address is successfully converted to an index
-2 if any component of the address is outside the allowable range for this type
Note that GTFEs are usually referred to as being part of an X or Y layer. This identification is converted to an absolute layer number and stored in the rc space by addr->rc = (layerNumber << 1) | isYlayer. This conversion is performed by the XLM->RIM converter, but is documented here since it is a storage convention.

unsigned RIM_getAddrRng const char *  string,
RIM_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:
RIM_TYPE_STR If the string does not match a known type
RIM_SUCCESS If the string is a good type name.

unsigned RIM_getIndex const RIM_addr addr,
unsigned *  index,
RIM_type  type
 

Convert hierarchical bit addressing to flat addressing.

Parameters:
addr Address to convert
type Type of address to conver
index Index corresponding to address
Return values:
RIM_SUCCESS if the address is successfully converted to an index
RIM_ADDR_BCAST if the address contains a mixture of broadcast and unicast components
RIM_ADDR_RANGE if any component of the address is outside the allowable range for this type
Note that GTFEs are usually referred to as being part of an X or Y layer. This identification is converted to an absolute layer number and stored in the rc space by addr->rc = (layerNumber << 1) | isYlayer. This conversion is performed by the XLM->binary converter, but is documented here since it is a storage convention.

unsigned RIM_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:
RIM_ADDR_LAYER If the layer information is nonsensical
RIM_SUCCESS If the layer ID was successfully found

unsigned RIM_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_ADDR_LAYER If the layer is out of range

RIM_type RIM_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 RIM_BAD_TYPE if the string does not match any on the list

unsigned RIM_nameType char *  string,
RIM_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:
RIM_SUCCESS If the type is known to RIM
RIM_TYPE_UK If the type is unknown

unsigned RIM_nTypes void   ) 
 

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

Returns:
Number of component types


Generated on Thu Apr 13 23:55:10 2006 by  doxygen 1.4.4