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

Constituent: rim     Tag: sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

rim.h File Reference

Register In-memory Model structure. More...

#include "RIM/map.h"
#include <stdio.h>

Include dependency graph for rim.h:

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


Typedefs

typedef RIM_ RIM
 Forward declaration of the RIM structure.

Enumerations

enum  { RIM_MEM_ALIGN = sizeof(unsigned long long) }

Functions

size_t RIM_sizeof (void)
 Calculate the footprint of the RIM structure.
RIMRIM_construct (void *buffer)
 Initialised a block of memory as a RIM object.
void RIM_clear (RIM *rim)
 Clear out the map and data portions of the RIM structure.
int RIM_compare (const RIM *this, const RIM *that, RIM_map *map)
 Compares all the nodes of this and that, marking differences in the map.
unsigned RIM_contrast (const RIM *this, const RIM *that, const RIM_map *map, RIM_type *r_type, RIM_addr *r_addr)
 Compares 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_get (const RIM *rim, RIM_type type, const RIM_addr *addr, int regId, void *value)
 Puts the contents of the requested register and field into value.
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_deleteData (RIM *rim, RIM_type type, const RIM_addr *addr)
 Delete all the register field settings for the targetted compoent and clear the corresponding bit in the map.
unsigned RIM_consume (RIM *rim, int fd)
 Reads the buffer of data into the RIM structure.
unsigned RIM_createMask (RIM *rim)
 Creates a bitmask indicating which types can successfully be used with RIM_create.
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).
void RIM_report (RIM *rim, FILE *fp)
 Print a report of the contents of the IMM to the file.

Detailed Description

Register In-memory Model structure.

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

Function Documentation

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

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

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

Parameters:
this First in-memory configuration structure
that Second in-memory configuration structure
map Indicates which nodes are different
Returns:
Number of different nodes
If a node is NULL, then the default node is used.

RIM* RIM_construct void *  buffer  ) 
 

Initialised a block of memory as a RIM object.

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

unsigned RIM_consume RIM rim,
int  fd
 

Reads the buffer 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 transfered into the RIM structure
RIM_TYPE_UK The type identifier at the start of the buffer did not correspond to a known type
RIM_CPT_NONE The type ID does not appear to be associated to 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_contrast const RIM this,
const RIM that,
const RIM_map ign,
RIM_type r_type,
RIM_addr r_addr
 

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

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
If a node is NULL then the default node is used.

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_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

unsigned RIM_deleteData RIM rim,
RIM_type  type,
const RIM_addr addr
 

Delete all the register field settings for the targetted compoent and clear the corresponding bit in the map.

Parameters:
rim In memory configuration structure to be manipulated
type Type of data sought
addr Address of the leaf to delete
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

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

Puts 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
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

void RIM_report RIM rim,
FILE *  fp
 

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

Parameters:
rim RIM structure to use as a source
fp Pointer to destination of the report

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
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

size_t RIM_sizeof void   ) 
 

Calculate the footprint of the RIM structure.

Returns:
Amount of memory required to hold the RIM structure


Generated on Mon Aug 7 21:25:24 2006 by  doxygen 1.4.4