knx
ETS configurable knx-stack
datapoint_types.h File Reference

Go to the source code of this file.

Functions

uint16_t dptToFloat (int32_t value)
 Convert a value from uint32_t to 2 uint8_t float (DPT9/EIS5). More...
 
int32_t dptFromFloat (uint16_t dptValue)
 Convert a value from 2 uint8_t float (DPT9/EIS5) to integer. More...
 

Function Documentation

◆ dptFromFloat()

int32_t dptFromFloat ( uint16_t  dptValue)

Convert a value from 2 uint8_t float (DPT9/EIS5) to integer.

Parameters
dptValue- the 2 uint8_t float (DPT9/EIS5) to convert
Returns
The value as integer, or INVALID_DPT_FLOAT for the DPT9 "invalid data" value.

Definition at line 47 of file datapoint_types.cpp.

◆ dptToFloat()

uint16_t dptToFloat ( int32_t  value)

Convert a value from uint32_t to 2 uint8_t float (DPT9/EIS5).

The possible range of the values is -67108864 to 67076096.

Parameters
value- the value to convert. Use INVALID_DPT_FLOAT for the DPT9 "invalid data" value.
Returns
The 2 uint8_t float (DPT9/EIS5).

Definition at line 18 of file datapoint_types.cpp.