You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The CBOR serializers to optimize the transfer size serializes double to floating-point numbers. Currently, the IoTivity-Lite won't deserialize floating-point numbers to double attributes.
It would be very welcome to support the deserialization of floating-point numbers to attributes of types double.
Shouldn't iotivity-lite rather add support for floating point numbers instead?
As double uses twice the space as float (see https://en.cppreference.com/w/cpp/language/types), iotivity-lite should make use of the memory space savings that would come with the support of floating point types, IMO.
Sure, supporting float would be nice as well. But if the float is received and the attribute is of type double, it should be successfully deserialized to double. That's what causes the issue.
The CBOR serializers to optimize the transfer size serializes double to floating-point numbers. Currently, the IoTivity-Lite won't deserialize floating-point numbers to double attributes.
It would be very welcome to support the deserialization of floating-point numbers to attributes of types double.
Note: Test with double arrays.
Where: https://github.com/iotivity/iotivity-lite/blob/master/api/oc_rep.c#L348
The text was updated successfully, but these errors were encountered: