knx
ETS configurable knx-stack
datapoint_types.h File Reference
#include <stdint.h>
Include dependency graph for datapoint_types.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define INVALID_DPT_FLOAT   2147483647U
 An invalid 2 uint8_t float (DPT9/EIS5). More...
 

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...
 

Macro Definition Documentation

◆ INVALID_DPT_FLOAT

#define INVALID_DPT_FLOAT   2147483647U

An invalid 2 uint8_t float (DPT9/EIS5).

To be used for dptToFloat() and dptFromFloat().

Definition at line 18 of file datapoint_types.h.

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.