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

Constituent: rim     Tag: mv2304


Interface   Data Structures   File List   Data Fields   Globals  

RIM.h File Reference

Public definitions for the RIM (Register In-Memory) facility. More...

#include <stdio.h>

Include dependency graph for RIM.h:

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


Data Structures

struct  Layer_addr
 Address of a TFE/SPT node. More...
struct  ACD_addr
 Address of a ARC/AFE node. More...
struct  TEM_addr
 Address of a TEM/TIC/CCC/TCC/CRC/TRC/CFE node. More...
union  RIM_addr
 Union of all the address structures and an array, used for hierarchical leaf identification throughout RIM. More...
struct  RIM_errorInfo
 Information used to record a read error occured. More...

Typedefs

typedef unsigned RIM_type
 Creates a new type used to identify components (TEM, TFE etc).
typedef RIM_ RIM
 Forward declaration of the RIM structure.
typedef RIM_map_ RIM_map
 Forward declaration of the RIM_map structure, a bit-map of all the LAT components.
typedef void( RIM_decodeFn )(unsigned short *pkt, void *ptr)
 Function that Decodes the response from one type of LAT register.
typedef unsigned( RIM_loadFn )(void *param, const RIM_addr *addr, unsigned regId, const void *value)
 Function that Loads one type of LAT register.
typedef unsigned( RIM_readFn )(void *param, const RIM_addr *addr, unsigned regId, RIM_decodeFn *decodeFn, void *dst, const RIM_errorInfo *info)
 Function that Reads one type of LAT register.
typedef void( RIM_startDgm )(void *ctl)
 Function called to start a new datagram.
typedef unsigned( RIM_startCtb )(void *ctl, size_t size, unsigned type)
 Function called to start a new contribution.
typedef void( RIM_addData )(void *ctl, void *data, size_t size)
 Function called to add data to a contribution.
typedef void( RIM_endCtb )(void *ctl)
 Function called to end a datagram.
typedef unsigned( RIM_endDgm )(void *ctl)
 Function called to end (and send) a datagram.

Enumerations

enum  {
  LATC_MAJ = 14,
  LATC_MIN = 0
}
 Current version numbers.
enum  { RIM_MEM_ALIGN = sizeof(unsigned long long) }
 Memory alignment requirements on a memory block used for a RIM structure.
enum  { FIO_PERMS = 0666 }
 File permissions for output files.
enum  LATC_CTB_BASE_ID {
  LATC_SSR_APID = 0x3fd,
  LATC_CTB_MAP = 0,
  LATC_CTB_DATA = 128
}
 Contribution type base ID for the two types of LATC contributions.
enum  {
  RIM_BCAST_ADDR = 255,
  N_RIM_ADDR_CPTS = 4
}
 Constant values associated with addressing LAT component instances.
enum  { RIM_BAD_TYPE = -1 }
enum  RIM_ERROR {
  RIM_SUCCESS = 0,
  RIM_ADDR_BCAST = -11,
  RIM_ADDR_RANGE = -12,
  RIM_ADDR_INDEX = -13,
  RIM_ADDR_LAYER = -14,
  RIM_ADDR_LSIG = -15,
  RIM_ADDR_LXY = -16,
  RIM_ADDR_LIND = -17,
  RIM_TYPE_UK = -21,
  RIM_TYPE_STR = -22,
  RIM_MAP_NONE = -31,
  RIM_DIFFER = -41,
  RIM_REG_ID = -42,
  RIM_FLD_ID = -43,
  RIM_NOT_SET = -44,
  RIM_CPT_NONE = -45,
  RIM_XML_PARSE = -51,
  RIM_FILE_END = -61,
  RIM_FILE_READ = -62,
  RIM_FILE_WRITE = -63,
  RIM_FILE_OPEN = -64,
  RIM_FILE_CLOSE = -65,
  RIM_BUF_SHORT = -71,
  RIM_FLD_RANGE = -81
}
 RIM error codes. More...

Functions

int RIM_checkBit (const RIM_map *map, RIM_type type, const RIM_addr *addr)
 Check a bit in the map.
