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

Functions to populate a RIM structure. More...

#include "RIM_p.h"
#include "RIM_descriptions.ic"
#include "RIM_number.ic"
#include "RIM_AG_init_p.h"
#include "PBS/BSWP.h"
#include <unistd.h>

Include dependency graph for RIM_consume.c:


Functions

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

Variables

static const RIM_type GEM_type [] = {RIM_TAM, RIM_ROI, RIM_TIE, RIM_SCH, -1}

Detailed Description

Functions to populate a RIM structure.

Author:
James Swain & Owen Saxton
Id
RIM_consume.c,v 1.1 2007/03/16 19:20:16 saxton Exp

Function Documentation

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

Read a block 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]
 

Read a block 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]
 

Read a block containing GEM data (no map) into a 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 consumeNormal RIM rim,
int  fd,
RIM_type  type
[inline, static]
 

Read 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_SUCCESS The data was successfully read
RIM_CPT_NONE The type ID does not appear to be associated with 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

unsigned file_read int  fd,
void *  ptr,
int  nword
 

Read a block of data from a file.

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
 

Read the block 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 read
RIM_TYPE_UK The type identifier at the start of the block did not correspond to a known type
RIM_CPT_NONE The type ID does not appear to be associated with 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 Fri Jun 15 02:02:15 2007 by  doxygen 1.4.4