Go to the first, previous, next, last section, table of contents.


getframe

int getframe(DB_Sample *vector)

Return:

>0
Success; the returned value is the number of input signals
-1
End of data (contents of vector not valid)
-3
Failure: unexpected physical end of file
-4
Failure: checksum error (detected only at end of file)

This function reads a vector of samples, including at least one sample from each open input signal. If all signals are sampled at the same frequency, only one sample is read from each signal. Otherwise, signals sampled at multiples of the frame frequency are represented by two or more consecutive elements of the returned vector. For example, if the frame frequency is 125 Hz, signal 0 is sampled at 500 Hz, and the remaining 3 signals are sampled at 125 Hz each, then the returned vector has 7 valid components: the first 4 are samples of signal 0, and the remaining 3 are samples of signals 1, 2, and 3. The caller should allocate storage for an array of DB_Samples (integers) and pass a pointer to this array to getframe. The length of vector must be determined by summing the values of the spf (samples per frame) fields in the DB_Siginfo structures associated with the input signals (see section isigopen).


Go to the first, previous, next, last section, table of contents.



George B. Moody (george@hstbme.mit.edu)