void RIM_clear (RIM *rim)
 Clear out the map and data portions of the RIM structure.
unsigned RIM_clearBit (RIM_map *map, RIM_type type, const RIM_addr *addr)
 Clear a bit in the map.
unsigned RIM_clearByTWR (RIM_map *map, RIM_type type, unsigned twr)
 Clear all bits in a submap corresponding to a particular tower.
void RIM_clearMap (RIM_map *map)
 Clear the map.
int RIM_compare (const RIM *this, const RIM *that, RIM_map *map)
 Compare all the nodes of this and that, marking differences in the map.
int RIM_compareType (const char *string, RIM_type type)
 Compare string with the name of type.
RIMRIM_construct (void *buffer)
 Initialise a block of memory as a RIM object.
RIM_mapRIM_constructMap (void *buffer)
 Initialise the supplied memory as a RIM_map object.
unsigned RIM_consume (RIM *rim, int fd)
 Read the block of data into the RIM structure.
unsigned RIM_consumeMap (RIM_map *map, int fd)
 Read map data into the map structure.
unsigned RIM_contrast (const RIM *this, const RIM *that, const RIM_map *map, RIM_type *r_type, RIM_addr *r_addr)
 Compare all the nodes of this and that, that are not marked to be ignored.
void RIM_correct (RIM *orig, RIM *capt)
 Copy select portions of an original RIM into a copy, to ensure that the subsequent comparison will succeed.
unsigned RIM_create (RIM *rim, RIM_type type, int fd)
 Create a single binary configuration file containing the data of one component (or the default data).
unsigned RIM_createMap (RIM_map *map, int fd)
 Write out the data of a RIM_map structure.
unsigned RIM_createMask (RIM *rim)
 Creates a bitmask indicating which types can successfully be used with RIM_create.
void RIM_dumpMap (RIM_map *map, FILE *fp)
 Print out the map.
unsigned RIM_get (const RIM *rim, RIM_type type, const RIM_addr *addr, int regId, void *value)
 Put the contents of the requested register and field into value.
unsigned RIM_getAddress (RIM_addr *addr, unsigned index, RIM_type type)
 Convert hierarchical bit addressing to flat addressing.
unsigned RIM_getAddrRng (const char *string, RIM_addr *addr)
 Finds the address range associated with the type identifed by the string.
const char * RIM_getErrorString (RIM_ERROR err)
 Look up descriptive string for an error code.
unsigned RIM_getIndex (const RIM_addr *addr, unsigned *index, RIM_type type)
 Convert hierarchical bit addressing to flat addressing.
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_load (RIM *rim, void *param, RIM_loadFn **loadFn)
 Load the LAT with the configuration held in a RIM structure.
unsigned RIM_loadMdfy (RIM *rim, RIM_type type, unsigned reg, unsigned feMask, void *mask, void *value, void *param, RIM_loadFn **loadFn)
 Load all instances of a register with a modified version of its value in the LAT configuration.
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.
unsigned RIM_nTypes (void)
 Return the number of component types within the LAT register description.
unsigned RIM_read (RIM *rim, void *param, RIM_readFn **readFn, RIM_decodeFn **decodeFn, const RIM_map *ign)
 Populate the RIM structure with the current state of the LAT.
unsigned RIM_record (RIM *rim, void *pkt, RIM_startDgm *startDgm, RIM_startCtb *startCtb, RIM_addData *addData, RIM_endCtb *endCtb, RIM_endDgm *endDgm)
 Send the RIM to the SSR.
void RIM_report (RIM *rim, FILE *fp, unsigned noDflt)
 Print a report of the contents of the RIM to a file.
unsigned RIM_retrieve (RIM *rim, char *dat, size_t len, unsigned id, int verb)
 Recover a portion of the RIM from a data buffer (actually an LSF contribution).
unsigned RIM_set (RIM *rim, RIM_type type, const RIM_addr *addr, int regId, const void *value)
 Set the value of a register field.
unsigned RIM_setBit (RIM_map *map, RIM_type type, const RIM_addr *addr)
 Set a bit in the map.
