|
FDO2 Driver 0.1.0
API reference
|
Everything the driver needs from the application, with the datasheet defaults. More...
#include <fdo2_types.hpp>
Public Attributes | |
| Family | family {Family::Fdo2G2} |
Decides whether #SETM is attempted (A-3). | |
| uint32_t | baud {19'200} |
| The rate the module runs at now; used for airtime. | |
| uint32_t | power_up_ms {1500} |
Wait after power before #VERS, 1000 to 30000 (A-4). | |
| uint32_t | command_ms {100} |
| uint32_t | measurement_ms {300} |
| uint32_t | calibration_ms {10'000} |
Allowance of #CALO and #CAHI, 10000 to 60000 (4.3). | |
| uint32_t | flash_ms {2000} |
Allowance of #CRCE #SETM #BCST #WRUM, 100 to 30000 (A-7). | |
| uint32_t | logo_ms {1100} |
Allowance of #LOGO, 100 to 10000 (A-6). | |
| uint32_t | margin_ms {50} |
| Added to every deadline, 0 to 1000. | |
| uint32_t | power_off_ms {500} |
Off time of PowerCycle(), 10 to 10000. | |
| uint8_t | retries {1} |
| Extra attempts of an idempotent read, 0 to 3. | |
| CrcMode | crc {CrcMode::Auto} |
| Expectation for the CRC suffix. | |
| StatusPolicy | status_policy {StatusPolicy::Datasheet} |
| Status acceptance (A-1). | |
| bool | strict_spacing {true} |
| Exactly one space between tokens (A-11). | |
| bool | ignore_lf {true} |
| A LF at the start of a line is dropped. | |
| bool | erro_without_crc {true} |
Accept #ERRO without CRC while CRC is on (A-12). | |
| BroadcastPolicy | broadcast {BroadcastPolicy::Refuse} |
| Start-up on a streaming module. | |
| uint32_t | broadcast_listen_ms {0} |
| Passive listen at start-up, 0 (off) to 12000. | |
| bool | allow_persistent_writes {false} |
| uint8_t | max_flash_writes {8} |
| Flash-writing calls per driver lifetime, 1 to 64. | |
| uint16_t | min_steady_s {300} |
| int32_t | o2_min_mhpa {-5000} |
| Plausible O, lower bound (10^-3 hPa). | |
| int32_t | o2_max_mhpa {2'100'000} |
| Plausible O, upper bound (spec 0 to 2000 hPa). | |
| int32_t | temp_min_mc {-20'000} |
| Plausible T, lower bound (10^-3 degC; spec -10 degC). | |
| int32_t | temp_max_mc {70'000} |
| Plausible T, upper bound (spec 60 degC). | |
| int32_t | pressure_min_ubar {250'000} |
| Plausible P, lower bound (sensor 300 mbar). | |
| int32_t | pressure_max_ubar {1'200'000} |
| Plausible P, upper bound (sensor 1100 mbar). | |
| int32_t | humidity_max_mpct {100'000} |
| Plausible H, upper bound (100 RH). | |
| int32_t | pressure_reference_ubar {0} |
| 0: use the module's pressure; else the caller's. | |
| uint8_t | cal_window_pct {20} |
| int32_t | cal_window_min_mhpa {5000} |
Everything the driver needs from the application, with the datasheet defaults.
Defaults follow the datasheet where it states a value and are documented assumptions (with a knob) where it does not: see the ambiguity table in docs/configuration.md. It has no operator==; compare fields.
| bool fdo2::Config::allow_persistent_writes {false} |
Every flash-writing call needs this (docs/calibration.md).
| int32_t fdo2::Config::cal_window_min_mhpa {5000} |
Calibration guard: smallest window, and the whole window of #CALO, 10^-3 hPa.
| uint8_t fdo2::Config::cal_window_pct {20} |
Calibration guard: the reading must be within this percent of the standard, 1 to 100.
| uint32_t fdo2::Config::command_ms {100} |
Processing allowance of #VERS #IDNR #RDUM #BAUD, 10 to 5000 (A-5).
| uint32_t fdo2::Config::measurement_ms {300} |
Allowance of #MOXY and #MRAW, 50 to 5000 (150 or 300 ms, 4.3).
| uint16_t fdo2::Config::min_steady_s {300} |
Steady-state seconds a calibration needs (datasheet: 5 min), 0 to 3600.