Metadata.json of a Structure-ADI

Hello

How do I access datatype and access attributes of a ADI defined as a struct?

ADI:
Attribute #1(Name).: ‘T’,‘e’,‘s’,‘t’
Attribute #2(Data Type).: ‘5’,‘6’ (UINT16, UINT32)
Attribute #3(Number of elements).: 2
Attribute #4(Descriptor).: ‘3’,‘3’ (GET/SET, GET/SET)
Attribute #6(Max. value).: optional (not implemented)
Attribute #7(Min value).: optional (not implemented)

Attribute #5(Value(s)).: 0x1234, 0x12345678

GET adi/data.json?offset0&count=1
[“123412345678”]

GET adi/metadata.json?offset0&count=1
Screenshot

Best regards

Silvan

Hello Skoch,

There is a limitation of the metadata.json endpoint in that it can only provide datatypes for non-struct ADIs. To overcome this limitation an additional endpoint was added in recent firmware versions, metadata2.json. This endpoint will provide datatypes for struct ADIs.

There is an example of how to use this endpoint in the file vfs/js/adi.js which can be accessed via the FTP server.

$.getJSON(dev.jsonURL("/adi/metadata2.json"), { offset: a, count: b }, function (b) 

Hope this helps,
Ian Tracy

1 Like

Hello Ian Tracy

Many thanks for this info.

How do I check for a new available firmware?

Silvan

Hello Silvan,

Please contact your local HMS sales representative, and let them know which networks you are working with. They should be able to provide you with the latest version.

Best regards,
Ian Tracy