unsigned RIM_setByTWR (RIM_map *map, RIM_type type, unsigned twr)
 Set all bits in a submap corresponding to a particular tower.
void RIM_setSPT (void *ptr, unsigned short value, unsigned isHigh)
 Decode the result item use to populate a split.
size_t RIM_sizeof (void)
 Calculate the footprint of the RIM structure.
size_t RIM_sizeofMap (void)
 Calculate the total size of a RIM_map object.

Detailed Description

Public definitions for the RIM (Register In-Memory) facility.

Author:
James Swain & Owen Saxton
Id
RIM.h,v 1.2 2007/03/22 23:40:00 saxton Exp

Enumeration Type Documentation

enum RIM_ERROR
 

RIM error codes.

Enumerator:
RIM_ADDR_BCAST  Address structure has a mixture of broadcast and unicast components.
RIM_ADDR_RANGE  Address structure has a component out of range.
RIM_ADDR_INDEX  The final index exceeds the total number of bits in the map.
RIM_ADDR_LAYER  The layer information is nonsensical.
RIM_ADDR_LSIG  The layer sign is wrong.
RIM_ADDR_LXY  The layer x/y is wrong.
RIM_ADDR_LIND  The layer index is wrong.
RIM_TYPE_UK  RIM_type is unknown.
RIM_TYPE_STR  The string does not match a type name.
RIM_MAP_NONE  There is no sub-map corresponding to this type.
RIM_DIFFER  Two RIM structures are functionally different.
RIM_REG_ID  The register ID is out of range.
RIM_FLD_ID  The field ID is out of range.
RIM_NOT_SET  The requested node has not be previously set.
RIM_CPT_NONE  The requested node has no real data.
RIM_XML_PARSE  There was an error parsing the XML.
RIM_FILE_END  File end was reached.
RIM_FILE_READ  There was an error reading a file.
RIM_FILE_WRITE  There was an error writing to a file.
RIM_FILE_OPEN  There was an error opening a file.
RIM_FILE_CLOSE  There was an error closing a file.
RIM_BUF_SHORT  Supplied buffer is too short.
RIM_FLD_RANGE  Value being loaded into a field is too large.


Function Documentation

int RIM_checkBit const RIM_map map,
RIM_type  type,
const RIM_addr addr
 

Check a bit in the map.

Parameters:
map Structure being manipulated
type Identifies map to manipulate
addr bit to check
Return values:
0 if the bit is clear
1 if the bit is set

void RIM_clear RIM rim  ) 
 

Clear out the map and data portions of the RIM structure.

Parameters:
rim Pointer to the RIM object to clear

unsigned RIM_clearBit RIM_map map,
RIM_type  type,
const RIM_addr addr
 

Clear a bit in the map.

Parameters:
map Structure being manipulated
type Identifies map to manipulate
addr bit to clear
Return values:
RIM_SUCCESS if everything goes well
RIM_TYPE_UK if the type does not exist
RIM_MAP_NONE if there is no sub-map corresponding to this type
RIM_ADDR_BCAST if the address contains a mixture of broadcast and singlecast addresses
RIM_ADDR_RANGE if any component of the address is out of range
RIM_ADDR_INDEX if the final index exceeds the total number of bits in the map

unsigned RIM_clearByTWR RIM_map map,
RIM_type  type,
unsigned  twr
 

Clear all bits in a submap corresponding to a particular tower.

Parameters:
map Pointer to a RIM_map structure
type Identifies the sub-map to manipulate
twr Index of a tower
Return values:
RIM_SUCCESS if everything goes well
RIM_TYPE_UK if the type does not exist
RIM_MAP_NONE if there is no sub-map corresponding to this type
RIM_ADDR_BCAST if the address contains a mixture of broadcast and singlecast addresses
RIM_ADDR_RANGE if any component of the address is out of range
RIM_ADDR_INDEX if the final index exceeds the total number of bits in the map

void RIM_clearMap RIM_map map  ) 
 

Clear the map.

Parameters:
map Structure being manipulated

int RIM_compare const RIM this,
const RIM that,
RIM_map map
 

