LAGERBOX HOST (x86-64, Ubuntu 22.04+)
+-----------------------------------------------------------------------+
| |
| /etc/lager/ ~/third_party/ |
| saved_nets.json JLink_Linux_*/ (optional) |
| available_instruments.json customer-binaries/ (optional) |
| box_id |
| |
| Docker Container "lager" (--restart always) |
| +-------------------------------------------------------------------+ |
| | | |
| | Port 9000 -- Flask + SocketIO -- Main Box API | |
| | | (UART, supply, battery, instruments, | |
| | | nets, lock) | |
| | v | |
| | Port 5000 -- HTTP Server -- Python Execution Service | |
| | | | |
| | | receives impl script + LAGER_COMMAND_DATA | |
| | | env var (JSON), executes it, streams results | |
| | v | |
| | Port 8765 -- WebSocket Server -- Debug Service (GDB, OpenOCD) | |
| | | |
| | Port 8100 -- HTTP Server -- MCP Service (AI tool integration) | |
| | | |
| | Port 8080 -- Hardware Service (internal only, not exposed) | |
| | | | |
| | v | |
| | +------------------+ | |
| | | NetsCache | Thread-safe singleton | |
| | | (cache.py) | mtime-based invalidation | |
| | +--------+---------+ O(1) lookup by net name | |
| | | | |
| | v | |
| | +------------------+ | |
| | | Dispatchers | BaseDispatcher subclasses | |
| | | (per domain) | driver caching, net resolution | |
| | +--------+---------+ | |
| | | | |
| | v | |
| | +------------------+ | |
| | | Drivers | VISA/SCPI, pySerial, LJM, | |
| | | (per instrument)| pyOCD, aardvark_py, etc. | |
| | +--------+---------+ | |
| | | | |
| +--------------------+----------------------------------------------+ |
| | |
| USB / Serial / VISA / LAN |
+----------------------+------------------------------------------------+
|
v
INSTRUMENTS