Can the queue of M291 messages be iterated
-
I've recently replaced the use of M117 messages using
M291 P"control-message " S2
as a means of controlling DuetLapse3, on-the-fly. Typically from gcode but also from DWC. I just read that the newest firmware holds a queue of up to 8 M291 messages.Is it possible to iterate through the queue? / get the current queue contents? It looks from the object model that only the "top" (oldest enty) of the queue is exposed together with the sequence number.
My code already grabs the (presumably "top" ) message and if it's meant for use by DuetLapse3, sends a M292 with the sequence number to remove the message. Any other message is left unmolested. This is all done with http.
The potential issue I see is a blocking message (not used for DuetLapse3) could "gum up the works" as it were. Of course this exists with or without queuing.
This was one of those things that evolved over time. Of course, if there is a better way - I'm happy to change the code. Global array?
I'd like any solution to work with both standalone and SBC.
-
-
@stuartofmt I have moved this to the firmware wishlist as AFAIK it's not currently possible.
I think it's a useful concept if there are multiple different consumers of M292 messages.
-
@stuartofmt I wonder if the upcoming MQTT functions can help you here? At minimum they would separate your control msgs from other blocking Msg's etc....
-
Thanks. From an implementation point of view: I think its enough to be able to get the current queue from the object model. The client can then handle the rest.
-
That's a nice idea. I will look into it. I'd like to make any solution independent of internet connectivity. So part of my consideration would be, is it worth trying to implement a basic broker within DuetLapse3 (Python).
I have also looked at
M118 P3
which suggests the ability to send http (would be ideal since I can easily implement the necessary API's). Alas, searching through older threads, it seems that is not possible.I recall there were thread about implementing http or MQTT, so I geuess MQTT got the nod.