Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
|
IEEE11073 Float Data Types. More...
#include <DataTypes.hpp>
Public Types | |
enum | ReservedFloatValues : int32_t { MDER_POSITIVE_INFINITY = 0x007FFFFE , MDER_NaN = 0x007FFFFF , MDER_NRes = 0x00800000 , MDER_RESERVED_VALUE = 0x00800001 , MDER_NEGATIVE_INFINITY = 0x00800002 } |
enum | ReservedSFloatValues : int16_t { MDER_S_POSITIVE_INFINITY = 0x07FE , MDER_S_NaN = 0x07FF , MDER_S_NRes = 0x0800 , MDER_S_RESERVED_VALUE = 0x0801 , MDER_S_NEGATIVE_INFINITY = 0x0802 } |
Static Public Member Functions | |
static float | float16_IEEE11073_to_IEEE754 (const uint16_t raw_bt_float16_le) |
Converts a 'IEEE-11073 16-bit SFLOAT' to std IEEE754 float. More... | |
static float | float32_IEEE11073_to_IEEE754 (const uint32_t raw_bt_float32_le) |
Converts a 'IEEE-11073 32-bit FLOAT' to std IEEE754 float. More... | |
IEEE11073 Float Data Types.
Definition at line 99 of file DataTypes.hpp.
enum ieee11073::FloatTypes::ReservedFloatValues : int32_t |
Enumerator | |
---|---|
MDER_POSITIVE_INFINITY | |
MDER_NaN | |
MDER_NRes | |
MDER_RESERVED_VALUE | |
MDER_NEGATIVE_INFINITY |
Definition at line 101 of file DataTypes.hpp.
enum ieee11073::FloatTypes::ReservedSFloatValues : int16_t |
Enumerator | |
---|---|
MDER_S_POSITIVE_INFINITY | |
MDER_S_NaN | |
MDER_S_NRes | |
MDER_S_RESERVED_VALUE | |
MDER_S_NEGATIVE_INFINITY |
Definition at line 109 of file DataTypes.hpp.
|
static |
Converts a 'IEEE-11073 16-bit SFLOAT' to std IEEE754 float.
raw_bt_float16_le is in little-endian, 2 bytes. Exponent at highest byte.
Definition at line 81 of file DataTypes.cpp.
|
static |
Converts a 'IEEE-11073 32-bit FLOAT' to std IEEE754 float.
Example: Temperature measurement, GattCharacteristicType::TEMPERATURE_MEASUREMENT.
raw_bt_float32_le is in little-endian, 4 bytes. Exponent at highest byte.
Definition at line 99 of file DataTypes.cpp.