Any hit as to when this might be ready?
Thanks.
Any hit as to when this might be ready?
Thanks.
It’s half in there. You can load and save but it doesn’t actually persist right now… we have a few things to get done first though I’m afraid, so likely a few weeks.
Sorry to NAG! but any news on when this might appear?
Thanks
It’s very soon… possibly next week
@Hugo @Peter am I right in thinking that an Agent can only save one table. Can Squirrel support a table of tables as long as serialisable rules are adhered too? If yes any chance of an example?
Thanks as always
Yes, only one “top-level” table, but yes, that table can contain other tables. The syntax is (or will be, once server.save is rolled out) just what you’d expect:
t <- {}; t["a"] <- { foo = "bar" }; t["b"] <- { ptang = "frink" }; server.save(t);
You’ll get warnings in the logs if you try and save something that isn’t serialisable.
Peter
This is now rolled out in agents, give it a go
Thanks & a perfect start to a Sunday morning just need a Bacon butty… :))
Works like a charm. Tested it with this code:
t <- server.load(); foreach(idx, val in t) server.log(idx+"="+val+"\ "); if ("count" in t) { t["count"] += 1; } else { t["count"] <- 1; } server.save(t);
Using json to define table and using “Clone” to load a saved table into existin table on agent start/re-start. Simply awesome, is I think, the technically correct term …
msgObj <- { "msgLen": null, "dPID": null, "value": 0, "timestamp": null, "msg": "", "mType": null, "rssi": 0, "vdd": 0, "t": null, "rh": null, "monitorE": null, "Responders": [null,null,null,null] };