GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> RIM / dev > rim / rhel6-32
#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>
Functions | |
static unsigned | importData (RIM_impDataCB dataRtn, void *parm, int iShrt, void *data, int leng, int swap, int *rLeng) |
Import a block of data. | |
unsigned | RIM_import (RIM *rim, int optns, unsigned short *versn, RIM_impRecdCB recdRtn, RIM_impDataCB dataRtn, void *parm) |
Import RIM data as a series of records. | |
unsigned | RIM_importMap (RIM_map *map, int optns, unsigned short *versn, RIM_impRecdCB recdRtn, RIM_impDataCB dataRtn, void *parm) |
Import RIM map data as a series of records. |
$Id: RIM_import.c,v 1.3 2011/03/27 06:47:13 saxton Exp $
unsigned importData | ( | RIM_impDataCB | dataRtn, | |
void * | parm, | |||
int | iShrt, | |||
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.
dataRtn | Routine to do the actual importing. | |
parm | Parameter for the importing routine. | |
iShrt | If TRUE, don't report or return data too short error. | |
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. |
Referenced by RIM_import(), and RIM_importMap().
unsigned RIM_import | ( | RIM * | rim, | |
int | optns, | |||
unsigned short * | versn, | |||
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.
rim | RIM structure to use as a repository. | |
optns | An options word, consisting of the logical OR of the following possible values:
| |
versn | The address of a two-element array containing the major and minor version numbers of the data being imported. | |
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. |
RIM_SUCCESS | Success | |
RIM_BADVERSN | The supplied version number is invalid | |
RIM_RTYPUNKN | Received a record with invalid record type | |
RIM_TYPEUNKN | Received a record with invalid RIM type |
References checkBit(), importData(), RIM_cptDesc(), RIM_number(), RIM_OPT_CURR, RIM_OPT_SWAP, RIM_RT_DFT, RIM_RT_EXCP, RIM_RT_MAP, RIM_RT_MASK, sizeofCpt(), and sizeofMap().
unsigned RIM_importMap | ( | RIM_map * | map, | |
int | optns, | |||
unsigned short * | versn, | |||
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.
map | RIM map structure to use as a source | |
optns | An options word, consisting of the logical OR of the following possible values:
| |
versn | The address of a two-element array containing the major and minor version numbers of the data being imported. | |
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. |
RIM_SUCCESS | Success | |
RIM_BADVERSN | The supplied version number is invalid | |
RIM_RTYPUNKN | Received a record with invalid record type | |
RIM_TYPEUNKN | Received a record with invalid RIM type |
References importData(), RIM_OPT_CURR, RIM_OPT_SWAP, RIM_RT_MAP, RIM_RT_MASK, and sizeofMap().