Previous Next Contents

5.9   FrameSet Data Transfer






5.9.1   PmGetParamSet

Synopsis
int PmGetParamSet (PmFrameSet aFS, int frame_index, PmParamSetId aParamSetId, void data_ptr, int data_nb)
Copies a ParamSet from frame frame_index to the space pointed by data_ptr.

The ParamSet is identified by aParamSetId in FrameSet aFS.

If the ParamSet lenght in frame frame_index is greater than argument data_nb, data_nb elements are copied.

Otherwise, the entire ParamSet is copied.

Returns

0 if frame_index is equal to or greater than the number of active frames.

1 if operation is successful.






5.9.2   PmPutParamSet

Synopsis
int PmPutParamSet (PmFrameSet aFS, int frame_index, PmParamSetId aParamSetId, void data_ptr, int data_nb)
Copies data_nb elements from the space pointed by data_ptr to a ParamSet in frame frame_index.

The ParamSet is identified by aParamSetId in FrameSet aFS.

data_ptr is assumed to point at data of the same type as the ParamSet.

Returns

0 if frame_index is equal to or greater than the number of active frames.

1 if operation is successful.






5.9.3   PmAddFrameData

Synopsis
int PmAddFrameData (PmFrameSet aFS, float time, PmParamSetId *theParamSetIds, void **theDataPtrs, int *theNbOfElems, int nbOfParamSets)
Fills a new frame of data and increments by one the number of active frames of FrameSet aFS.

time is the time to be assigned to the new frame.

Each line of vectors theParamSetIds, theDataPtrs and theNbOfElems correspond to a source data set and its corresponding destination ParamSet in FrameSet aFS.

theParamSetIds is a vector of destination ParamSet identifiers.

ParamSets identified by theParamSetIds should have been created previously. If an identifier in theParamSetIds is not listed among existing ParamSets, the corresponding data set is not transferred.

theDataPtrs is a vector of pointers to the source data sets.

It is assumed that each source data set and its corresponding destination ParamSet have the same variable type.

theNbOfElems is a vector specifying the number of elements of each source data set.

nbOfParamSets is the number of transferred data sets.

Returns

[number of transferred data sets] if operation is successful.

-1 if there is no available memory to perform the operation.






5.9.4   PmGetFrameData

Synopsis
int PmGetFrameData (PmFrameSet aFS, int frame_index, float *ptime, PmParamSetId *theParamSetIds, void **theDataPtrs, int *theNbOfElems, int nbOfParamSets)
Retrieves data from ParamSets in frame number frame_index of FrameSet aFS.

Does not remove frame number frame_index from FrameSet aFS.

The contents of pointer ptime will be filled with the time value of frame number frame_index.

If ptime is NULL, no time value is transferred.

Each line of vectors theParamSetIds, theDataPtrs and theNbOfElems correspond to a destination data set and its corresponding source ParamSet in FrameSet aFS.

theParamSetIds is a vector of source ParamSet identifiers.

If an identifier in theParamSetIds is not listed among existing ParamSets, the corresponding transfer is skipped.

theDataPtrs is a vector of pointers to the destination data sets.

It is assumed that each destination data set and its corresponding source ParamSet have the same variable type.

theNbOfElems is a vector specifying the length of each destination data set.

The number of transferred data is limited to the destination data set length if this one is shorter than the corresponding ParamSet.

Otherwise, the entire ParamSet is copied.

nbOfParamSets is the number of transferred ParamSets.

Returns

[number of transferred ParamSets] if operation is successful.

0 if frame_index is equal to or greater than the number of active frames in FrameSet aFS.



Formatted and maintained by Diemo Schwarz --- last change
Previous Next Contents