(Originally I said gate, but to be more generic I changed it to ON/OFF.)
To get things to work we need an ON/OFF control of things at some level.
At the GUI level this done with buttons or if you want to get fancy the template node and some CSS code.
At the CODE level the gate node is really handy as it provides a stop/go control for message passing.
Which is nice and usually works.
Then things get complicated
For the sake of keeping things as close to the truth:
Voice messages/alerts.
I have notifications for certain things and there is an option to turn them off if desired.
PROBLEM
If a machine reboots (alas it has recently happened) it can flood the message queue and it gets annoying.
So I added a flood detection bit of code and if it detects this happening, it stops all messages.
Good: It stops the messages.
Bad: It didn't tell me. (That caused a few minutes of chasing what was going on.)
IDEA
Use the existing bit of code to do both.
That can work, but there is now a whole new GUI side of things to address.
(There is a bit of hidden stuff between the button and gate to simplify what the button shows. It looks at what the button is sending and returns text/colour/etc to it to indicate the condition of the gate)
All that is now void as it doesn't understand the difference between a MANUAL intervention and a SYSTEM INITIATED one.
And: which one has priority?
Could someone help me get my head around the workings of how this would work?
The layers/structure of it.
I sort of understand it but I am sure there are a lot of things I am not seeing/understanding yet.
Thanks in advance.
