libRBR
v1.2.3
RBR instrument communication API
|
Instrument commands and structures pertaining to on-demand data acquisition. More...
Go to the source code of this file.
Functions | |
RBRInstrumentError | RBRInstrument_fetch (RBRInstrument *instrument, RBRInstrumentLabelsList *channels, bool sleepAfter, RBRInstrumentSample *sample) |
Requests an “on-demand” sample set from the logger. More... | |
Instrument commands and structures pertaining to on-demand data acquisition.
RBRInstrumentError RBRInstrument_fetch | ( | RBRInstrument * | instrument, |
RBRInstrumentLabelsList * | channels, | ||
bool | sleepAfter, | ||
RBRInstrumentSample * | sample | ||
) |
Requests an “on-demand” sample set from the logger.
Unlike streaming data/RBRInstrument_readSample(), fetched data is returned directly to the caller (independent of any RBRInstrumentSampleCallback defined in RBRInstrumentCallbacks.sample).
Because fetched samples are indistinguishable from streamed samples, this function may return a streamed sample, not a fetched sample, if the instrument is logging, streaming is enabled for the link over which the library is communicating with the instrument, and a streamed sample is produced by the instrument before the response to the fetch
command.
For Logger3 instruments, the channels argument can be used to control which channels are fetched. This can be useful to limit the use of power-hungry sensors. If channels is not given as NULL
, then readings will be requested from channels corresponding to the first RBRInstrumentLabelsList.count labels from the list. Otherwise, and for Logger2 instruments, readings will be fetched from all enabled channels.
[in] | instrument | the instrument connection |
[in] | channels | the list of channels to be acquired (may be NULL ) |
[in] | sleepAfter | whether the instrument should sleep after fetching |
[in,out] | sample | the fetched sample |