GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> RIM / V3-1-2 > rim_ground / rhel5-32


Interface   Data Structures   File List   Data Fields   Globals  

RIM_ground.h File Reference

Public definitions for RIM ground. More...

#include <RIM/RIM.h>
#include <stdio.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_dumpMap (const RIM_map *map, FILE *fp)
 Print out the map in hex dump format.
void RIM_genxml (const RIM *rim, FILE *fp)
 Generate XML source from the contents of a RIM.
void RIM_initRegMap (void *regmap)
 Initialize a register map.
unsigned RIM_parse (RIM *rim, void *regmap, const char *const *filelist, int nFile, int verb)
 Parse a set of XML files and populate the RIM.
unsigned RIM_parseMap (RIM_map *map, const char *const *filelist, int nFile, int verb)
 Parse a set of XML files and set bits in the RIM map.
void RIM_report (const RIM *rim, unsigned int secs, const char *title, FILE *fp)
 Print a report of the contents of the RIM to a file.
void RIM_reportMap (const RIM_map *map, const RIM_map *ign, FILE *fp, int level)
 Print a report of the contents of a RIM map to a file.
size_t RIM_sizeofRegMap (void)
 Get the amount of memory needed for a register map.


Detailed Description

Public definitions for RIM ground.

Author:
James Swain & Owen Saxton
$Id: RIM_ground.h,v 1.7 2011/03/27 05:55:26 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_dumpMap ( const RIM_map map,
FILE *  fp 
)

Print out the map in hex dump format.

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

References sizeofMap().

void RIM_genxml ( const RIM rim,
FILE *  fp 
)

Generate XML source from the contents of a RIM.

In order to produce the XML source, the hierarchy of component types must be reconstructed. This can done from either the tree of configuration tags or the tree of map tags. The latter is used since it contains only the hierarchy of types.

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

References RIM_mapTags().

void RIM_initRegMap ( void *  regmap  ) 

Initialize a register map.

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

References CptDescription::nregs.

unsigned RIM_parse ( RIM rim,
void *  regmap,
const char *const *  filelist,
int  nFile,
int  verb 
)

Parse a set of XML files and populate the RIM.

Parameters:
rim RIM object to populate from the XML files
regmap Register map to fill from the XML files
filelist List of strings containing the names of XML files to parse
nFile Number of XML files to parse
verb 1 for verbose, 0 for quiet
Return values:
RIM_SUCCESS Success
RIM_XMLPARSE The XLX parser detected an error
RIM_XMLVLERR A string had an invalid value

References RIM_setRegDflts().

unsigned RIM_parseMap ( RIM_map map,
const char *const *  filelist,
int  nFile,
int  verb 
)

Parse a set of XML files and set bits in the RIM map.

Parameters:
map RIM_map to populate from the XML files
filelist List of strings containing the names of XML files to parse
nFile Number of XML files to parse
verb 1 for verbose, 0 for quiet
Return values:
RIM_SUCCESS Success
RIM_XMLPARSE The XLX parser detected an error
RIM_XMLVLERR A string had an invalid value

void RIM_report ( const RIM rim,
unsigned int  secs,
const char *  title,
FILE *  fp 
)

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

Parameters:
rim RIM structure to use as a source
secs The time to display at the top of the report, in Unix time, or 0 if no time wanted.
title The address of the title to display at the top of the report, or NULL to display the default title - "LAT Configuration".
fp Pointer to destination of the report

References checkBit(), and CptDescription::width.

void RIM_reportMap ( const RIM_map map,
const RIM_map ign,
FILE *  fp,
int  level 
)

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

Parameters:
map Address of the RIM map structure to use as a source
ign Address of a RIM ignore map structure. May be NULL.
fp Pointer to destination of the report
level Printing level, as follows:
  • 0: Print only row segments with an unignored non-zero entry.
  • 1: Print only complete components with an unignored non-zero entry.
  • 2: Print everything.

References checkBit(), and _RIM_addr::cpt.

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 Nov 29 20:03:32 2011 by  doxygen 1.5.8