1-Wire and ENS210 driver stack
Public Types | Public Member Functions | Public Attributes | List of all members
ENS210_Result_T Struct Reference

Measurement result from ENS210. More...

#include <ENS210_Result.hpp>

Public Types

enum  ENS210_Result_status_T : uint8_t {
  Status_NA = 0, Status_OK = 1, Status_Invalid = 2, Status_CRC_error = 3,
  Status_I2C_error = 4
}
 

Public Member Functions

float TempKelvin () const
 
int TempKelvinx10 () const
 
float TempCelsius () const
 
int TempCelsiusX10 () const
 
float TempFahrenheit () const
 
int TempFahrenheitx10 () const
 
float HumidityPercent () const
 Fetch relative humidity 0% to 100.0%.
 
int HumidityPercentX10 () const
 
float AbsoluteHumidityPercent () const
 Fetch relative humidity % x10, ie 395 means 39.5% relative humidity.
 
void DiagPrintf () const
 

Public Attributes

ENS210_Result_status_T status
 
uint16_t rawTemperature
 temperature in 1/64 Kelvin, corrected for solder offset
 
uint16_t rawHumidity
 relative humidity in 1/512RH (ie a value of 51200 means 100% relative humidity)
 

Detailed Description

Measurement result from ENS210.

Member Enumeration Documentation

◆ ENS210_Result_status_T

Enumerator
Status_NA 

nothing here yet...

Status_OK 

The value was read, the CRC matches, and data is valid.

Status_Invalid 

The value was read, the CRC matches, but the data is invalid (e.g. the measurement was not yet finished).

Status_CRC_error 

The value was read, but the CRC over the payload (valid and data) does not match.

Status_I2C_error 

There was an I2C communication error attempting to read the value.


The documentation for this struct was generated from the following files: