OpenMobileAlliance-Archive / OMA-LWM2M-DevKit

Public - OMA Lightweight M2M repository for developing a LWM2M Client/Server tutorial
ISC License
126 stars 49 forks source link

Type:Float support on Devkit #8

Open vsobara opened 8 years ago

vsobara commented 8 years ago

Hi,

I am new DEVKIT, Can any one please let me know whether the DEVKIT supports type: float, if just create a new object resource with "type": "float", or do I need to change some other to make it work.

"11": { "id": 11, "name": "Client Hold Off Time", "operations": "-", "instancetype": "single", "mandatory": true, "type": "float", "range": "", "units": "s",

Regards, Veerendra

jpradocueva commented 8 years ago

@mkovatsc could you please provide a comment? Do you recall if when the DEVKIT was developed 'float' type was supported? Thanks

mkovatsc commented 8 years ago

For text/plain and JSON floats are irrelevant (they are just text representing a floating point number.

For TLV I remember adding a binary float serialized and parser.

The code should be there, but so far there was no Object with a float to test it, if I remember correctly. Have you tested it? Any concrete issues?

vsobara commented 8 years ago

Yes, I was trying to test scenario where by creating one new Object with type:float , but was not able to test as the DEVKIT was returning the value in string and in the end coap server was not able to parse the incoming value from DEVKIT as it was expecting float value. It would be great to hear from you if there is any other option to create an Object with float type.

Regards, Veerendra