FDO2-G2 UART client.
More...
#include <fdo2_driver.hpp>
template<typename UartT>
class fdo2::Driver< UartT >
FDO2-G2 UART client.
- Template Parameters
-
◆ Measure
template<typename UartT >
Which command SendMeasure starts (Version = the #VERS identity handshake).
| Enumerator |
|---|
| Moxy | |
| Mraw | |
| Version | |
◆ Driver()
template<typename UartT >
◆ FlashLogo()
template<typename UartT >
Flash the status LED (identification). The echo comes after the ~1 s flash sequence, so this waits up to the slow-command timeout (SetSlowCommandTimeoutMs).
◆ GetLineTimeoutMs()
template<typename UartT >
◆ GetMeasureTimeoutMs()
template<typename UartT >
| uint32_t fdo2::Driver< UartT >::GetMeasureTimeoutMs |
( |
| ) |
const |
|
inlinenoexcept |
◆ GetSlowCommandTimeoutMs()
template<typename UartT >
| uint32_t fdo2::Driver< UartT >::GetSlowCommandTimeoutMs |
( |
| ) |
const |
|
inlinenoexcept |
◆ IsCrcRequired()
template<typename UartT >
◆ LastDeviceErrorCode()
template<typename UartT >
| int32_t fdo2::Driver< UartT >::LastDeviceErrorCode |
( |
| ) |
const |
|
inlinenoexcept |
◆ MeasureMoxy()
template<typename UartT >
Single oxygen + temperature + status round-trip (typically < ~150 ms for M=2).
◆ MeasureMraw()
template<typename UartT >
Same measurement plus raw optics / vent-path pressure / internal RH.
◆ ParseMoxyLine()
template<typename UartT >
Decode a #MOXY reply line. device_error receives the #ERRO code (may be null).
◆ ParseMrawLine()
template<typename UartT >
Decode a #MRAW reply line. device_error receives the #ERRO code (may be null).
◆ ParseVersionLine()
template<typename UartT >
Decode a #VERS reply line. device_error receives the #ERRO code (may be null).
◆ ReadUniqueId()
template<typename UartT >
◆ ReadVersion()
template<typename UartT >
◆ SendMeasure()
template<typename UartT >
Drop stale input, then send #MOXY / #MRAW. Does not wait for the reply.
◆ SetCrcRequired()
template<typename UartT >
Require the #CRCE 1 checksum on every reply (data sheet §4.2).
A reply that carries the suffix is always verified. With this set, a reply without it is rejected too (CrcMismatch), so a corrupted : cannot hide a bad reply. Set it only for a module whose CRC is enabled; the driver never sends #CRCE.
◆ SetLineTimeoutMs()
template<typename UartT >
◆ SetMeasureTimeoutMs()
template<typename UartT >
| void fdo2::Driver< UartT >::SetMeasureTimeoutMs |
( |
uint32_t |
ms | ) |
|
|
inlinenoexcept |
◆ SetSlowCommandTimeoutMs()
template<typename UartT >
| void fdo2::Driver< UartT >::SetSlowCommandTimeoutMs |
( |
uint32_t |
ms | ) |
|
|
inlinenoexcept |
Timeout for commands the module answers only after a long task (default 12000 ms).
Data sheet §4.1: the echo comes "after completion of the requested task". Used by FlashLogo (#LOGO: the LED flashes for about 1 s, §4.3); also sized for #CALO / #CAHI, which take up to 10 s. A port that returns at the CR still returns as soon as the echo arrives.
◆ TryReadReplyLine()
template<typename UartT >
Take one complete reply line if the transport already has it.
- Returns
- None with
line filled; Timeout when no complete line is waiting.
The documentation for this class was generated from the following file: