Characeristics service.
More...
Characeristics service.
◆ float_to_ieee11703()
| __STATIC_INLINE void float_to_ieee11703 |
( |
float |
val, |
|
|
int8_t |
precision, |
|
|
svc_ieee11073_float_t * |
ieee_val |
|
) |
| |
Convert float value to ISO/IEEE Std. 11073-20601™-2008 standard.
- Parameters
-
| [in] | val | value to convert |
| [in] | precision | number of digits to the right of decimal separator |
| [out] | ieee_val | value converted to IEEE 11073 standard |
◆ ieee11703_to_float()
Convert ISO/IEEE Std. 11073-20601™-2008 standard to float value.
- Parameters
-
| [in] | value | IEEE 11073 standard converted to float value |
- Returns
- float value
◆ pack_date_time()
| __STATIC_INLINE void pack_date_time |
( |
const svc_date_time_t * |
date_time, |
|
|
uint8_t ** |
ptr |
|
) |
| |
Pack date time.
Function puts date_time to buffer ptr and increases pointer
- Parameters
-
| [in] | date_time | date time |
| [in,out] | ptr | pointer to data buffer |
◆ pack_ieee11703_float()
Pack IEEE 11073 value to FLOAT-Type.
- Parameters
-
- Returns
- packed value in FLOAT-Type
◆ pack_ieee11703_sfloat()
Pack IEEE 11073 value to SFLOAT-Type.
- Parameters
-
- Returns
- packed value in SFLOAT-Type
◆ unpack_date_time()
| __STATIC_INLINE void unpack_date_time |
( |
const uint8_t ** |
ptr, |
|
|
svc_date_time_t * |
date_time |
|
) |
| |
Unpack date time.
Function puts values from buffer ptr to date_time and increases pointer
- Parameters
-
| [in,out] | ptr | pointer to data buffer |
| [out] | date_time | date time |
◆ unpack_ieee11703_float()
Unpack FLOAT-Type to IEEE 11073 value.
- Parameters
-
| [in] | float_val | float value |
| [out] | val | value after unpack |
◆ unpack_ieee11703_sfloat()
Unpack SFLOAT-Type to IEEE 11073 value.
- Parameters
-
| [in] | sfloat_val | sfloat value |
| [out] | val | value after unpack |