caproto.ioc_examples.io_interrupt.start_io_interrupt_monitor¶

caproto.ioc_examples.io_interrupt.start_io_interrupt_monitor(new_value_callback)[source]

This function monitors the terminal it was run in for keystrokes. On each keystroke, it calls new_value_callback with the given keystroke.

This is used to simulate the concept of an I/O Interrupt-style signal from the EPICS world. Those signals depend on hardware to tell EPICS when new values are available to be read by way of interrupts - whereas we use callbacks here.