Converts temperatures in °C to and from their internal SDK representation.
More...
#include <TemperatureConverter.h>
Converts temperatures in °C to and from their internal SDK representation.
◆ TemperatureConverter()
Constructor.
- Parameters
-
[in] | precision | of the temperature. |
◆ getPrecision()
Returns the temperature precision.
- Returns
- temperature precision.
◆ isTemperatureValid()
bool optris::TemperatureConverter::isTemperatureValid |
( |
float | temperature | ) |
|
|
inlinenoexcept |
Checks if the given temperature in °C is valid.
- Parameters
-
[in] | temperature | in °C to check. |
- Returns
- true if the temperature is valid. False otherwise.
◆ isValueValid()
bool optris::TemperatureConverter::isValueValid |
( |
unsigned short | value | ) |
|
|
inlinenoexcept |
Checks if an internal value is valid.
- Parameters
-
- Returns
- true if the value is valid. False otherwise.
◆ setPrecision()
Set the temperature precision.
- Parameters
-
◆ toTemperature()
float optris::TemperatureConverter::toTemperature |
( |
float | value | ) |
const |
|
inlinenoexcept |
Converts an internal value to a temperature in °C.
- Parameters
-
[in] | value | internal value to convert. |
- Returns
- temperature in °C.
◆ toValue()
unsigned short optris::TemperatureConverter::toValue |
( |
float | temperature | ) |
const |
|
inlinenoexcept |
Converts a temperature in °C to an internal value.
- Parameters
-
[in] | temperature | in °C to convert. |
- Returns
- internal value.
The documentation for this class was generated from the following file: