TMS International BV |
GetCardFileSamples
LONG GetCardFileSamples(
IN HANDLE Handle,
OUT PULONG SampleBuffer,
IN ULONG Size
);
Parameters
Handle
Handle of the library
SampleBuffer
Pointer to a buffer where this function will store the
samples
Size
Size of this buffer in bytes
Return Value
Returns the total number of bytes read from the internal card.
Returns 0 if no new data is available, and a negative
value (which is the Error code) if an error occurred.
Comments
This function is used to get one or more samples from the internal card. A
pointer to a buffer allocated by the application and the size of this
buffer in
bytes should be used as input parameters.
The driver will fill this
buffer with
the available samples. The number of samples returned depends on the
size of
the given buffer and the amount of samples available. One sample means one
conversion
result from each channel of the device.
Example: a measurement on the device has 6 input signals, while
running at a sample rate of 100 Hz. As
stated before, each signal
needs 4 bytes for storing the conversion result. The buffer must be at
least 6*4 = 24 bytes for one sample. When getting 100 samples,
you need a buffer of 6*4*100 = 2400 bytes.
When a channel is not connected or out-of-range, the returned
value is
0x80000000.
The only allowed function after this call is the StopCardFile
function.
This function is for Mobita only.
Also see
StopCardFile, GetCardFileSignalFormat