w3c / wot-binding-templates

Web of Things (WoT) Binding Templates
http://w3c.github.io/wot-binding-templates/
Other
22 stars 25 forks source link

[Modbus] Explaining data types #340

Open egekorkan opened 10 months ago

egekorkan commented 10 months ago

We should explain the mapping of the xsd types to what Modbus libraries would understand, i.e. saying that xsd:int is signed integer 32-bit.

Kaz040 commented 6 months ago

I looked into the payloadDataType and I think the list of the xsd types in the binding template should be edited. I think data types like xsd:decimal and xsd:integer should not be included because they both have no limit (-infinity to infinity) plus they are used to generate other built-in-types that are limited(see the image below).

image

Also, since a register in modbus is 16 bits long (2 bytes), is there is any modbus implementation that will use a byte datatype? The same thought goes for unsignedByte

Lastly, I think we should make provision for timestamp datatype. some implementation might use it.

danielpeintner commented 6 months ago

FYI: the type hierarchy can be found here