ObjectModel `seq` responses when in SBC mode?
-
A quick question; can someone with a Duet in SBC mode tell me what the response to a ObjectModel
seqs
key request looks like?M409 F"vnd99" K"seqs"
eg; is it
{"key":"seqs","flags":"vnd99","result":{}}
or{"key":"seqs","flags":"vnd99","result":null}
, or something else??I'm working on code that queries a list of OM keys, and following the OM documentation:
https://docs.duet3d.com/User_manual/Reference/Gcodes#m409-query-object-model
Which says this:In standalone mode, each main key (like boards or heat) has its own sequence number in the seqs key which is not documented here. Whenever a non-live field is updated (see M409 F"f"), this sequence number is increased. For clients targeting standalone mode, it can be helpful to check these values to determine when it is time to request a full key from RRF again. There is an extra value seqs.reply as well which is used notify clients about new messages (see rr_reply). Note that these sequence numbers are not exposed in SBC mode
My code does the sequence processing properly when in standalone mode, checking for sequence changes for the keys it fetches and only doing verbose updates when needed.
But I'm keen to make sure it wont blow up if connected to a machine in SBC mode. Currently I check for a seqs key response of
null
or{}
(empty dict.) and assume SBC mode in that case. But since I only have my humble Duet2 I cant test this, hence the above question.. I drew a blank trying to search for this. -
@EasyTarget M409 works just like in standalone mode; it's passed through and interpreted by RRF:
M409 F"vnd99" K"seqs" { "key": "seqs", "flags": "vnd99", "result": { "boards": 753, "directories": 0, "fans": 6, "global": 3, "heat": 9, "inputs": 25, "job": 1, "ledStrips": 0, "move": 38, "network": 3, "reply": 0, "sensors": 6, "spindles": 0, "state": 2, "tools": 3, "volChanges": [ 0, 0 ], "volumes": 1 } }
-
@chrishamm said in ObjectModel `seq` responses when in SBC mode?:
it's passed through and interpreted by RRF:
AAh, brilliant, thanks for the response.
I guess this was just me getting confused about what 'exposed' means; I just twigged it means 'exposed to the DSF' as opposed to exposed to M409.
I can now strip my 'SBC mode' functionality out.. less complex == more good.
-
@EasyTarget In SBC mode the regular IPC and REST HTTP API do not expose sequence numbers as part of the object model because model updates are pushed over a socket connection making sequence numbers redundant. I'm quite sure the
rr_
HTTP compatibility layer provides sequence numbers, though.