nthallen / monarch

Monarch Data Acquisition System
0 stars 1 forks source link

Need to document BLOCK_KB #146

Open nthallen opened 3 years ago

nthallen commented 3 years ago

This was implemented first for TCCON under QNX.

I think that the gist is: if a command definition includes %BLOCK_KB and the keyboard client is compiled with -DBLOCK_KB_CMDS, the command will not be forwarded to the command server. This does not impact other command writers such as tma algorithms. The main idea is to restrict certain commands to be issued only by algorithms, not interactively, presumably because they should be wrapped in various safety checks.

root.cmd defines the Quit command as:

: &commands Quit * %BLOCK_KB {

On a mature instrument, blocking the Quit command from the keyboard may be desirable so the algorithm can ensure the instrument is returned to a known safe state.

A mechanism like this may be useful for handling uplink commands.