|  | GM6000 Digital Heater Controller Build: 20 (Branch = develop)
    SDX-1330 | 
This class defines an interface for reading and managing a combined RH and Temperature sensor. More...
This class defines an interface for reading and managing a combined RH and Temperature sensor.
Note: There is no requirement for how RH/Temperature is measured; or if the sensor 'package' is connected to the MCU via discrete signals or through a serial bus.
The class is NOT thread safe. The application is RESPONSIBLE for ensuring thread-safe usage.
#include <Api.h>
| Public Types | |
| enum | SamplingState_T { eNOT_STARTED , eSAMPLING , eSAMPLE_READY , eERROR } | 
| State of the non-blocking sampling.  More... | |
| Public Member Functions | |
| virtual bool | start () noexcept=0 | 
| Starts the driver actively sampling. | |
| virtual void | stop () noexcept=0 | 
| Stops the driver from sampling inputs, and disables the on-board heater. | |
| virtual bool | sample (float &rhOut, float &tempCOut) noexcept=0 | 
| This method is used to read/sample both RH (percentage 0 to 100) and Temperature (in degrees Centigrade). | |
| virtual SamplingState_T | startSample () noexcept=0 | 
| This method is used to start a non-blocking sampling sequence. | |
| virtual SamplingState_T | getSamplingState () noexcept=0 | 
| This method returns the current state of the non-blocking sampling. | |
| virtual SamplingState_T | getSample (float &rhOut, float &tempCOut) noexcept=0 | 
| Used to retrieve the sample result. | |
| virtual bool | setHeaterState (bool enabled) noexcept | 
| This method is used to enable/disable a 'on-board heater' that is used to evaporate condensation on the sensing element(s). | |
| virtual | ~Api () | 
| Virtual destructor. | |
| 
 | inlinevirtual | 
Virtual destructor.
| 
 | pure virtualnoexcept | 
Used to retrieve the sample result.
Returns the current sample. If the returned state value does NOT equal eSAMPLE_READY, then 'rhOut' and 'tempCOut' arguments are invalid.
Implemented in Driver::RHTemp::Simulated::Api.
| 
 | pure virtualnoexcept | 
This method returns the current state of the non-blocking sampling.
Implemented in Driver::RHTemp::Simulated::Api.
| 
 | pure virtualnoexcept | 
This method is used to read/sample both RH (percentage 0 to 100) and Temperature (in degrees Centigrade).
This method blocks/busy-waits until the both RH and Temperature has been captured. The block/busy-wait time can be relatively long (e.g. >15ms)
The method returns true when it is successful is reading RH and Temperature; else false is returned (e.g. a communication error occurred).
Note: This method will fail if a non-blocking sample is in progress
Note: The 'requestedAccuracy' argument is a suggestion, i.e. the concrete implementation may or may not support the accuracy request.
Implemented in Driver::RHTemp::Simulated::Api.
| 
 | inlinevirtualnoexcept | 
This method is used to enable/disable a 'on-board heater' that is used to evaporate condensation on the sensing element(s).
NOTE: The concrete implementation is NOT required to support this method, i.e. it is Application RESPONSIBILITY for ensuring it business logic that relies on this functionality - that it has create the appropriate concrete driver.
When the heater is on, the Temperature readings are not guaranteed to be accurate.
The method returns true when it is successful; else false is returned (e.g. a communication error occurred).
Reimplemented in Driver::RHTemp::Simulated::Api.
| 
 | pure virtualnoexcept | 
Starts the driver actively sampling.
The method returns true when it is successful; else false is returned (e.g. a communication error occurred).
Implemented in Driver::RHTemp::Simulated::Api.
| 
 | pure virtualnoexcept | 
This method is used to start a non-blocking sampling sequence.
The application then 'polls' state of the sampling by calling getSamplingState()
The method returns eSAMPLING when if successfully starts a sampling sequence; else eERROR is returned (e.g. a sample sequence is already in progress).
Implemented in Driver::RHTemp::Simulated::Api.
| 
 | pure virtualnoexcept | 
Stops the driver from sampling inputs, and disables the on-board heater.
Implemented in Driver::RHTemp::Simulated::Api.