Process manager
A distributed process panel: starts and stops background processes grouped as Servers/Driver/GUI/Viewer/Monitor.
Overview
quatm/GUI/entries/processmanager.py provides the process manager: it reads the configuration by category (Servers / Driver / GUI / Viewer / Monitor) and generates a SingleProcess start/stop button panel for each script entry, so the whole experiment software suite is managed from one place. Processes are launched with the current interpreter, either as a script or as a module (python -m), carrying the project root and the parent-process watchdog environment.
Process categories
| Category | Description | Typical processes |
|---|---|---|
| Servers | Communication / property / data services | Data centre, property service, etc. |
| Driver | Hardware driver processes | FPGA and other device drivers |
| GUI | Graphical interface processes | Experiment browser, data manager, etc. |
| Viewer | Data viewing processes | Live plotting, scroll window, image viewer, etc. |
| Monitor | Monitoring / checking processes | Property checker, message monitor, etc. |
Components
| Component | Description |
|---|---|
ProcessManager | Category panel: reads the configuration and generates start/stop buttons for each entry |
SingleProcess | Single-entry panel: start / asynchronous termination / status polling with coloring |
resolve_script | Resolves the script entry from the configuration into a launch target (file path or module) |
Key methods (SingleProcess)
| Method | Description |
|---|---|
startProcess | Stops the old instance and then starts the subprocess with the current interpreter |
stopProcess | Terminates the subprocess asynchronously without blocking the GUI thread |
updateStatus | Periodically polls the exit status and colors it (running / exited normally / crashed) |
Usage
from quatm.GUI.entries.processmanager import ProcessManager
pm = ProcessManager(parent=parent)
pm.show()
The entries to manage are defined by the scripts in the configuration file; each entry is started and stopped through its own button panel.