nthallen / monarch

Monarch Data Acquisition System
0 stars 1 forks source link

Command client does not terminate unless quit is issued manually #211

Open nthallen opened 4 months ago

nthallen commented 4 months ago

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.