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_data.c File Reference

Functions manipulating the data attached to a configuration tree. More...

#include "RIM_p.h"
#include "RIM_number.ic"
#include "RIM_data.ic"
#include "RIM_AG_init_p.h"

Include dependency graph for RIM_data.c:


Defines

#define CHECK_TYPE(t_)
 Check that the type is valid.

Functions

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.
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.
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_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 targeted component and clear the corresponding bit in the map.
void RIM_setReg (void *cpt, RIM_type type, int regId, const void *value)
 Set the regId register of cpt structure to value.
int RIM_setFld (void *cpt, RIM_type type, int regId, int fldId, const void *value)
 Sets the tgtId field of the regId register of cpt structure to value.
void RIM_getReg (const void *cpt, RIM_type type, int regId, void *value)
 Puts the contents of the target register regId into value.
void RIM_getFld (const void *cpt, RIM_type type, int regId, int fldId, void *value)
 Puts the contents of the fldId field of register regId into value.
int RIM_regEnum (RIM_type type, int regId)
 Convert the public register ID in to the RIM internal register ID.

Detailed Description

Functions manipulating the data attached to a configuration tree.

Author:
James Swain & Owen Saxton
Id
RIM_data.c,v 1.2 2007/03/22 23:42:42 saxton Exp

Define Documentation

#define CHECK_TYPE t_   ) 
 

Value:

{ \
  if (N_RIM_TYPES <= t_) return RIM_TYPE_UK;  \
  if (!ld[t_])           return RIM_CPT_NONE; \
}
Check that the type is valid.


Function Documentation

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

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

unsigned RIM_deleteData RIM rim,
RIM_type  type,
const RIM_addr addr
 

Delete all the register field settings for the targeted component 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
 

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

void RIM_getFld const void *  cpt,
RIM_type  type,
int  regId,
int  fldId,
void *  value
 

Puts the contents of the fldId field of register regId into value.

Parameters:
type Type of data sought
cpt Pointer to start of the component data.
regId Enumerated ID of the register
fldId Target field
value Location to put the contents of the target field

void RIM_getReg const void *  cpt,
RIM_type  type,
int  regId,
void *  value
 

Puts the contents of the target register regId into value.

Parameters:
cpt Pointer to start of the component data.
type Type of data sought
regId Enumerated ID of the register
value Location to put the contents of the target reg

int RIM_regEnum RIM_type  type,
int  regId
 

Convert the public register ID in to the RIM internal register ID.

Parameters:
type Component type
regId Register ID in terms of hardware numbering (the Huffer docs and LEM)
Returns:
The index of the register in the array of register descriptions within the component description

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

int RIM_setFld void *  cpt,
RIM_type  type,
int  regId,
int  fldId,
const void *  value
 

Sets the tgtId field of the regId register of cpt structure to value.

Parameters:
cpt Pointer to start of the component data.
type Type of component
regId Enum specifying register to write to
fldId Enum specifying field to write to
value Value to set the field to.
Return values:
RIM_SUCCESS If all goes well
RIM_FLDRNG 

void RIM_setReg void *  cpt,
RIM_type  type,
int  regId,
const void *  value
 

Set the regId register of cpt structure to value.

Parameters:
cpt Pointer to start of the component data.
type Type of data sought
regId Enum specifing register to write to
value Value to set register to


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