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

Constituent: rim     Tag: linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

consume.c File Reference

Function to populate a RIM structure. More...

#include "RIM/rim.h"
#include "error_p.h"
#include "descriptions.ic"
#include "number.ic"
#include "AG_initRIM_p.h"
#include "PBS/BSWP.h"
#include <unistd.h>

Include dependency graph for consume.c:


Functions

static unsigned consumeNormal (RIM *rim, int fd, RIM_type type)
 Reads a collection of mapped data blocks into the RIM structure.
static unsigned consumeDefault (RIM *rim, int fd)
 Reads a buffer containing default data (no map) into the RIM structure.
static unsigned consumeAEM (RIM *rim, int fd)
 Reads a buffer containing AEM data (no map) into the RIM structure.
static unsigned consumeGEM (RIM *rim, int fd)
 Reads a buffer containing GEM data (no map).
unsigned file_read (int fd, void *ptr, int nword)
unsigned RIM_consumeMap (RIM_map *map, int fd)
 Read map data into the map structure.
unsigned RIM_consume (RIM *rim, int fd)
 Reads the buffer of data into the RIM structure.

Variables

static const RIM_type GEM_type [] = {RIM_TAM, RIM_ROI, RIM_TIE, RIM_SCH, -1}
 List of component types that make up the GEM configuration The GEM configuration is made up of several component types. This list is used to collect the data from these components into one file.

Detailed Description

Function to populate a RIM structure.

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

Function Documentation

unsigned consumeAEM RIM rim,
int  fd
[inline, static]
 

Reads a buffer containing AEM data (no map) 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 If the data are transferred successfully
RIM_FILE_END If the end of the file is reached
RIM_FILE_READ If there is an error reading from the file

unsigned consumeDefault RIM rim,
int  fd
[inline, static]
 

Reads a buffer containing default data (no map) 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 If the data are transferred successfully
RIM_FILE_END If the end of the file is reached
RIM_FILE_READ If there is an error reading from the file

unsigned consumeGEM RIM rim,
int  fd
[inline, static]
 

Reads a buffer containing GEM data (no map).

Parameters:
rim Pointer to the RIM structure to populate
fd Descriptor of a file opened for reading
Return values:
RIM_SUCCESS If the data are transferred successfully
RIM_FILE_END If the end of the file is reached
RIM_FILE_READ If there is an error reading from the file

unsigned consumeNormal RIM rim,
int  fd,
RIM_type  type
[inline, static]
 

Reads a collection of mapped data blocks into the RIM structure.

Parameters:
rim Pointer to the RIM structure to populate
fd Descriptor of a file opened for reading
type The data type
Return values:
RIM_CPT_NONE The type ID does not appear to be associated to a LAT component
RIM_MAP_NONE The component type specified is a singleton
RIM_FILE_END If the end of the file is reached
RIM_FILE_READ If there is an error reading from the file
RIM_SUCCESS The data was successfully transfered into the RIM structure

unsigned file_read int  fd,
void *  ptr,
int  nword
 

Parameters:
fd Descriptor of a file opened for reading
ptr Pointer to the buffer to populate with data from file
nword Number of 32-bit words to read from the file
Return values:
RIM_SUCCESS If all goes well
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_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_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


Generated on Thu Apr 13 23:39:18 2006 by  doxygen 1.4.4