|
HardFOC Core
API reference
|
Handler for Sensirion gas mass flow meters on a BaseI2c: SF06 (SFM4300, …) and SFx6000 (SFM6000D).
More...
#include <atomic>#include <cstddef>#include <cstdint>#include <memory>#include "base/BaseI2c.h"#include "core/hf-core-drivers/external/hf-sfm-flow-meter-driver/inc/sfm.hpp"#include "RtosMutex.h"Go to the source code of this file.
Classes | |
| class | HalI2cSfmComm |
CRTP transport bridging sfm::I2cInterface to a BaseI2c device. More... | |
| struct | SfmHandlerConfig |
| Construction-time configuration for one SF06 flow meter. More... | |
| class | SfmHandler |
Handler wrapping one SF06 flow meter on a BaseI2c device. More... | |
| struct | SfmHandler::Counters |
| Diagnostics counters since construction. More... | |
Handler for Sensirion gas mass flow meters on a BaseI2c: SF06 (SFM4300, …) and SFx6000 (SFM6000D).
Bridges the templated sfm::Driver<I2cT> (hf-sfm-flow-meter-driver) to the HardFOC BaseI2c device interface through an internal CRTP adapter, and exposes a narrow, mutex-protected API for the layers above: probe identity, start a gas table, read one frame, stop.
Ownership: the caller owns the BaseI2c device (address pre-configured, 0x2A default for SFM4300); the handler owns the adapter and the driver instance. Bring-up is lazy and idempotent.
Gas-table gating: after the product identifier is read the driver knows the part family (which start code means which gas — they differ between SF06 and SFx6000) and refuses tables the part does not carry (SFM4300-50-x has no CO2 or N2O tables). Before the identity is known only O2 and Air may start. Start() reports UnsupportedGas in that case so the caller can choose a fallback and flag the reading — the handler never substitutes a table silently.