- Fri May 06, 2016 5:36 pm
#47019
Wait is a dead-end trap that is not easy to escape from, but if it had an optional timeout to branch facility (like timer) then you could temporarily escape from a wait to do something, then return to it again after if needs be.
Ok, a problem scenario is for example when you have udp dhcp network nodes...
The problem is that for remote browser msgs to be displayed, the program must 'wait', and if it is waiting in order to display a remote msg such as 'Node nnn.nnn.nnn.nnn is rebooting', it can't actually be carrying out the local instruction.
If you just do the reboot without giving a confirmation msg, you are remotely sat in the dark unsure if the node has even received the remote command or not.
The same sort of problem happens at bootup - the node needs to locally flash out it's dhcp address, but if it does, it is unable to send a remote 'booting up' msg to the browser unless it 'waits', in which case it can't then locally flash the ip address.
UPDATE: In such scenarios, if wait had timed branch escape from the wait trap, eg: wait 1000, [blinkIP] you could send your confirmation msgs to the remote browser with the wait, but then timeout from the wait and branch to [flashIP] to carry out any local task, then goto a wait without an optional timeout declared, if that's what's then needed for catching interrupt responses etc.