libRBR  v1.2.3
RBR instrument communication API
RBRInstrumentConfiguration.h
Go to the documentation of this file.
1 
14 #ifndef LIBRBR_RBRINSTRUMENTCONFIGURATION_H
15 #define LIBRBR_RBRINSTRUMENTCONFIGURATION_H
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
26 #define RBRINSTRUMENT_CALIBRATION_C_COEFFICIENT_MAX 24
27 
33 #define RBRINSTRUMENT_CALIBRATION_X_COEFFICIENT_MAX 8
34 
40 #define RBRINSTRUMENT_CALIBRATION_N_COEFFICIENT_MAX 8
41 
48 #define RBRINSTRUMENT_VALUE_COEFFICIENT 0xFF
49 
55 #define RBRINSTRUMENT_CALIBRATION_EQUATION_MAX 31
56 
60 #define RBRINSTRUMENT_CHANNEL_GAINS_MAX 8
61 
63 #define RBRINSTRUMENT_INPUT_TIMEOUT_MIN 10000
64 
66 #define RBRINSTRUMENT_INPUT_TIMEOUT_MAX 240000
67 
73 #define RBRINSTRUMENT_SENSOR_PARAMETER_KEY_MAX 63
74 
80 #define RBRINSTRUMENT_SENSOR_PARAMETER_VALUE_MAX 63
81 
88 typedef uint8_t RBRInstrumentChannelIndex;
89 
92 
100 {
127 
135 {
147 
157 
165 {
168 
175  float currentGain;
176 
188 
194 typedef struct RBRInstrumentChannel
195 {
205 
208 
214  bool status;
215 
222 
229 
237 
245 
248 
250  bool derived;
251 
261 
265 
275 typedef struct RBRInstrumentChannels
276 {
278  int32_t count;
285  int32_t on;
312 
331  RBRInstrumentChannels *channels);
332 
347  RBRInstrument *instrument,
349  bool status);
350 
385  RBRInstrument *instrument,
388 
420  RBRInstrument *instrument,
422  const RBRInstrumentCalibration *calibration);
423 
440  RBRInstrument *instrument,
441  RBRInstrumentPeriod *fetchPowerOffDelay);
442 
461  RBRInstrument *instrument,
462  RBRInstrumentPeriod fetchPowerOffDelay);
463 
480  RBRInstrument *instrument,
481  bool *sensorPowerAlwaysOn);
482 
498  RBRInstrument *instrument,
499  bool sensorPowerAlwaysOn);
500 
516  bool *castDetection);
517 
533  bool castDetection);
534 
551  RBRInstrument *instrument,
552  RBRInstrumentPeriod *inputTimeout);
553 
572  RBRInstrument *instrument,
573  RBRInstrumentPeriod inputTimeout);
574 
588 {
651 
660 
676  RBRInstrument *instrument,
678  float *value);
679 
699  RBRInstrument *instrument,
701  float value);
702 
711 {
717 
742  RBRInstrument *instrument,
744  RBRInstrumentSensorParameter *parameter);
745 
768  RBRInstrument *instrument,
770  RBRInstrumentSensorParameter *parameters,
771  int32_t *size);
772 
795  RBRInstrument *instrument,
797  RBRInstrumentSensorParameter *parameter);
798 
799 #ifdef __cplusplus
800 }
801 #endif
802 
803 #endif /* LIBRBR_RBRINSTRUMENTCONFIGURATION_H */
RBRINSTRUMENT_SETTING_ATMOSPHERE
@ RBRINSTRUMENT_SETTING_ATMOSPHERE
Definition: RBRInstrumentConfiguration.h:627
RBRInstrumentChannel::settlingTime
RBRInstrumentPeriod settlingTime
The minimum power-on settling time required by this channel.
Definition: RBRInstrumentConfiguration.h:221
RBRInstrument_setChannelStatus
RBRInstrumentError RBRInstrument_setChannelStatus(RBRInstrument *instrument, RBRInstrumentChannelIndex channel, bool status)
Set the status of a channel.
RBRInstrumentChannel::readTime
RBRInstrumentPeriod readTime
The typical data acquisition time required by this channel.
Definition: RBRInstrumentConfiguration.h:228
RBRInstrumentChannels::settlingTime
RBRInstrumentPeriod settlingTime
The maximum power-on settling settling time across all enabled channels.
Definition: RBRInstrumentConfiguration.h:292
RBRINSTRUMENT_CHANNEL_MAX
#define RBRINSTRUMENT_CHANNEL_MAX
The maximum number of channels present on an instrument.
Definition: RBRInstrument.h:93
RBRInstrumentValueSetting_name
const char * RBRInstrumentValueSetting_name(RBRInstrumentValueSetting setting)
Get a human-readable string name for an instrument value setting.
RBRInstrumentChannels
Details reported by a combination of the instrument channels, channel, and calibration commands.
Definition: RBRInstrumentConfiguration.h:275
RBRInstrument_setInputTimeout
RBRInstrumentError RBRInstrument_setInputTimeout(RBRInstrument *instrument, RBRInstrumentPeriod inputTimeout)
Set the timeout for output suppression while receiving commands.
RBRInstrument_getCastDetection
RBRInstrumentError RBRInstrument_getCastDetection(RBRInstrument *instrument, bool *castDetection)
Get whether cast detection is enabled.
RBRInstrumentCalibration
A channel calibration.
Definition: RBRInstrumentConfiguration.h:99
RBRINSTRUMENT_SETTING_TEMPERATURE
@ RBRINSTRUMENT_SETTING_TEMPERATURE
Definition: RBRInstrumentConfiguration.h:607
RBRInstrumentChannel::userUnits
char userUnits[RBRINSTRUMENT_CHANNEL_UNIT_MAX+1]
The unit in which processed data is normally reported from the logger as a null-terminated C string.
Definition: RBRInstrumentConfiguration.h:244
RBRInstrumentSensorParameter::value
char value[RBRINSTRUMENT_SENSOR_PARAMETER_VALUE_MAX+1]
The parameter value as a null-terminated C string.
Definition: RBRInstrumentConfiguration.h:715
RBRINSTRUMENT_CHANNEL_UNIT_MAX
#define RBRINSTRUMENT_CHANNEL_UNIT_MAX
The maximum number of characters in a channel unit name (e.g., “C”).
Definition: RBRInstrument.h:123
RBRInstrumentChannels::count
int32_t count
The number of installed and configured instrument channels.
Definition: RBRInstrumentConfiguration.h:278
RBRInstrument_setCastDetection
RBRInstrumentError RBRInstrument_setCastDetection(RBRInstrument *instrument, bool castDetection)
Set whether cast detection is enabled.
RBRINSTRUMENT_SETTING_AVGSOUNDSPEED
@ RBRINSTRUMENT_SETTING_AVGSOUNDSPEED
Definition: RBRInstrumentConfiguration.h:645
RBRInstrument_setCalibration
RBRInstrumentError RBRInstrument_setCalibration(RBRInstrument *instrument, RBRInstrumentChannelIndex channel, const RBRInstrumentCalibration *calibration)
Update a channel's calibration coefficients.
RBRInstrumentChannel::equation
char equation[RBRINSTRUMENT_CALIBRATION_EQUATION_MAX+1]
The type of formula used to convert raw readings to physical measurement units as a null-terminated C...
Definition: RBRInstrumentConfiguration.h:236
RBRINSTRUMENT_RANGING_MANUAL
@ RBRINSTRUMENT_RANGING_MANUAL
Definition: RBRInstrumentConfiguration.h:139
RBRInstrument_setValueSetting
RBRInstrumentError RBRInstrument_setValueSetting(RBRInstrument *instrument, RBRInstrumentValueSetting setting, float value)
Write the a value setting to the instrument.
RBRInstrumentChannelGain::currentGain
float currentGain
The gain value in use by the sensor.
Definition: RBRInstrumentConfiguration.h:175
RBRINSTRUMENT_SETTING_CONDUCTIVITY
@ RBRINSTRUMENT_SETTING_CONDUCTIVITY
Definition: RBRInstrumentConfiguration.h:621
RBRInstrumentCalibration
struct RBRInstrumentCalibration RBRInstrumentCalibration
A channel calibration.
RBRInstrumentSensorParameter::key
char key[RBRINSTRUMENT_SENSOR_PARAMETER_KEY_MAX+1]
The name of the parameter as a null-terminated C string.
Definition: RBRInstrumentConfiguration.h:713
RBRInstrumentDateTime
int64_t RBRInstrumentDateTime
Definition: RBRInstrument.h:181
RBRINSTRUMENT_CHANNEL_GAINS_MAX
#define RBRINSTRUMENT_CHANNEL_GAINS_MAX
The maximum number of gain settings for a channel.
Definition: RBRInstrumentConfiguration.h:60
RBRInstrumentChannel::label
char label[RBRINSTRUMENT_CHANNEL_LABEL_MAX+1]
An alphanumeric description of the physical parameter measured as a null-terminated C string.
Definition: RBRInstrumentConfiguration.h:260
RBRInstrumentCalibration::dateTime
RBRInstrumentDateTime dateTime
The date/time of the calibration.
Definition: RBRInstrumentConfiguration.h:106
RBRINSTRUMENT_CHANNEL_TYPE_MAX
#define RBRINSTRUMENT_CHANNEL_TYPE_MAX
The maximum number of characters in a channel type (e.g., “temp09”).
Definition: RBRInstrument.h:116
RBRINSTRUMENT_CHANNEL_LABEL_MAX
#define RBRINSTRUMENT_CHANNEL_LABEL_MAX
The maximum number of characters in a channel label.
Definition: RBRInstrument.h:131
RBRINSTRUMENT_UNKNOWN_RANGING
@ RBRINSTRUMENT_UNKNOWN_RANGING
Definition: RBRInstrumentConfiguration.h:145
RBRInstrumentPeriod
int32_t RBRInstrumentPeriod
A periodic parameter.
Definition: RBRInstrument.h:191
RBRInstrumentChannels::channels
RBRInstrumentChannel channels[RBRINSTRUMENT_CHANNEL_MAX]
Specific channel details.
Definition: RBRInstrumentConfiguration.h:310
RBRInstrument_setSensorPowerAlwaysOn
RBRInstrumentError RBRInstrument_setSensorPowerAlwaysOn(RBRInstrument *instrument, bool sensorPowerAlwaysOn)
Set whether sensor power is always on.
RBRInstrumentChannelRangingMode
RBRInstrumentChannelRangingMode
Possible channel gain ranging modes.
Definition: RBRInstrumentConfiguration.h:134
RBRInstrument_getChannels
RBRInstrumentError RBRInstrument_getChannels(RBRInstrument *instrument, RBRInstrumentChannels *channels)
Get channel information for the instrument.
RBRINSTRUMENT_SETTING_SPECCONDTEMPCO
@ RBRINSTRUMENT_SETTING_SPECCONDTEMPCO
Definition: RBRInstrumentConfiguration.h:595
RBRINSTRUMENT_SETTING_COUNT
@ RBRINSTRUMENT_SETTING_COUNT
Definition: RBRInstrumentConfiguration.h:647
RBRInstrumentChannel::calibration
RBRInstrumentCalibration calibration
The calibration for the channel.
Definition: RBRInstrumentConfiguration.h:263
RBRINSTRUMENT_SETTING_SALINITY
@ RBRINSTRUMENT_SETTING_SALINITY
Definition: RBRInstrumentConfiguration.h:639
RBRInstrument_getFetchPowerOffDelay
RBRInstrumentError RBRInstrument_getFetchPowerOffDelay(RBRInstrument *instrument, RBRInstrumentPeriod *fetchPowerOffDelay)
Get the fetch power-off delay.
RBRINSTRUMENT_SETTING_ALTITUDE
@ RBRINSTRUMENT_SETTING_ALTITUDE
Definition: RBRInstrumentConfiguration.h:601
RBRInstrumentChannel::status
bool status
Whether the channel is activated for sampling.
Definition: RBRInstrumentConfiguration.h:214
RBRInstrumentChannels::on
int32_t on
The number of active channels, which excludes any turned off by the user.
Definition: RBRInstrumentConfiguration.h:285
RBRInstrument_getValueSetting
RBRInstrumentError RBRInstrument_getValueSetting(RBRInstrument *instrument, RBRInstrumentValueSetting setting, float *value)
Read a value setting from the instrument.
RBRInstrumentError
RBRInstrumentError
Errors which can be returned from library functions.
Definition: RBRInstrument.h:200
RBRINSTRUMENT_SETTING_DENSITY
@ RBRINSTRUMENT_SETTING_DENSITY
Definition: RBRInstrumentConfiguration.h:633
RBRInstrumentChannelGain
struct RBRInstrumentChannelGain RBRInstrumentChannelGain
RBRInstrumentCalibration::x
float x[RBRINSTRUMENT_CALIBRATION_X_COEFFICIENT_MAX]
Calibration X coefficients.
Definition: RBRInstrumentConfiguration.h:118
RBRINSTRUMENT_SETTING_PRESSURE
@ RBRINSTRUMENT_SETTING_PRESSURE
Definition: RBRInstrumentConfiguration.h:613
RBRINSTRUMENT_RANGING_COUNT
@ RBRINSTRUMENT_RANGING_COUNT
Definition: RBRInstrumentConfiguration.h:143
RBRInstrument_getSensorParameter
RBRInstrumentError RBRInstrument_getSensorParameter(RBRInstrument *instrument, RBRInstrumentChannelIndex channel, RBRInstrumentSensorParameter *parameter)
Retrieve a single sensor parameter for a channel.
RBRInstrumentChannels::readTime
RBRInstrumentPeriod readTime
The maximum overall reading time across all enabled channels.
Definition: RBRInstrumentConfiguration.h:298
RBRInstrumentCalibration::n
RBRInstrumentChannelIndex n[RBRINSTRUMENT_CALIBRATION_N_COEFFICIENT_MAX]
Input channel indices.
Definition: RBRInstrumentConfiguration.h:125
RBRInstrumentSensorParameter
struct RBRInstrumentSensorParameter RBRInstrumentSensorParameter
A sensor parameter.
RBRINSTRUMENT_UNKNOWN_SETTING
@ RBRINSTRUMENT_UNKNOWN_SETTING
Definition: RBRInstrumentConfiguration.h:649
RBRInstrumentChannelGain::availableGains
float availableGains[RBRINSTRUMENT_CHANNEL_GAINS_MAX]
The gain settings supported by the sensor.
Definition: RBRInstrumentConfiguration.h:186
RBRINSTRUMENT_CALIBRATION_C_COEFFICIENT_MAX
#define RBRINSTRUMENT_CALIBRATION_C_COEFFICIENT_MAX
The maximum number of C calibration coefficients.
Definition: RBRInstrumentConfiguration.h:26
RBRInstrument_getSensorParameters
RBRInstrumentError RBRInstrument_getSensorParameters(RBRInstrument *instrument, RBRInstrumentChannelIndex channel, RBRInstrumentSensorParameter *parameters, int32_t *size)
Retrieve the sensor parameters for a channel.
RBRINSTRUMENT_SENSOR_PARAMETER_VALUE_MAX
#define RBRINSTRUMENT_SENSOR_PARAMETER_VALUE_MAX
The maximum number of characters in a sensor parameter value.
Definition: RBRInstrumentConfiguration.h:80
RBRInstrumentSensorParameter
A sensor parameter.
Definition: RBRInstrumentConfiguration.h:710
RBRINSTRUMENT_CALIBRATION_EQUATION_MAX
#define RBRINSTRUMENT_CALIBRATION_EQUATION_MAX
The maximum number of characters in a calibration equation name.
Definition: RBRInstrumentConfiguration.h:55
RBRInstrument_setChannelGain
RBRInstrumentError RBRInstrument_setChannelGain(RBRInstrument *instrument, RBRInstrumentChannelIndex channel, RBRInstrumentChannelGain *gain)
Set the gain parameters of a channel.
RBRInstrumentChannel::gain
RBRInstrumentChannelGain gain
Gain parameters for the channel.
Definition: RBRInstrumentConfiguration.h:247
RBRInstrumentChannel
struct RBRInstrumentChannel RBRInstrumentChannel
Details reported by the instrument channel command.
RBRInstrument_setFetchPowerOffDelay
RBRInstrumentError RBRInstrument_setFetchPowerOffDelay(RBRInstrument *instrument, RBRInstrumentPeriod fetchPowerOffDelay)
Set the fetch power-off delay.
RBRInstrument_isSensorPowerAlwaysOn
RBRInstrumentError RBRInstrument_isSensorPowerAlwaysOn(RBRInstrument *instrument, bool *sensorPowerAlwaysOn)
Get whether sensor power is always on.
RBRInstrumentChannelGain::rangingMode
RBRInstrumentChannelRangingMode rangingMode
The gain selection mode employed by the sensor.
Definition: RBRInstrumentConfiguration.h:167
RBRInstrumentChannelGain
Definition: RBRInstrumentConfiguration.h:164
RBRInstrumentModuleAddress
uint8_t RBRInstrumentModuleAddress
An internal module identifier.
Definition: RBRInstrumentConfiguration.h:91
RBRInstrumentChannel
Details reported by the instrument channel command.
Definition: RBRInstrumentConfiguration.h:194
RBRInstrument_getInputTimeout
RBRInstrumentError RBRInstrument_getInputTimeout(RBRInstrument *instrument, RBRInstrumentPeriod *inputTimeout)
Get the timeout for output suppression while receiving commands.
RBRInstrument_setSensorParameter
RBRInstrumentError RBRInstrument_setSensorParameter(RBRInstrument *instrument, RBRInstrumentChannelIndex channel, RBRInstrumentSensorParameter *parameter)
Set a sensor parameter for a channel.
RBRInstrument
Core library context object.
Definition: RBRInstrument.h:591
RBRINSTRUMENT_RANGING_NONE
@ RBRINSTRUMENT_RANGING_NONE
Definition: RBRInstrumentConfiguration.h:137
RBRInstrumentCalibration::c
float c[RBRINSTRUMENT_CALIBRATION_C_COEFFICIENT_MAX]
Calibration C coefficients.
Definition: RBRInstrumentConfiguration.h:112
RBRInstrumentChannels
struct RBRInstrumentChannels RBRInstrumentChannels
Details reported by a combination of the instrument channels, channel, and calibration commands.
RBRINSTRUMENT_SENSOR_PARAMETER_KEY_MAX
#define RBRINSTRUMENT_SENSOR_PARAMETER_KEY_MAX
The maximum number of characters in a sensor parameter key.
Definition: RBRInstrumentConfiguration.h:73
RBRINSTRUMENT_CALIBRATION_N_COEFFICIENT_MAX
#define RBRINSTRUMENT_CALIBRATION_N_COEFFICIENT_MAX
The maximum number of input channel indices.
Definition: RBRInstrumentConfiguration.h:40
RBRInstrumentChannel::type
char type[RBRINSTRUMENT_CHANNEL_TYPE_MAX+1]
A short, pre-defined “generic” name for the installed channel as a null-terminated C string.
Definition: RBRInstrumentConfiguration.h:204
RBRInstrumentChannel::derived
bool derived
Whether the channel is a derived channel.
Definition: RBRInstrumentConfiguration.h:250
RBRINSTRUMENT_RANGING_AUTO
@ RBRINSTRUMENT_RANGING_AUTO
Definition: RBRInstrumentConfiguration.h:141
RBRInstrumentValueSetting
RBRInstrumentValueSetting
Value settings the instrument uses for calculation of derived channels, or as defaults for physical p...
Definition: RBRInstrumentConfiguration.h:587
RBRInstrumentChannels::minimumPeriod
RBRInstrumentPeriod minimumPeriod
The minimum sampling period with the currently-active channels.
Definition: RBRInstrumentConfiguration.h:304
RBRInstrumentChannelIndex
uint8_t RBRInstrumentChannelIndex
A channel identifier.
Definition: RBRInstrumentConfiguration.h:88
RBRInstrumentChannelRangingMode_name
const char * RBRInstrumentChannelRangingMode_name(RBRInstrumentChannelRangingMode mode)
Get a human-readable string name for a channel gain ranging mode.
RBRINSTRUMENT_CALIBRATION_X_COEFFICIENT_MAX
#define RBRINSTRUMENT_CALIBRATION_X_COEFFICIENT_MAX
The maximum number of X calibration coefficients.
Definition: RBRInstrumentConfiguration.h:33
RBRInstrumentChannel::module
RBRInstrumentModuleAddress module
The internal address to which the channel responds.
Definition: RBRInstrumentConfiguration.h:207