GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> RIM / dev > rim_ground / rhel4-32


Interface   Data Structures   File List   Data Fields   Globals  

RIM_regmap.c File Reference

Routines to maintain and check a map of the registers specified. More...

#include <RIM_p.h>
#include <RIM_ground_p.h>
#include <RIM_number.ic>
#include <RIM_data.ic>
#include <RIM/RIM_ground.h>
#include <RIM/RIM_msgs.h>
#include <MSG/MSG_pubdefs.h>

Functions

unsigned RIM_checkRegMap (const RIM *rim, const void *regmap, unsigned int dMask, unsigned int eMask)
 Check a register map for completeness.
void RIM_initRegMap (void *regmap)
 Initialize a register map.
void RIM_setRegBit (void *regmap, RIM_type type, int index, int reg)
 Set a bit in a register map (private).
void RIM_setRegDflts (RIM *rim, void *regmap)
 Propagate default register values to exceptions (private).
size_t RIM_sizeofRegMap (void)
 Get the amount of memory needed for a register map.


Detailed Description

Routines to maintain and check a map of the registers specified.

Author:
Owen Saxton
$Id: RIM_regmap.c,v 1.2 2011/03/27 06:53:19 saxton Exp $

Function Documentation

unsigned RIM_checkRegMap ( const RIM rim,
const void *  regmap,
unsigned int  dMask,
unsigned int  eMask 
)

Check a register map for completeness.

Parameters:
rim The address of the RIM structure
regmap The address of the register map to be checked
dMask A mask of default types to check
eMask A mask of exception types to check
Return values:
RIM_SUCCESS Success
RIM_REGNTSET One or more registers were not set

References checkBit(), RegDescription::name, CptDescription::nregs, CptDescription::rd, and setBit().

void RIM_initRegMap ( void *  regmap  ) 

Initialize a register map.

Parameters:
regmap The address of the register map to be initialized

References CptDescription::nregs.

void RIM_setRegBit ( void *  regmap,
RIM_type  type,
int  index,
int  reg 
)

Set a bit in a register map (private).

Parameters:
regmap The address of the register map to be modified
type The component type number, assumed to be in range
index The index of the component, assumed to be in range
reg The register number, assumed to be in range

References setBit().

void RIM_setRegDflts ( RIM rim,
void *  regmap 
)

Propagate default register values to exceptions (private).

Parameters:
rim The address of the RIM structure
regmap The address of the map of set registers

References checkBit(), getLngLngReg(), getLongReg(), getShortReg(), CptDescription::nregs, setBit(), setLngLngReg(), setLongReg(), setShortReg(), and CptDescription::width.

Referenced by RIM_parse().

size_t RIM_sizeofRegMap ( void   ) 

Get the amount of memory needed for a register map.

Returns:
The number of bytes needed.

References CptDescription::nregs.


Generated on Tue Sep 27 16:06:31 2011 by  doxygen 1.5.8