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 | exportData (RIM_expDataCB dataRtn, void *parm, void *data, int leng) |
Export a block of data. | |
unsigned | RIM_export (RIM *rim, unsigned int typMask, RIM_expRecdCB recdRtn, RIM_expDataCB dataRtn, void *parm) |
Export RIM data as a series of records. | |
unsigned | RIM_exportMap (RIM_map *map, RIM_expRecdCB recdRtn, RIM_expDataCB dataRtn, void *parm) |
Export RIM map data as a series of records. | |
void | RIM_dataMasks (RIM *rim, unsigned int *dMask, unsigned int *eMask) |
Get summary of data types present in a RIM. |
$Id: RIM_export.c,v 1.3 2011/03/27 06:53:19 saxton Exp $
unsigned exportData | ( | RIM_expDataCB | dataRtn, | |
void * | parm, | |||
void * | data, | |||
int | leng | |||
) | [static] |
Export a block of data.
This routine swaps the bytes of the data being exported, if necessary, to put the data into big-endian order, calls the exporting routine, then swaps the bytes back. A four-byte swap is all that is needed in all cases since the representation in memory on little-endian machines assumes this.
dataRtn | Routine to do the actual exporting. | |
parm | Parameter for the exporting routine. | |
data | Address of the data to be exported. | |
leng | Number of bytes to export. |
Referenced by RIM_export(), and RIM_exportMap().
void RIM_dataMasks | ( | RIM * | rim, | |
unsigned int * | dMask, | |||
unsigned int * | eMask | |||
) |
Get summary of data types present in a RIM.
This routine returns two bitmasks indicating what kinds of data are present in the specified RIM structure. The first indicates the types with default data present, while the second indicates which types have exception data. The principle use of this routine is to avoid creating empty sets of exported data.
rim | Pointer to the in-memory model data | |
dMask | The address of an integer to receive the bitmask of types with default data present. | |
eMask | The address of an integer to receive the bitmask of types with exception data present. |
unsigned RIM_export | ( | RIM * | rim, | |
unsigned int | typMask, | |||
RIM_expRecdCB | recdRtn, | |||
RIM_expDataCB | dataRtn, | |||
void * | parm | |||
) |
Export RIM data as a series of records.
This routine provides a general way to export the data from a RIM 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.
rim | RIM structure to use as a source | |
typMask | Mask of component types to write out. If the default (DFT) bit is set, the default data for all types is exported in addition to the data indicated by the other type bits. | |
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 | if all goes well |
References checkBit(), exportData(), RIM_countMap(), RIM_cptDesc(), RIM_number(), RIM_RT_DFT, RIM_RT_EXCP, RIM_RT_MAP, sizeofCpt(), and sizeofMap().
unsigned RIM_exportMap | ( | RIM_map * | map, | |
RIM_expRecdCB | recdRtn, | |||
RIM_expDataCB | dataRtn, | |||
void * | parm | |||
) |
Export 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 | |
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 | if all goes well |
References exportData(), RIM_RT_MAP, and sizeofMap().