|
| struct | AddressSet |
| | The addresses a part may use; list[0] is the default. More...
|
| |
| struct | Capabilities |
| | Which calls a part offers, from its table row. More...
|
| |
| class | CheckedConfig |
| | A configuration proven valid at build time. More...
|
| |
| struct | Config |
| | Everything EnsureInitialized() applies. More...
|
| |
| struct | GasList |
| | The gases of a part. More...
|
| |
| struct | GasRow |
| | One calibrated gas of a part: its start code, its status index and its scaling. More...
|
| |
| class | I2cInterface |
| | CRTP base of the platform I2C port. More...
|
| |
| struct | PartInfo |
| | One row of the part table. More...
|
| |
| struct | ProductInfo |
| | The product identifier read at initialisation. More...
|
| |
| struct | RawReply |
| | The words of one reply, after their CRCs were checked and before anything was decoded. More...
|
| |
| struct | Result |
| | The value of a call, or why there is none. More...
|
| |
| struct | Result< void > |
| | The result of a call that returns no value. More...
|
| |
| struct | Sample |
| | One measurement. Flow is in millilitres per minute at the part's reference conditions. More...
|
| |
| struct | Scaling |
| | Counts per slm as the rational num / den, the offset and the unit word of one gas. More...
|
| |
| struct | ScalingInfo |
| | What the sensor reports about the scaling of a gas, and whether it matches the table. More...
|
| |
| class | SfmFlowMeter |
| | The driver. More...
|
| |
| struct | Stats |
| | Counters the driver keeps; none of them is cleared by a successful call. More...
|
| |
| struct | TempRow |
| | The temperature scaling of a part. More...
|
| |
| struct | Timing |
| | Timings of a part in microseconds: the datasheet maxima. More...
|
| |
| struct | Wait |
| | A wait the caller owes the driver: delay us, then call Poll(). 0 means nothing to wait. More...
|
| |
|
| enum class | Error : uint8_t {
Error::Ok = 0
, Error::NotInitialized = 1
, Error::InvalidArgument = 2
, Error::Bus = 3
,
Error::Timeout = 4
, Error::DeviceIdMismatch = 5
, Error::Crc = 6
, Error::Busy = 7
,
Error::DeviceFault = 8
, Error::Unsupported = 9
, Error::NoData = 16
, Error::NoDevice = 17
,
Error::OutOfRange = 18
, Error::StatusMismatch = 19
, Error::Stale = 20
, Error::DeviceReset = 21
,
Error::StateUnknown = 22
, Error::InvalidReply = 23
} |
| | Why a call failed. Every call of the driver returns one of these in its Result. More...
|
| |
| enum class | LogLevel : uint8_t { LogLevel::Error = 0
, LogLevel::Warning
, LogLevel::Info
, LogLevel::Debug
} |
| | Severity passed to the optional Log() hook. More...
|
| |
| enum class | Family : uint8_t {
Family::Sf06 = 0
, Family::Sf06Gen2
, Family::Sf06Dual
, Family::Sf05
,
Family::Sf04
, Family::Sfx6000
} |
| | The command-set family of a part. One protocol policy per family; every part is a row of data that names its family. More...
|
| |
| enum class | Variant : uint8_t {
Variant::Auto = 0
, Variant::SFM4300_20_B
, Variant::SFM4300_20_O
, Variant::SFM4300_20_P
,
Variant::SFM4300_50_B
, Variant::SFM4300_50_O
, Variant::SFM4300_50_P
, Variant::SFM3003_300_CL
,
Variant::SFM3003_300_CE
, Variant::SFM3003_300_CET
, Variant::SFM3013_300_CL
, Variant::SFM3013_300_CLM
,
Variant::SFM3019_200_CL
, Variant::SFM3119_240_CL
, Variant::SFM3304_250_D
, Variant::SFM3505_300
,
Variant::SFM3505_300_X
, Variant::SFM3000_200_C
, Variant::SFM3200
, Variant::SFM3200_AW
,
Variant::SFM3300_D
, Variant::SFM3300_AW
, Variant::SFM3400_D
, Variant::SFM3400_AW
,
Variant::SFM4200
, Variant::SFM4100_AIR
, Variant::SFM4100_O2
, Variant::SFM4100_CO2
,
Variant::SFM4100_N2O
, Variant::SFM4100_AR
, Variant::SFM6000D_50
, Variant::SFM6000D_20
,
Variant::SFM6000D_5
} |
| | A part (one row of the table in sfm_flow_meter_parts.hpp). The names follow the vendor's ordering suffixes; _B, _O and _P are the SFM4300 fittings. More...
|
| |
| enum class | Gas : uint8_t {
Gas::Air = 0
, Gas::O2
, Gas::N2
, Gas::N2O
,
Gas::CO2
, Gas::Ar
, Gas::HeOx
, Gas::AirO2
,
Gas::N2OO2
, Gas::CO2O2
, Gas::HeOxO2
} |
| | A calibrated gas or gas mixture. Which gases a part offers is in its table row. More...
|
| |
| enum class | ScalingCheck : uint8_t { ScalingCheck::Strict = 0
, ScalingCheck::Lenient
, ScalingCheck::Off
} |
| | What ReadScaling() does when the sensor's scale or offset differs from the datasheet. More...
|
| |
| enum class | RangePolicy : uint8_t { RangePolicy::Reject = 0
, RangePolicy::Flag
} |
| | What ReadSample() does with a flow or temperature outside the part's span. More...
|
| |
| enum class | TimingPolicy : uint8_t { TimingPolicy::Conservative = 0
, TimingPolicy::Datasheet
} |
| | Which waits the driver uses after a reset or a wake. More...
|
| |
| enum class | State : uint8_t {
State::Uninitialized = 0
, State::Idle
, State::Measuring
, State::Asleep
,
State::StateUnknown
} |
| | The driver's shadow of the chip's mode. More...
|
| |
|
| constexpr Config | KconfigDefaults () noexcept |
| | The configuration menuconfig selected, on top of the datasheet defaults.
|
| |
| constexpr const PartInfo * | FindPart (Variant variant) noexcept |
| | The table row of a variant.
|
| |
| constexpr const PartInfo * | FindById (Family family, uint32_t id, uint8_t address) noexcept |
| | The table row that a product identifier and address select inside one family.
|
| |
| constexpr const PartInfo * | FamilyRow (Family family) noexcept |
| | The first row of a family: what Variant::Auto uses for waits before the part is known.
|
| |
| constexpr const GasRow * | FindGas (const PartInfo &part, Gas gas) noexcept |
| | The gas row of a part.
|
| |
| constexpr bool | Has (const PartInfo &part, uint32_t bits) noexcept |
| |
| constexpr Capabilities | CapabilitiesOf (const PartInfo &part) noexcept |
| |
| constexpr int64_t | DivideRounded (int64_t value, int64_t divisor) noexcept |
| | Divide value by divisor rounding to nearest, ties away from zero.
|
| |
| constexpr int32_t | FlowMlPerMin (int32_t raw, const Scaling &scaling) noexcept |
| | A raw flow in millilitres per minute: (raw - offset) * 1000 * den / num, rounded.
|
| |
| constexpr int32_t | TemperatureMdegC (int32_t raw, const TempRow &row) noexcept |
| | A raw temperature in milli-degrees Celsius: (raw - offset) * 1000 / scale, rounded.
|
| |
| constexpr Error | Validate (const Config &config) noexcept |
| | Check a configuration against the part it names, without touching the chip.
|
| |
| constexpr Config | PresetFor (Variant variant) noexcept |
| | A part's datasheet defaults as a configuration.
|
| |
|
void | ConfigIsInvalid () noexcept |
| | Reached only when a CheckedConfig is built from an invalid configuration: it is never defined, so the build fails and names it (KB-CPP20-013).
|
| |
| constexpr const char * | ToString (Error error) noexcept |
| | The name of an error, for logs.
|
| |
| constexpr uint32_t | FamilyBit (Family f) noexcept |
| | A bit in a family mask: SfmFlowMeter<Port, kFamilySf06 | kFamilySf05>.
|
| |
| constexpr const char * | GetDriverVersion () noexcept |
| |
| constexpr uint32_t | GetDriverVersionMajor () noexcept |
| |
| constexpr uint32_t | GetDriverVersionMinor () noexcept |
| |
| constexpr uint32_t | GetDriverVersionPatch () noexcept |
| |
The SFM flow meter driver: everything it declares lives here; internals in detail.
Check a configuration against the part it names, without touching the chip.
Fails when an enumeration holds a value that is not an enumerator, the family is not the part's, the address is not in the part's set, Auto is combined with TimingPolicy::Datasheet, averaging or the filter is used on a part without that feature, averaging is out of range for the part, or the error limit is 0.
- Parameters
-
- Returns
Error::Ok or Error::InvalidArgument.