 |
libRBR
v1.2.3
RBR instrument communication API
|
Go to the documentation of this file.
14 #ifndef LIBRBR_RBRINSTRUMENTSTREAMING_H
15 #define LIBRBR_RBRINSTRUMENTSTREAMING_H
25 #define RBRINSTRUMENT_OUTPUT_FORMAT_NAME_MAX 15
272 RBRINSTRUMENT_ACTIVE_HIGH,
274 RBRINSTRUMENT_ACTIVE_LOW,
302 RBRINSTRUMENT_SLEEP_TRISTATE,
304 RBRINSTRUMENT_SLEEP_HIGH,
306 RBRINSTRUMENT_SLEEP_LOW,
RBRInstrumentError RBRInstrument_getLabelsList(RBRInstrument *instrument, RBRInstrumentLabelsList *labelsList)
Report a list of labels for active channels, in order.
@ RBRINSTRUMENT_UNKNOWN_SLEEP
Definition: RBRInstrumentStreaming.h:310
RBRInstrumentError RBRInstrument_getOutputFormat(RBRInstrument *instrument, RBRInstrumentOutputFormat *outputFormat)
Get the current output format.
char labels[RBRINSTRUMENT_CHANNEL_MAX][RBRINSTRUMENT_CHANNEL_LABEL_MAX+1]
The label for each active channel as null-terminated C strings.
Definition: RBRInstrumentStreaming.h:86
RBRInstrumentError RBRInstrument_getChannelsList(RBRInstrument *instrument, RBRInstrumentChannelsList *channelsList)
Report a list of names and units for active channels, in order.
@ RBRINSTRUMENT_OUTFORMAT_CALTEXT02
Definition: RBRInstrumentStreaming.h:129
#define RBRINSTRUMENT_CHANNEL_MAX
The maximum number of channels present on an instrument.
Definition: RBRInstrument.h:93
Response to the outputformat labelslist command.
Definition: RBRInstrumentStreaming.h:79
int32_t count
The number of active channels.
Definition: RBRInstrumentStreaming.h:82
#define RBRINSTRUMENT_CHANNEL_NAME_MAX
The maximum number of characters in a channel name (e.g., “Temperature”).
Definition: RBRInstrument.h:109
RBRInstrumentReadingFlag RBRInstrumentReading_getFlag(double reading)
Get the error flag from a reading.
#define RBRINSTRUMENT_CHANNEL_UNIT_MAX
The maximum number of characters in a channel unit name (e.g., “C”).
Definition: RBRInstrument.h:123
RBRInstrumentAuxOutputActiveLevel active
The active level of the auxiliary output signal seen by the external device during the setup time,...
Definition: RBRInstrumentStreaming.h:367
RBRInstrumentError RBRInstrument_getAvailableOutputFormats(RBRInstrument *instrument, RBRInstrumentOutputFormat *outputFormats)
Report a list of available output formats.
double RBRInstrumentReading_setError(RBRInstrumentReadingFlag flag, uint8_t value)
Synthesize a reading with an error set.
@ RBRINSTRUMENT_SLEEP_COUNT
Definition: RBRInstrumentStreaming.h:308
RBRInstrumentAuxOutputActiveLevel
Possible levels of the auxiliary output signal during the setup time, data transmission,...
Definition: RBRInstrumentStreaming.h:269
int64_t RBRInstrumentDateTime
Definition: RBRInstrument.h:181
RBRInstrumentAuxOutputSleepLevel
Possible levels of the auxiliary output signal while the instrument is asleep.
Definition: RBRInstrumentStreaming.h:299
@ RBRINSTRUMENT_OUTFORMAT_CALTEXT07
Definition: RBRInstrumentStreaming.h:140
char unit[RBRINSTRUMENT_CHANNEL_UNIT_MAX+1]
The unit of the channel as a null-terminated C string.
Definition: RBRInstrumentStreaming.h:43
#define RBRINSTRUMENT_CHANNEL_LABEL_MAX
The maximum number of characters in a channel label.
Definition: RBRInstrument.h:131
uint8_t RBRInstrumentReading_getError(double reading)
Get the error value from a reading.
@ RBRINSTRUMENT_OUTFORMAT_MAX
Definition: RBRInstrumentStreaming.h:142
bool enabled
Enables or disables the auxiliary output.
Definition: RBRInstrumentStreaming.h:341
@ RBRINSTRUMENT_READING_FLAG_COUNT
Definition: RBRInstrumentStreaming.h:437
@ RBRINSTRUMENT_OUTFORMAT_CALTEXT04
Definition: RBRInstrumentStreaming.h:136
RBRInstrumentError RBRInstrument_readSample(RBRInstrument *instrument)
Retrieve and parse data streamed from the instrument.
const char * RBRInstrumentOutputFormat_name(RBRInstrumentOutputFormat format)
Get a human-readable string name for an output format.
int32_t count
The number of active channels.
Definition: RBRInstrumentStreaming.h:36
int32_t setup
The signal set-up time.
Definition: RBRInstrumentStreaming.h:352
@ RBRINSTRUMENT_OUTFORMAT_CALTEXT01
Definition: RBRInstrumentStreaming.h:127
double readings[RBRINSTRUMENT_CHANNEL_MAX]
The sample readings.
Definition: RBRInstrumentStreaming.h:512
RBRInstrumentError
Errors which can be returned from library functions.
Definition: RBRInstrument.h:200
struct RBRInstrumentSample RBRInstrumentSample
An instrument sample.
char name[RBRINSTRUMENT_CHANNEL_NAME_MAX+1]
The name of the channel as a null-terminated C string.
Definition: RBRInstrumentStreaming.h:41
struct RBRInstrumentChannelsList RBRInstrumentChannelsList
Response to the outputformat channelslist command.
RBRInstrumentReadingFlag
A flag set on a sample reading.
Definition: RBRInstrumentStreaming.h:428
@ RBRINSTRUMENT_READING_FLAG_UNCALIBRATED
Definition: RBRInstrumentStreaming.h:433
RBRInstrumentOutputFormat
Instrument output formats.
Definition: RBRInstrumentStreaming.h:122
An instrument sample.
Definition: RBRInstrumentStreaming.h:492
int32_t hold
The signal hold time.
Definition: RBRInstrumentStreaming.h:362
RBRInstrumentAuxOutputSleepLevel sleep
The level of the auxiliary output signal seen by the external device while the instrument is asleep.
Definition: RBRInstrumentStreaming.h:372
RBRInstrumentError RBRInstrument_getAuxOutput(RBRInstrument *instrument, RBRInstrumentAuxOutput *auxOutput)
Get the instrument auxiliary output signal parameters.
RBRInstrumentDateTime timestamp
The timestamp of the sample.
Definition: RBRInstrumentStreaming.h:495
@ RBRINSTRUMENT_READING_FLAG_NONE
Definition: RBRInstrumentStreaming.h:431
RBRInstrumentError RBRInstrument_setAuxOutput(RBRInstrument *instrument, const RBRInstrumentAuxOutput *auxOutput)
Set the instrument auxiliary output signal parameters.
@ RBRINSTRUMENT_OUTFORMAT_NONE
Definition: RBRInstrumentStreaming.h:125
int32_t channels
The number of populated sample readings.
Definition: RBRInstrumentStreaming.h:497
struct RBRInstrumentLabelsList RBRInstrumentLabelsList
Response to the outputformat labelslist command.
struct RBRInstrumentAuxOutput RBRInstrumentAuxOutput
Instrument streamserial command parameters relating to the auxiliary output signal functionality.
const char * RBRInstrumentAuxOutputSleepLevel_name(RBRInstrumentAuxOutputSleepLevel level)
Get a human-readable string name for a signal level of a sleeping auxiliary output.
struct RBRInstrumentChannelsList::@1 channels[RBRINSTRUMENT_CHANNEL_MAX]
The name and unit of each active channel.
RBRInstrumentError RBRInstrument_setUSBStreamingState(RBRInstrument *instrument, bool enabled)
Set the USB streaming state.
RBRInstrumentError RBRInstrument_getUSBStreamingState(RBRInstrument *instrument, bool *enabled)
Get the USB streaming state.
@ RBRINSTRUMENT_UNKNOWN_READING_FLAG
Definition: RBRInstrumentStreaming.h:439
Instrument streamserial command parameters relating to the auxiliary output signal functionality.
Definition: RBRInstrumentStreaming.h:332
Response to the outputformat channelslist command.
Definition: RBRInstrumentStreaming.h:33
@ RBRINSTRUMENT_READING_FLAG_ERROR
Definition: RBRInstrumentStreaming.h:435
const char * RBRInstrumentAuxOutputActiveLevel_name(RBRInstrumentAuxOutputActiveLevel level)
Get a human-readable string name for a signal level of an active auxiliary output.
Core library context object.
Definition: RBRInstrument.h:591
RBRInstrumentError RBRInstrument_setOutputFormat(RBRInstrument *instrument, RBRInstrumentOutputFormat outputFormat)
Set the current output format.
@ RBRINSTRUMENT_ACTIVE_COUNT
Definition: RBRInstrumentStreaming.h:276
const char * RBRInstrumentReadingFlag_name(RBRInstrumentReadingFlag flag)
Get a human-readable string name for a reading flag.
RBRInstrumentError RBRInstrument_setSerialStreamingState(RBRInstrument *instrument, bool enabled)
Set the serial streaming state.
@ RBRINSTRUMENT_OUTFORMAT_CALTEXT03
Definition: RBRInstrumentStreaming.h:134
RBRInstrumentError RBRInstrument_getSerialStreamingState(RBRInstrument *instrument, bool *enabled)
Get the serial streaming state.
uint8_t aux
Which auxiliary output signal settings to retrieve or configure.
Definition: RBRInstrumentStreaming.h:339
@ RBRINSTRUMENT_UNKNOWN_ACTIVE
Definition: RBRInstrumentStreaming.h:278