Compare all the nodes of this and that, marking differences in the map.

If a node is NULL, then the default node is used.

Parameters:
this First in-memory configuration structure
that Second in-memory configuration structure
map Indicates which nodes are different
Returns:
Number of different nodes

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

RIM* RIM_construct void *  buffer  ) 
 

Initialise a block of memory as a RIM object.

Parameters:
buffer Pointer to uninitialised memory to use for the RIM structure
Returns:
The address of the initialised RIM structure, or NULL if the buffer is misaligned

RIM_map* RIM_constructMap void *  buf  ) 
 

Initialise the supplied memory as a RIM_map object.

Parameters:
buf Block of memory, at least as large as RIM_sizeofMap, to initalise as a RIM_map object
Returns:
Pointer to an initialised RIM_map object

unsigned RIM_consume RIM rim,
int  fd
 

Read the block of data into the RIM structure.

Parameters:
rim Pointer to the RIM structure to populate
fd Descriptor of a file opened for reading
Return values:
RIM_SUCCESS The data was successfully read
RIM_TYPE_UK The type identifier at the start of the block did not correspond to a known type
RIM_CPT_NONE The type ID does not appear to be associated with a LAT component
RIM_MAP_NONE The data was of a singleton type, by an attempt to recover a map was made
RIM_FILE_END If the end of the file is reached
RIM_FILE_READ If there is an error reading from the file

unsigned RIM_consumeMap RIM_map map,
int  fd
 

Read map data into the map structure.

Parameters:
map Map structure to populate from file
fd Descriptor of a file opened for reading
Return values:
RIM_SUCCESS if all goes well
RIM_FILE_READ if an error occures whilst the file is being read
RIM_FILE_END if the end of the file is unexpectedly encountered

unsigned RIM_contrast const RIM this,
const RIM that,
const RIM_map ign,
RIM_type r_type,
RIM_addr r_addr
 

Compare all the nodes of this and that, that are not marked to be ignored.

If a node is NULL then the default node is used.

Parameters:
this First in memory configuration model
that Second in memory configuration model
ign Pointer to a bit-map of sections of the LAT to ignore
r_type Location to fill with the type of the first different node (can be NULL if not interested)
r_addr Pointer to an address structure to populate with the first different node (can be NULL if not interested)
Return values:
RIM_SUCCESS If the two in-memory models are functionally identical
RIM_DIFFER If the two in-memory models are different

void RIM_correct RIM orig,
RIM capt
 

Copy select portions of an original RIM into a copy, to ensure that the subsequent comparison will succeed.

Parameters:
orig Orignal RIM
capt New copy of the RIM (probably captured from the LAT)

unsigned RIM_create RIM rim,
RIM_type  type,
int  fd
 

Create a single binary configuration file containing the data of one component (or the default data).

Parameters:
rim RIM structure to use as a source
type Component type to write out
fd Descriptor of a file opened for writing
Return values:
RIM_SUCCESS if all goes well
RIM_FILE_WRITE if one of the file write operations failed
RIM_MAP_NONE if the selected type is not written seperately
RIM_CPT_NONE if the selected type has not data specified

unsigned RIM_createMap RIM_map map,
int  fd
 

Write out the data of a RIM_map structure.

Parameters:
map Pointer to the RIM_map whose data should be written to file
fd Descriptor of a file opened for writing
Return values:
RIM_SUCCESS if all goes well
RIM_FILE_WRITE if one of the file write operations failed

unsigned RIM_createMask RIM rim  ) 
 

Creates a bitmask indicating which types can successfully be used with RIM_create.

Parameters:
rim Pointer to the in-memory model
Returns:
Bit mask indicating the types of files that can be created

void RIM_dumpMap RIM_map map,
FILE *  fp
 

Print out the map.

Parameters:
fp Pointer to file to dump the map to
map Pointer to an initialised map structure

unsigned RIM_get const RIM rim,
RIM_type  type,
const RIM_addr addr,
int  regId,
void *  value
 

Put the contents of the requested register and field into value.

