22#include "fdo2_version.h"
39enum class [[nodiscard]]
Error : uint8_t {
74 return "NotInitialized";
76 return "InvalidArgument";
82 return "DeviceIdMismatch";
94 return "InvalidReply";
96 return "EchoMismatch";
102 return "CalibrationRejected";
104 return "NotPermitted";
106 return "StateUnknown";
108 return "BroadcastActive";
130 [[nodiscard]]
constexpr bool ok() const noexcept {
131 return error == Error::Ok;
134 constexpr explicit operator bool() const noexcept {
144 return {v, Error::Ok};
162 [[nodiscard]]
constexpr bool ok() const noexcept {
163 return error == Error::Ok;
166 constexpr explicit operator bool() const noexcept {
324 [[nodiscard]]
constexpr bool AnyFatal() const noexcept {
325 return (
word & 0x3EU) != 0U;
329 return (
word & ~0x6BFU) != 0U;
336 if ((
word & 0x680U) != 0U) {
343 static constexpr uint32_t kBit0{0x1U};
344 static constexpr uint32_t kBit1{0x2U};
345 static constexpr uint32_t kBit2{0x4U};
346 static constexpr uint32_t kBit3{0x8U};
347 static constexpr uint32_t kBit4{0x10U};
348 static constexpr uint32_t kBit5{0x20U};
349 static constexpr uint32_t kBit7{0x80U};
350 static constexpr uint32_t kBit9{0x200U};
351 static constexpr uint32_t kBit10{0x400U};
352 [[nodiscard]]
constexpr bool has(uint32_t mask)
const noexcept {
353 return (
word & mask) != 0U;
479inline constexpr std::array<uint32_t, 11>
kBaudRates = {1200, 2400, 4800, 9600, 14400, 19200,
480 28800, 38400, 56000, 57600, 115200};
500constexpr uint32_t
AirtimeUs(uint32_t chars, uint32_t baud)
noexcept {
504 const uint64_t bits =
static_cast<uint64_t
>(chars) * 10U;
505 const uint64_t us = ((bits * 1'000'000U) + baud - 1U) / baud;
506 return static_cast<uint32_t
>((us > 0xFFFF'FFFFU) ? 0xFFFF'FFFFU : us);
588constexpr bool InWindowI32(int32_t value, int32_t low, int32_t high)
noexcept {
589 return (value >= low) && (value <= high);
593constexpr bool InRange(uint32_t value, uint32_t low, uint32_t high)
noexcept {
594 return (value >= low) && (value <= high);
598constexpr bool ConfigEnumsValid(
const Config& config)
noexcept {
599 return IsEnumerator(config.
family) && IsEnumerator(config.
crc) &&
604constexpr bool ConfigTimesValid(
const Config& config)
noexcept {
617constexpr bool ConfigLimitsValid(
const Config& config)
noexcept {
626constexpr bool ConfigWindowsValid(
const Config& config)
noexcept {
650 const bool valid = detail::ConfigEnumsValid(config) && detail::ConfigTimesValid(config) &&
651 detail::ConfigLimitsValid(config) && detail::ConfigWindowsValid(config);
660static_assert(
AirtimeUs(1_u32, 19'200_u32) == 521_u32);
688 [[nodiscard]]
constexpr const Config&
Get() const& noexcept {
692 void Get() const&& = delete;
710 if (pressure_ubar <= 0) {
713 const auto num =
static_cast<int64_t
>(o2_mhpa) * 100'000;
714 const auto den =
static_cast<int64_t
>(pressure_ubar);
715 const int64_t half = den / 2;
716 const int64_t q = (num >= 0) ? ((num + half) / den) : -(((-num) + half) / den);
717 if ((q > INT32_MAX) || (q < INT32_MIN)) {
734 if ((pressure_ubar <= 0) || (fraction_ppm == 0U) || (fraction_ppm > 1'000'000U)) {
737 const int64_t num =
static_cast<int64_t
>(pressure_ubar) *
static_cast<int64_t
>(fraction_ppm);
757 return static_cast<int32_t
>((
static_cast<int64_t
>(raw.ambient_uv) + raw.signal_uv) / 1000);
762 return FDO2_VERSION_STRING;
766 return FDO2_VERSION_MAJOR;
770 return FDO2_VERSION_MINOR;
774 return FDO2_VERSION_PATCH;
A configuration proven valid at build time.
Definition fdo2_types.hpp:676
constexpr const Config & Get() const &noexcept
Definition fdo2_types.hpp:688
consteval CheckedConfig(const Config &config) noexcept
Check config at build time.
Definition fdo2_types.hpp:682
void Get() const &&=delete
Not on a temporary: the reference would dangle (KB-CPP20-044).
Compile-time helpers of the FDO2 driver: typed integer literals, exact hook matching,...
@ Ok
The line follows the grammar (and its CRC matches when present).
constexpr uint32_t kBroadcastMaxMs
Longest broadcast interval, milliseconds.
Definition fdo2_types.hpp:442
constexpr bool HasNoiseErratum(int32_t firmware) noexcept
Whether a firmware revision shows the noise erratum (datasheet G2 6.1, G1 6.4).
Definition fdo2_types.hpp:474
constexpr uint32_t kDefaultBaud
The rate after every power-up.
Definition fdo2_types.hpp:483
constexpr uint32_t kBroadcastMinMs
Shortest and longest broadcast interval, milliseconds (#BCST).
Definition fdo2_types.hpp:440
constexpr const char * GetDriverVersion() noexcept
Definition fdo2_types.hpp:761
constexpr int32_t kCalHighMaxMhpa
Highest standard #CAHI accepts: the maximum measuring range, 2000 hPa (2, not specified).
Definition fdo2_types.hpp:584
Family
The module generation the driver talks to (datasheet 1.1; ambiguity A-3).
Definition fdo2_types.hpp:193
constexpr uint32_t kCalibrationMsMax
Largest Config::calibration_ms, ms.
Definition fdo2_types.hpp:564
constexpr int32_t kDeviceId
First revision of the FDO2 (the device id of both families).
Definition fdo2_types.hpp:432
constexpr uint8_t kRetriesMax
Largest Config::retries.
Definition fdo2_types.hpp:572
constexpr uint16_t kMinSteadyMax
Largest Config::min_steady_s, s.
Definition fdo2_types.hpp:576
constexpr uint32_t kCommandMsMax
Largest Config::command_ms, ms.
Definition fdo2_types.hpp:560
constexpr int32_t kSensorOxygen
#VERS sensor mask bit: oxygen.
Definition fdo2_types.hpp:436
constexpr uint32_t kPowerUpMsMin
Bounds of the Config fields, shared by Validate() and the docs.
Definition fdo2_types.hpp:557
constexpr uint32_t GetDriverVersionMinor() noexcept
Definition fdo2_types.hpp:769
constexpr int32_t kCalWindowMinMhpaMin
Smallest Config::cal_window_min_mhpa.
Definition fdo2_types.hpp:578
constexpr uint32_t kWarmUpSeconds
Warm-up after power-up, seconds (datasheet 2, Specifications).
Definition fdo2_types.hpp:446
constexpr int32_t AmbientLoadMv(const Raw &raw) noexcept
Sum of ambient light and signal intensity in millivolts, for the 2000 mV advice (datasheet 4....
Definition fdo2_types.hpp:756
State
The driver's state machine (docs/non-blocking.md).
Definition fdo2_types.hpp:247
constexpr Capabilities CapabilitiesFor(Family family, int32_t firmware) noexcept
What a firmware revision offers.
Definition fdo2_types.hpp:454
constexpr int32_t kFirmwareTempFlag
First revision whose temperature-sensor failure sets status bit 5.
Definition fdo2_types.hpp:428
constexpr int32_t kCalWindowMinMhpaMax
Definition fdo2_types.hpp:579
constexpr uint32_t AirtimeUs(uint32_t chars, uint32_t baud) noexcept
Time to send chars characters, 10 bits each at 8N1.
Definition fdo2_types.hpp:500
constexpr uint32_t kFlashMsMax
Largest Config::flash_ms, ms.
Definition fdo2_types.hpp:566
constexpr int32_t kFirmwareCalibrationError
First revision with #ERRO -60.
Definition fdo2_types.hpp:426
constexpr uint32_t kPowerOffMsMin
Smallest Config::power_off_ms, ms.
Definition fdo2_types.hpp:570
constexpr uint32_t kMeasurementMsMax
Largest Config::measurement_ms, ms.
Definition fdo2_types.hpp:562
CrcMode
Whether replies carry the CRC-16 suffix (datasheet 4.2).
Definition fdo2_types.hpp:199
constexpr uint8_t kFlashBudgetMax
Largest Config::max_flash_writes.
Definition fdo2_types.hpp:575
constexpr int32_t kFirmwareStatusBit0
First revision with status bit 0.
Definition fdo2_types.hpp:424
BroadcastPolicy
What start-up does when the module streams #MRAW lines (datasheet 4.3, #BCST).
Definition fdo2_types.hpp:213
constexpr int32_t kFirmwareG2
First revision of the FDO2-G2 (the first with #SETM).
Definition fdo2_types.hpp:430
constexpr uint32_t kDryAirO2Ppm
Fraction of oxygen in dry air, parts per million (standard dry air, assumption A-10).
Definition fdo2_types.hpp:724
OperationKind
The operation the driver has in flight.
Definition fdo2_types.hpp:228
constexpr uint32_t kLogoMsMin
Smallest Config::logo_ms, ms.
Definition fdo2_types.hpp:567
constexpr int32_t kChannels
Number of oxygen channels.
Definition fdo2_types.hpp:434
constexpr Result< int32_t > AirO2Mhpa(int32_t pressure_ubar, uint32_t fraction_ppm) noexcept
The pO2 of dry air at a pressure, for a one-point calibration (A-10).
Definition fdo2_types.hpp:733
constexpr uint8_t kCalWindowPctMax
Largest Config::cal_window_pct.
Definition fdo2_types.hpp:577
constexpr uint32_t kBroadcastListenMsMax
Largest Config::broadcast_listen_ms, ms (covers the longest interval).
Definition fdo2_types.hpp:573
constexpr int32_t kCalHighMinMhpa
Definition fdo2_types.hpp:582
constexpr uint32_t kMarginMsMax
Largest Config::margin_ms, ms.
Definition fdo2_types.hpp:569
constexpr uint32_t kCommandMsMin
Smallest Config::command_ms, ms.
Definition fdo2_types.hpp:559
constexpr uint32_t kPowerUpMsMax
Largest Config::power_up_ms, ms.
Definition fdo2_types.hpp:558
constexpr bool IsSupportedBaud(uint32_t baud) noexcept
Whether baud is one of the eleven rates.
Definition fdo2_types.hpp:490
LogLevel
Severity passed to the optional Log() hook.
Definition fdo2_types.hpp:185
constexpr uint32_t kPowerOffMsMax
Largest Config::power_off_ms, ms.
Definition fdo2_types.hpp:571
constexpr uint32_t kFlashMsMin
Smallest Config::flash_ms, ms.
Definition fdo2_types.hpp:565
constexpr int32_t kMinFirmware
Lowest firmware revision any document covers: 3.28 (datasheet G1, 5).
Definition fdo2_types.hpp:420
constexpr std::array< uint32_t, 11 > kBaudRates
The baud rates #BAUD accepts, ascending (datasheet 4.3, #BAUD).
Definition fdo2_types.hpp:479
constexpr int32_t kFirmwareBroadcast
First revision with the #BCST command, the persistent #CRCE and the broadcast bug fix 3....
Definition fdo2_types.hpp:422
Error
Why a call failed. Every call of the driver returns one of these in its Result.
Definition fdo2_types.hpp:39
constexpr Result< int32_t > VolumePercentMilli(int32_t o2_mhpa, int32_t pressure_ubar) noexcept
The oxygen content in volume percent of the gas at the membrane (datasheet 2, p. 6): 100 x pO2 / p,...
Definition fdo2_types.hpp:709
constexpr uint32_t kMeasurementMsMin
Smallest Config::measurement_ms, ms.
Definition fdo2_types.hpp:561
constexpr uint32_t kCalibrationMsMin
Smallest Config::calibration_ms, ms.
Definition fdo2_types.hpp:563
void ConfigIsInvalid() noexcept
Reached only when a CheckedConfig is built from an invalid configuration: it is never defined,...
constexpr uint32_t kMaxMeasurementMode
Highest #SETM mode.
Definition fdo2_types.hpp:444
constexpr const char * ToString(Error error) noexcept
The name of an error, for logs.
Definition fdo2_types.hpp:69
Quality
How far a reading can be trusted, from the status word.
Definition fdo2_types.hpp:220
constexpr uint32_t GetDriverVersionPatch() noexcept
Definition fdo2_types.hpp:773
constexpr uint32_t kLogoMsMax
Largest Config::logo_ms, ms.
Definition fdo2_types.hpp:568
StatusPolicy
What a status word other than 0 or 1 does (datasheet 4.3, ambiguity A-1).
Definition fdo2_types.hpp:206
constexpr Error Validate(const Config &config) noexcept
Check a configuration without touching the module (zero port traffic).
Definition fdo2_types.hpp:649
constexpr uint32_t kUserMemoryWords
Words of user memory (#RDUM, #WRUM).
Definition fdo2_types.hpp:438
constexpr uint32_t GetDriverVersionMajor() noexcept
Definition fdo2_types.hpp:765
@ Fdo2G2
FDO2-G2, the current module (firmware 3.55 and later); #SETM is documented.
@ Fdo2
FDO2, the legacy module (firmware 3.28 to 3.55); no #SETM in its data sheet.
@ Draining
Discarding input after a failed read, so a late reply is never taken.
@ Waiting
An operation is waiting for its reply.
@ Streaming
The module sends #MRAW lines by itself.
@ PoweringUp
Waiting power_up_ms before the first command.
@ Uninitialized
Nothing started, or Deinitialize() ran.
@ Auto
Learn from the first #VERS reply: a suffix means CRC is on.
@ Required
Every reply must carry a valid suffix (except #ERRO with erro_without_crc).
@ Off
Never expect a suffix: a reply with one is InvalidReply.
@ Disable
Send #BCST 0 (a flash write: needs allow_persistent_writes).
@ Refuse
Fail with BroadcastActive; the driver stays uninitialised.
@ Stream
Go to the Streaming state and decode the frames.
@ Initialize
BeginInitialize() and its #VERS and #IDNR steps.
@ SetMeasurementMode
#SETM.
@ Warning
Something unexpected that the driver recovered from.
@ Info
Lifecycle events: initialised, reset.
@ Debug
Detail for bring-up.
@ SensorFault
The status word was rejected by the StatusPolicy (4.3, #MOXY).
@ StateUnknown
A flash write or baud change ended without a confirmed echo.
@ InvalidArgument
An argument or a Config field is out of range; nothing was sent.
@ OutOfRange
A decoded value is outside the plausibility window of the Config.
@ DeviceIdMismatch
#VERS is not an FDO2 with an oxygen sensor: wrong device or wiring.
@ Crc
The CRC-16 of a reply did not match (datasheet 4.2).
@ Bus
A port hook returned false.
@ CalibrationRejected
#ERRO -60: the calibration is outside the expected range.
@ InvalidReply
A line the protocol grammar refuses (bytes, header, tokens, number).
@ BroadcastActive
The module streams #MRAW lines and the call needs it silent.
@ DeviceFault
#ERRO with a code the datasheet calls potentially fatal (4.4).
@ NotInitialized
EnsureInitialized() has not succeeded, or Deinitialize() ran since.
@ EchoMismatch
The header or an echoed value differs from what was sent (4.2).
@ Unsupported
The hook, firmware revision or family does not offer this call.
@ NotPermitted
A flash-writing call without consent, or over the write budget.
@ DeviceError
#ERRO -1, -21, -22 or -23: the module could not do it.
@ Timeout
No complete reply within the deadline (datasheet 4.1, 4.3).
@ Busy
An operation is pending, draining or the module streams.
@ NotReady
Warming up: a calibration needs a settled sensor (datasheet 2).
@ Warning
S = 1: detector amplification reduced, the reading is valid.
@ Invalid
A fatal bit (1 to 5) or an undefined bit.
@ Degraded
No fatal or undefined bit; bit 7, 9 or 10 set.
@ Documented
Only fatal and undefined bits are SensorFault; bits 7, 9, 10 are Degraded.
@ Datasheet
"S should always be 0 or 1": any other word is SensorFault.
The FDO2 driver: everything it declares lives here; internals in detail.
Definition fdo2.hpp:33
What the firmware revision offers (derived from datasheet 5; CapabilitiesFor).
Definition fdo2_types.hpp:385
bool user_memory
#RDUM, #WRUM.
Definition fdo2_types.hpp:386
bool status_bit0
Status bit 0 exists.
Definition fdo2_types.hpp:391
bool set_mode
#SETM (FDO2-G2 only).
Definition fdo2_types.hpp:390
bool temp_flag_reliable
Status bit 5 is set on a temperature sensor failure.
Definition fdo2_types.hpp:392
bool calibration_error
#ERRO -60 for an out-of-range calibration.
Definition fdo2_types.hpp:389
bool crc_persistent
#CRCE is stored in flash (before: lost at power cycle).
Definition fdo2_types.hpp:388
bool broadcast
#BCST.
Definition fdo2_types.hpp:387
Everything the driver needs from the application, with the datasheet defaults.
Definition fdo2_types.hpp:516
bool allow_persistent_writes
Definition fdo2_types.hpp:538
BroadcastPolicy broadcast
Start-up on a streaming module.
Definition fdo2_types.hpp:535
int32_t pressure_max_ubar
Plausible P, upper bound (sensor 1100 mbar).
Definition fdo2_types.hpp:547
StatusPolicy status_policy
Status acceptance (A-1).
Definition fdo2_types.hpp:531
Family family
Decides whether #SETM is attempted (A-3).
Definition fdo2_types.hpp:517
uint32_t power_off_ms
Off time of PowerCycle(), 10 to 10000.
Definition fdo2_types.hpp:528
uint32_t margin_ms
Added to every deadline, 0 to 1000.
Definition fdo2_types.hpp:527
int32_t pressure_reference_ubar
0: use the module's pressure; else the caller's.
Definition fdo2_types.hpp:549
uint32_t logo_ms
Allowance of #LOGO, 100 to 10000 (A-6).
Definition fdo2_types.hpp:526
uint8_t cal_window_pct
Definition fdo2_types.hpp:551
uint32_t power_up_ms
Wait after power before #VERS, 1000 to 30000 (A-4).
Definition fdo2_types.hpp:519
uint8_t retries
Extra attempts of an idempotent read, 0 to 3.
Definition fdo2_types.hpp:529
bool erro_without_crc
Accept #ERRO without CRC while CRC is on (A-12).
Definition fdo2_types.hpp:534
uint32_t measurement_ms
Definition fdo2_types.hpp:523
int32_t o2_min_mhpa
Plausible O, lower bound (10^-3 hPa).
Definition fdo2_types.hpp:542
uint32_t flash_ms
Allowance of #CRCE #SETM #BCST #WRUM, 100 to 30000 (A-7).
Definition fdo2_types.hpp:525
int32_t temp_max_mc
Plausible T, upper bound (spec 60 degC).
Definition fdo2_types.hpp:545
CrcMode crc
Expectation for the CRC suffix.
Definition fdo2_types.hpp:530
int32_t o2_max_mhpa
Plausible O, upper bound (spec 0 to 2000 hPa).
Definition fdo2_types.hpp:543
int32_t cal_window_min_mhpa
Definition fdo2_types.hpp:553
uint32_t broadcast_listen_ms
Passive listen at start-up, 0 (off) to 12000.
Definition fdo2_types.hpp:536
uint32_t calibration_ms
Allowance of #CALO and #CAHI, 10000 to 60000 (4.3).
Definition fdo2_types.hpp:524
uint8_t max_flash_writes
Flash-writing calls per driver lifetime, 1 to 64.
Definition fdo2_types.hpp:539
int32_t humidity_max_mpct
Plausible H, upper bound (100 RH).
Definition fdo2_types.hpp:548
bool strict_spacing
Exactly one space between tokens (A-11).
Definition fdo2_types.hpp:532
uint16_t min_steady_s
Definition fdo2_types.hpp:541
uint32_t baud
The rate the module runs at now; used for airtime.
Definition fdo2_types.hpp:518
int32_t temp_min_mc
Plausible T, lower bound (10^-3 degC; spec -10 degC).
Definition fdo2_types.hpp:544
int32_t pressure_min_ubar
Plausible P, lower bound (sensor 300 mbar).
Definition fdo2_types.hpp:546
bool ignore_lf
A LF at the start of a line is dropped.
Definition fdo2_types.hpp:533
uint32_t command_ms
Definition fdo2_types.hpp:521
Counters of what happened on the line; they only grow (docs/non-blocking.md).
Definition fdo2_types.hpp:406
uint32_t timeouts
Replies that did not complete in time.
Definition fdo2_types.hpp:409
uint32_t invalid_replies
Lines the grammar refused.
Definition fdo2_types.hpp:411
uint32_t transactions
Command lines written.
Definition fdo2_types.hpp:407
uint32_t device_errors
#ERRO replies.
Definition fdo2_types.hpp:412
uint32_t broadcast_lines
#MRAW lines received without asking.
Definition fdo2_types.hpp:414
uint32_t retries
Extra attempts of an idempotent read.
Definition fdo2_types.hpp:408
uint32_t crc_errors
Replies with a wrong CRC.
Definition fdo2_types.hpp:410
uint32_t flash_writes
Flash-writing commands sent.
Definition fdo2_types.hpp:415
uint32_t stale_lines
Complete lines of another command, dropped.
Definition fdo2_types.hpp:413
uint32_t bytes_discarded
Bytes dropped while resynchronising or draining.
Definition fdo2_types.hpp:416
Who the module is: #VERS, #IDNR, the family and what follows from the firmware.
Definition fdo2_types.hpp:396
uint64_t unique_id
#IDNR, unsigned 64 bit, not the serial number.
Definition fdo2_types.hpp:398
Family family
From Config::family.
Definition fdo2_types.hpp:399
bool noise_erratum
Firmware affected by the 8 to 15 degC noise erratum (informational).
Definition fdo2_types.hpp:400
Capabilities caps
CapabilitiesFor(family, firmware), with -26 learning applied.
Definition fdo2_types.hpp:402
Version version
The #VERS reply.
Definition fdo2_types.hpp:397
#MOXY result: oxygen partial pressure, temperature and status.
Definition fdo2_types.hpp:358
int32_t o2_mhpa
Oxygen partial pressure, 10^-3 hPa (typ. 0 to 210 hPa).
Definition fdo2_types.hpp:359
int32_t temperature_mc
Module temperature, 10^-3 degC (typ. 0 to 50 degC).
Definition fdo2_types.hpp:360
Quality quality
status.Classify(), kept for the caller.
Definition fdo2_types.hpp:362
bool warming_up
Less than 3 minutes since power-up (datasheet 2): reduced accuracy.
Definition fdo2_types.hpp:363
Status status
The status word of this measurement.
Definition fdo2_types.hpp:361
#MRAW result: the Oxygen fields plus the raw values.
Definition fdo2_types.hpp:367
int32_t signal_uv
Signal intensity of the oxygen sensor, microvolt.
Definition fdo2_types.hpp:370
Oxygen oxygen
O, T and S.
Definition fdo2_types.hpp:368
int32_t humidity_mpct
Relative humidity inside the housing, 10^-3 RH.
Definition fdo2_types.hpp:373
int32_t pressure_ubar
Pressure at the back side of the module, microbar.
Definition fdo2_types.hpp:372
int32_t ambient_uv
Ambient light, microvolt.
Definition fdo2_types.hpp:371
int32_t dphi_mdeg
Phase shift dphi, 10^-3 degree (typ. 5 to 60 degrees).
Definition fdo2_types.hpp:369
constexpr bool ok() const noexcept
Definition fdo2_types.hpp:162
static constexpr Result Success() noexcept
Definition fdo2_types.hpp:171
static constexpr Result Failure(Error e) noexcept
A failed result.
Definition fdo2_types.hpp:179
The value of a call, or why there is none.
Definition fdo2_types.hpp:125
static constexpr Result Success(T v) noexcept
A successful result.
Definition fdo2_types.hpp:143
constexpr bool ok() const noexcept
Definition fdo2_types.hpp:130
static constexpr Result Failure(Error e) noexcept
A failed result.
Definition fdo2_types.hpp:151
The status word S of #MOXY and #MRAW, decoded (datasheet 4.3, #MOXY). Pure functions of the word; the...
Definition fdo2_types.hpp:284
constexpr bool PressureSensorFailed() const noexcept
Definition fdo2_types.hpp:316
constexpr bool HumidityHigh() const noexcept
Definition fdo2_types.hpp:312
constexpr bool AmplificationReduced() const noexcept
Definition fdo2_types.hpp:288
uint32_t word
The unsigned 32 bit status word as the module sent it.
Definition fdo2_types.hpp:285
constexpr bool HumiditySensorFailed() const noexcept
Definition fdo2_types.hpp:320
constexpr bool UndefinedBits() const noexcept
Definition fdo2_types.hpp:328
constexpr bool AnyFatal() const noexcept
Definition fdo2_types.hpp:324
constexpr Quality Classify() const noexcept
Definition fdo2_types.hpp:332
constexpr bool SignalTooHigh() const noexcept
Definition fdo2_types.hpp:296
constexpr bool ReferenceTooLow() const noexcept
Definition fdo2_types.hpp:300
constexpr bool ReferenceTooHigh() const noexcept
Definition fdo2_types.hpp:304
constexpr bool TemperatureSensorFailed() const noexcept
Definition fdo2_types.hpp:308
constexpr bool SignalTooLow() const noexcept
Definition fdo2_types.hpp:292
#VERS result (datasheet 4.3, #VERS).
Definition fdo2_types.hpp:377
int32_t sensors
S: bit 0 oxygen, 1 temperature, 2 pressure, 3 humidity (15 = all).
Definition fdo2_types.hpp:381
int32_t device_id
D: 8 for every FDO2 and FDO2-G2.
Definition fdo2_types.hpp:378
int32_t channels
N: 1.
Definition fdo2_types.hpp:379
int32_t firmware
R: 100 x major + minor, 357 is firmware 3.57.
Definition fdo2_types.hpp:380