|
SFM_FLOW_METER Driver 0.1.0
API reference
|
Public types of the SFM flow meter driver: errors, Result<T>, the families, variants and gases, the Sample, and Config.
More...
#include <array>#include <cstdint>#include "sfm_flow_meter_detail.hpp"#include "sfm_flow_meter_version.h"Go to the source code of this file.
Classes | |
| struct | sfm::Result< T > |
| The value of a call, or why there is none. More... | |
| struct | sfm::Result< void > |
| The result of a call that returns no value. More... | |
| struct | sfm::Wait |
A wait the caller owes the driver: delay us, then call Poll(). 0 means nothing to wait. More... | |
| struct | sfm::ProductInfo |
| The product identifier read at initialisation. More... | |
| struct | sfm::ScalingInfo |
| What the sensor reports about the scaling of a gas, and whether it matches the table. More... | |
| struct | sfm::Capabilities |
| Which calls a part offers, from its table row. More... | |
| struct | sfm::Sample |
| One measurement. Flow is in millilitres per minute at the part's reference conditions. More... | |
| struct | sfm::RawReply |
| The words of one reply, after their CRCs were checked and before anything was decoded. More... | |
| struct | sfm::Stats |
| Counters the driver keeps; none of them is cleared by a successful call. More... | |
| struct | sfm::Config |
Everything EnsureInitialized() applies. More... | |
Namespaces | |
| namespace | sfm |
The SFM flow meter driver: everything it declares lives here; internals in detail. | |
Functions | |
| constexpr const char * | sfm::ToString (Error error) noexcept |
| The name of an error, for logs. | |
| constexpr uint32_t | sfm::FamilyBit (Family f) noexcept |
A bit in a family mask: SfmFlowMeter<Port, kFamilySf06 | kFamilySf05>. | |
| constexpr const char * | sfm::GetDriverVersion () noexcept |
| constexpr uint32_t | sfm::GetDriverVersionMajor () noexcept |
| constexpr uint32_t | sfm::GetDriverVersionMinor () noexcept |
| constexpr uint32_t | sfm::GetDriverVersionPatch () noexcept |
Variables | |
| constexpr uint32_t | sfm::kFamilySf06 = 1U << 0 |
| Family mask bits. | |
| constexpr uint32_t | sfm::kFamilySf06Gen2 = 1U << 1 |
Family::Sf06Gen2. | |
| constexpr uint32_t | sfm::kFamilySf06Dual = 1U << 2 |
Family::Sf06Dual. | |
| constexpr uint32_t | sfm::kFamilySf05 = 1U << 3 |
Family::Sf05. | |
| constexpr uint32_t | sfm::kFamilySf04 = 1U << 4 |
Family::Sf04. | |
| constexpr uint32_t | sfm::kFamilySfx6000 = 1U << 5 |
| constexpr uint32_t | sfm::kAllFamilies = 0x3FU |
| Every family: the default mask. | |
| constexpr uint16_t | sfm::kAveragingDefault = 0xFFFFU |
Marks Config::averaging as "the family's reset value". | |
| constexpr uint16_t | sfm::kFilterDefault = 50961U |
| The filter argument of the default 3 ms response (SFM3304, SFM3505). | |
Public types of the SFM flow meter driver: errors, Result<T>, the families, variants and gases, the Sample, and Config.
Everything here is plain data with no platform dependency, so handlers, tests and tools can include it without the driver. Config{} selects Variant::Auto in the SF06 family and the chip's reset behaviour. The table of parts and Validate() are in sfm_flow_meter_parts.hpp.