|
HardFOC Core
API reference
|
HAL handler wrapping one FDO2-G2 oxygen probe on a BaseUart.
More...
#include <Fdo2Handler.h>
Public Types | |
| using | DriverType = fdo2::Driver< HalUartFdo2Comm > |
Public Member Functions | |
| Fdo2Handler (BaseUart &uart, const Fdo2HandlerConfig &config=Fdo2HandlerConfig{}, RtosMutex *bus_mutex=nullptr) noexcept | |
| Construct a handler around an already-configured UART. | |
| Fdo2Handler (const Fdo2Handler &)=delete | |
| Fdo2Handler & | operator= (const Fdo2Handler &)=delete |
| Fdo2Handler (Fdo2Handler &&)=delete | |
| Fdo2Handler & | operator= (Fdo2Handler &&)=delete |
| bool | EnsureInitialized () noexcept |
Wait the FDO2-G2 power-up settle (kFdo2G2PowerUpSettleMs) and probe the device with #VERS. Caches the returned VersionInfo on success. Idempotent. | |
| bool | IsPresent () const noexcept |
True once EnsureInitialized() has succeeded. | |
| const fdo2::VersionInfo & | Identity () const noexcept |
| Cached identity (zeroed until probe succeeds). | |
| fdo2::DriverResult< fdo2::MoxyReading > | MeasureMoxy () noexcept |
One #MOXY round-trip โ partial-pressure O2 + temperature + status. | |
| fdo2::DriverResult< fdo2::MrawReading > | MeasureMraw () noexcept |
| fdo2::DriverResult< fdo2::VersionInfo > | ReadVersion () noexcept |
Re-read #VERS (refreshes the cached Identity). | |
| fdo2::DriverResult< std::uint64_t > | ReadUniqueId () noexcept |
Read the device's 64-bit unique serial via #IDNR. | |
Private Member Functions | |
| bool | EnsureInitializedLocked () noexcept |
Private Attributes | |
| Fdo2HandlerConfig | config_ |
| HalUartFdo2Comm | comm_ |
| std::unique_ptr< DriverType > | driver_ |
| fdo2::VersionInfo | identity_ {} |
| std::atomic< bool > | initialized_ {false} |
| RtosMutex | private_mutex_ |
| RtosMutex * | bus_mutex_ |
HAL handler wrapping one FDO2-G2 oxygen probe on a BaseUart.
Ownership: the handler holds a reference to the supplied BaseUart (the host owns the UART instance); the handler owns the CRTP adapter + the templated driver instance.
| using Fdo2Handler::DriverType = fdo2::Driver<HalUartFdo2Comm> |
|
explicitnoexcept |
Construct a handler around an already-configured UART.
| uart | Reference to an already-configured UART. Must outlive the handler. |
| config | Per-instance timeouts + diagnostics index. |
| bus_mutex | Optional shared mutex (non-null) when more than one PSUP device shares the UART. When null, the handler uses its own private mutex. |
|
delete |
|
delete |
|
noexcept |
Wait the FDO2-G2 power-up settle (kFdo2G2PowerUpSettleMs) and probe the device with #VERS. Caches the returned VersionInfo on success. Idempotent.
|
privatenoexcept |
|
inlinenoexcept |
Cached identity (zeroed until probe succeeds).
|
inlinenoexcept |
True once EnsureInitialized() has succeeded.
|
noexcept |
One #MOXY round-trip โ partial-pressure O2 + temperature + status.
|
noexcept |
One #MRAW round-trip โ same as MOXY plus back-side ambient pressure, optical signal, and housing humidity. Use this when the caller wants true volume-percent O2 (100 ยท pO2 / pressure_mbar).
|
delete |
|
delete |
|
noexcept |
Read the device's 64-bit unique serial via #IDNR.
|
noexcept |
Re-read #VERS (refreshes the cached Identity).
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |