2-34
C++ prototype:
C prototype:
Arguments:
void pointer
int
in64_t pointer
Returns:
int
Sample Code
Description:
C++
C
flushBufferedData
Description:
C++ prototype:
C prototype:
Arguments:
int
bool
Sample Code
Description:
C++
C
PO8e Streaming Interface for the RZ
The data will be grouped by channel and the number of samples
returned applies to all channels. The user is responsible for
ensuring that the buffer is large enough to hold nSamples *
numChannels() * dataSampleSize() bytes. The optional offsets
array should be nSamples long and will be populated with the
data offset of each block. This allows a user to detect if the
buffer on the RZ unit has overflowed.
int readBlock(void
int64_t *offsets = NULL);
int
readBlock(void* card,
nSamples, int64_t *offsets);
buffer
The location to write buffered data to.
nSamples
The number of samples to read.
offsets
The location to write the buffer indices to.
Number of samples that were read.
This code sample reads 1 sample from all channels, stores it in
a buffer and flushes that data from the card.
short
buff[1024];
card->readBlock(buff, 1);
card->flushBufferedData(1);
short
buff[1024];
readBlock(card, buff, 1);
flushBufferedData(card, 1);
Releases samples from each buffered channel.
void flushBufferedData(int
bool
freeBuffers = false);
void
flushBufferedData(void* card,
numSamples = -1,
numSamples
Number of samples to release. Passing -1
releases all buffered samples.
freeBuffers
Controls the optional freeing of the underlying
data buffers.
This code sample flushes one sample from all channels.
card->flushBufferedData(1);
flushBufferedData(card, 1);
*buffer,
int
nSamples,
void
*buffer,
numSamples = -1,
bool
freeBuffers = false);
System 3
int
int
Need help?
Do you have a question about the RZ2 and is the answer not in the manual?