GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > RIM / V2-0-1

Constituent: rim     Tag: rad750


Interface   Data Structures   File List   Data Fields   Globals  

RIM_import.c File Reference

Functions that import data into RIM structures. More...

#include "RIM_p.h"
#include "RIM_descriptions.ic"
#include "RIM_number.ic"
#include "RIM_AG_init_p.h"
#include "RIM/RIM_msgs.h"
#include "MSG/MSG_pubdefs.h"
#include "PBS/BSWP.h"

Include dependency graph for RIM_import.c:


Functions

static unsigned importData (RIM_impDataCB dataRtn, void *parm, void *data, int leng, int swap, int *rLeng)
 Import a block of data.
unsigned RIM_import (RIM *rim, int swap, RIM_impRecdCB recdRtn, RIM_impDataCB dataRtn, void *parm)
 Import RIM data as a series of records.
unsigned RIM_importMap (RIM_map *map, int swap, RIM_impRecdCB recdRtn, RIM_impDataCB dataRtn, void *parm)
 Import RIM map data as a series of records.

Detailed Description

Functions that import data into RIM structures.

Author:
Owen Saxton
Id
RIM_import.c,v 1.1 2007/11/09 23:11:01 saxton Exp

Function Documentation

unsigned importData RIM_impDataCB  dataRtn,
void *  parm,
void *  data,
int  leng,
int  swap,
int *  rLeng
[static]
 

Import a block of data.

This routine imports a block of data then swaps its bytes, if requested to, from big-endian to machine order.

Parameters:
dataRtn Routine to do the actual importing.
parm Parameter for the importing routine.
data Address of the data area.
leng Number of bytes to import.
swap If TRUE, the data is to have its bytes swapped.
rLeng Address of integer to receive the number of bytes actually imported.
Returns:
The return value from the importing routine

unsigned RIM_import RIM rim,
int  swap,
RIM_impRecdCB  recdRtn,
RIM_impDataCB  dataRtn,
void *  parm
 

Import RIM data as a series of records.

This routine provides a general way to import data into a RIM structure. The data are received as a series of records from the supplied callback routines. One routine is called to position at the start of the next record to be imported and supplies the record type and data length. The second routine is called to retrieve data for the record, and is called as many times as necessary to retrieve all the data.

Parameters:
rim RIM structure to use as a source
swap If TRUE, the bytes of the imported data are to be swapped from big-endian to machine order.
recdRtn Routine to be called at the start of each record to be imported.
dataRtn Routine to be called for each block of data to be imported.
parm Parameter to pass to the callback routines.
Return values:
RIM_SUCCESS Success
RIM_RTYPUNKN Received a record with invalid record type
RIM_TYPEUNKN Received a record with invalid RIM type

unsigned RIM_importMap RIM_map map,
int  swap,
RIM_impRecdCB  recdRtn,
RIM_impDataCB  dataRtn,
void *  parm
 

Import RIM map data as a series of records.

This routine provides a general way to export the data from a RIM map structure. The data are presented as a series of records to the supplied callback routines. One routine is called at the start of each record to receive the record type and length of the data in the record. The second routine is called to receive data for the record, and is called as many times as necessary to receive all the data.

Parameters:
map RIM map structure to use as a source
swap If TRUE, the bytes of the imported data are to be swapped from big-endian to machine order.
recdRtn Routine to be called at the start of each record to be exported.
dataRtn Routine to be called for each block of data to be exported.
parm Parameter to pass to the callback routines.
Return values:
RIM_SUCCESS Success
RIM_RTYPUNKN Received a record with invalid record type
RIM_TYPEUNKN Received a record with invalid RIM type


Generated on Wed Nov 21 01:38:14 2007 by  doxygen 1.4.4