Command clients do not recognize that the instrument has terminated unless they actually send the command. Any time quit is handled by an algorithm, the display programs terminate, but the client remains. This makes any automation on the client side impossible, such as restarting the client side after a daily restart of the instrument. It's also ugly.
The challenge is that the interactive client code is not designed to work within the Monarch event loop, but it could be. The nct* functions actually implement an event loop that is similar. I think we could replace the nct* event loop with a Monarch Loop that runs from within nct_getch() that is called from within cmd_exec() in interactive mode.
Command clients do not recognize that the instrument has terminated unless they actually send the command. Any time quit is handled by an algorithm, the display programs terminate, but the client remains. This makes any automation on the client side impossible, such as restarting the client side after a daily restart of the instrument. It's also ugly.
The challenge is that the interactive client code is not designed to work within the Monarch event loop, but it could be. The nct* functions actually implement an event loop that is similar. I think we could replace the nct* event loop with a Monarch Loop that runs from within nct_getch() that is called from within cmd_exec() in interactive mode.