Parameters:
rim In memory configuration structure to be interogated
type Type of data sought
addr Address of the leaf requested
regId Register to get, as LAT hardware ID
value Location to put the contents of the target field
Return values:
RIM_SUCCESS if all the parameters are in bounds and the data is successfully retrieved.
RIM_TYPE_UK if type is not a valid RIM_type
RIM_CPT_NONE if the requested type has no real data
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
RIM_REG_ID if regId is outside the acceptable range of register IDs for this type
RIM_NOT_SET if the requested node has not been previously set

unsigned RIM_getAddress RIM_addr addr,
unsigned  index,
RIM_type  type
 

Convert hierarchical bit addressing to flat addressing.

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.

Parameters:
addr Address to convert
index Index corresponding to address
type Type of address to convert
Return values:
RIM_SUCCESS if the address is successfully converted to an index
RIM_ADDR_RANGE if any component of the address is outside the allowable range for this type

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_SUCCESS If the string is a good type name.
RIM_TYPE_STR If the string does not match a known type

const char* RIM_getErrorString RIM_ERROR  err  ) 
 

Look up descriptive string for an error code.

Parameters:
err Error code to lookup
Returns:
Pointer to a string describing the error code.

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

Convert hierarchical bit addressing to flat addressing.

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.

Parameters:
addr Address to convert
type Type of address to convert
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

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_SUCCESS If the layer ID was successfully found
RIM_ADDR_LSIG If the layer sign is nonsensical
RIM_ADDR_LXY If the layer xy value is nonsensical
RIM_ADDR_LIND If the layer index is nonsensical

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:
RIM_SUCCESS If the layer is located
RIM_ADDR_LAYER If the layer is out of range

unsigned RIM_load RIM rim,
void *  param,
RIM_loadFn **  loadFn
 

Load the LAT with the configuration held in a RIM structure.

Parameters:
rim Pointer to the RIM structure to populate from the LAT
param Pointer passed through to the loadRegFn
loadFn Type ordered array of pointers to functions that load the LAT registers

unsigned RIM_loadMdfy RIM rim,
RIM_type  type,
unsigned  regId,
unsigned  feMask,
void *  mask,
void *  value,
void *  param,
RIM_loadFn **  loadFn
 

Load all instances of a register with a modified version of its value in the LAT configuration.

This routine, in its simplest form, allows all registers of a single component of the configuration to be written to the LAT. Additionally this may be further restricted to a single register of that component. In this case, each instance of the register may also have its value modified by a supplied value under a supplied mask. Furthermore, if the register is a front-end one (AFE, CFE or TFE), the modification can be optionally restricted to only those front-ends with a corresponding bit set in the supplied front-end mask.

Parameters:
rim Pointer to the cached in-memory model of the LAT registers
type The type (from RIM/RIM_AG_types.h) of the component to be loaded.
regId The hardware ID of the register being loaded, or RIM_BCAST_ADDR if all registers are to be loaded unmodified.
feMask If the specified register is a front-end register, restricts the modification to only those front-ends with bits set in this mask. The value -1 indicates in an optimal way that all front-ends are modified.
mask The address of the bit mask of the fields of the register being replaced
value The address of the value to use in place of the masked part of the register
param Parameter passed through to the load function
loadFn Type ordered array of pointers to functions that load the LAT registers

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

unsigned RIM_read RIM rim,
void *  param,
RIM_readFn **  readFn,
RIM_decodeFn **  decodeFn,
const RIM_map ign
 

Populate the RIM structure with the current state of the LAT.

Parameters:
rim Pointer to the RIM structure to populate from the LAT
param Pointer passed through to the readRegFn
readFn Type ordered array of pointers to functions that read the LAT registers
decodeFn Type ordered array of pointers to functions that decode the register responses
ign Map of the sections of the LAT known to be bad or not present so can be ignored.

unsigned RIM_record RIM rim,
void *  pkt,
RIM_startDgm startDgm,
RIM_startCtb startCtb,
RIM_addData addData,
RIM_endCtb endCtb,
RIM_endDgm endDgm
 

Send the RIM to the SSR.

