Closed AnneThKu closed 2 years ago
Tested on fjåge Java gateway and on Fjage.jl. Both work as expected. So I suspect this is specific to JS.
It seems to return [null, null, null, null, null]
Most likely from fjage.js, since on modern UnetStacks, Parameter
are not provided by unet.js
anymore. They're based into fjage.
https://github.com/org-arl/fjage/blob/master/gateways/js/src/fjage.js#L174...L176
OK. This is an issue with JSON not supporting NaN
. https://github.com/org-arl/fjage/issues/109
Will reopen https://github.com/org-arl/fjage/issues/109 and close this issue.
Did you check the JSON generated? node.orgin
is a double[]
and so should be encoded by fjåge as a base64 string with IEEE NaNs and not as NaN
in JSON.
Yes the JSON had NaN
..
"action":"send","message":{"clazz":"org.arl.fjage.param.ParameterRsp","data":{"index":-1,"values":null,"param":"org.arl.unet.nodeinfo.NodeInfoParam.origin","value":[NaN,NaN],"readonly":[],"msgID":"4c17723b-70c1-452d-9746-60f7f6905a57","perf":"INFORM","recipient":"WebGW-","sender":"node","inReplyTo":"38b8889ceca220f2121de0d990cf04af","sentAt":1647307089333}},"relay":false}\n
When
node.origin
is set as[Float.NaN, Float.NaN]
, if we try to fetch multiple node parameters including origin, it does not return any of the parameters. For example,await nodeinfo.get(['origin', 'location', 'address', 'mobility', 'heading']);
returns value as,,,,
.