Parameters:
rim Pointer to the RIM structure used to populate the datagram
pkt Opaque pointer to the control structure passed back to the call-backs
startDgm Pointer to function used to start datagram
startCtb Pointer to function used to start a contribution
addData Pointer to function used to add a block of data
endCtb Pointer to function used to end a contribution
endDgm Pointer to function used to end a datagram
Returns:
One of the error codes from ITC_send, LATC_OUTSIZE if there is a coding error and one of the contributions will not fit into an otherwise empty datagram or LATC_SUCCESS if all goes well.

void RIM_report RIM rim,
FILE *  fp,
unsigned  noDflt
 

Print a report of the contents of the RIM to a file.

Parameters:
rim RIM structure to use as a source
fp Pointer to destination of the report
noDflt True if default values not present

unsigned RIM_retrieve RIM rim,
char *  dat,
size_t  len,
unsigned  id,
int  verb
 

Recover a portion of the RIM from a data buffer (actually an LSF contribution).

Parameters:
rim Pointer to the RIM to populate
dat Pointer to a block of data to use
len Length of the data
id Contribution identfier
verb 1 - print information messages, 0 - don't
Return values:
RIM_SUCCESSS If the contribution is successfully handled
RIM_TYPE_UK If the type ID in the contribution indicates a component type that does not have configuration data
RIM_MAP_NONE If the type ID in the contribution indicates a component map for a single component
RIM_BUF_SHORT If the contribution is too short to contain the specified data

unsigned RIM_set RIM rim,
RIM_type  type,
const RIM_addr addr,
int  regId,
const void *  value
 

Set the value of a register field.

Parameters:
rim In memory configuration structure to manipulated
type Type of data sought
addr Address of the leaf requested
regId Register to set, as a LAT hardware ID
value Ptr to value to set the register field to
Return values:
RIM_SUCCESS if all the parameters are in bounds and the data is successfully retrieved.
RIM_TYPE_UK if type is not a valid RIM_type
RIM_CPT_NONE if the requested type has no real data
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
RIM_REG_ID if regId is outside the acceptable range of register IDs for this type
RIM_FLD_ID if fldId is outside the acceptable range of field IDs

unsigned RIM_setBit RIM_map map,
RIM_type  type,
const RIM_addr addr
 

Set a bit in the map.

Parameters:
map Structure being manipulated
type Identifies map to manipulate
addr bit to set
Return values:
RIM_SUCCESS if everything goes well
RIM_TYPE_UK if the type does not exist
RIM_MAP_NONE if there is no sub-map corresponding to this type
RIM_ADDR_BCAST if the address contains a mixture of broadcast and singlecast addresses
RIM_ADDR_RANGE if any component of the address is out of range
RIM_ADDR_INDEX if the final index exceeds the total number of bits in the map

unsigned RIM_setByTWR RIM_map map,
RIM_type  type,
unsigned  twr
 

Set all bits in a submap corresponding to a particular tower.

Parameters:
map Pointer to a RIM_map structure
type Identifies the sub-map to manipulate
twr Index of a tower
Return values:
RIM_SUCCESS if everything goes well
RIM_TYPE_UK if the type does not exist
RIM_MAP_NONE if there is no sub-map corresponding to this type
RIM_ADDR_BCAST if the address contains a mixture of broadcast and singlecast addresses
RIM_ADDR_RANGE if any component of the address is out of range
RIM_ADDR_INDEX if the final index exceeds the total number of bits in the map

void RIM_setSPT void *  ptr,
unsigned short  value,
unsigned  isHigh
 

Decode the result item use to populate a split.

Parameters:
ptr Pointer to memory location to put decoded value
value One of the split fields
isHigh Indicates which of the split fields this is

size_t RIM_sizeof void   ) 
 

Calculate the footprint of the RIM structure.

Returns:
Amount of memory required to hold the RIM structure

size_t RIM_sizeofMap void   ) 
 

Calculate the total size of a RIM_map object.

Returns:
Amount of memory required to accomodate a RIM_map object


Generated on Fri Jun 15 02:02:09 2007 by  doxygen 1.4.4