How durham-adaptive-optics/daobase works
daoBase is a real-time adaptive-optics control foundation, not the higher-level control application: it provides shared-memory image exchange, process coordination/messaging, and language bindings. A typical workflow creates or opens a shared image, writes frames and signals updates, and lets another process read them; the separate registry daemon can discover local segments and serve remote streams on demand. The README and tree establish the component/state-machine and messaging capabilities, but sampled excerpts do not expose all of their internal call paths, so uncertain wiring is omitted.
Main entry points: dao.c C SHM API · daoServer.py SHM registry daemon · daoShm.py Python SHM · lib.rs Rust SHM
Components 23
Shared memory
- C SHM API
src/c/dao.c - IMAGE layout
include/dao.h - Shared image segments
- Frame semaphores
src/c/dao.c
Language interfaces
- Python SHM
src/python/daoShm.py - Rust SHM
src/rust/src/lib.rs - MATLAB SHM
src/matlab/daomex.c - C++ SHM interface
include/daoShmIfce.hpp
Process runtime
- Components
include/daoComponent.hpp - State machines
src/python/daoComponentStateMachine.py - Component threads
include/daoComponentUpdateThread.hpp - ZMQ component thread
include/daoComponentZmqThread.hpp - Command schema
proto/daoCommand.proto - Event schema
proto/daoEvent.proto - Logging schema
proto/daoLogging.proto - Python events
src/python/daoEvent.py - Python proxy
src/python/daoProxy.py - Python logging
src/python/daoLog.py
Distributed access
- SHM registry daemon
apps/daoServer.py - Redis registry
- File server schema
proto/daoFileServer.proto
Other components
- RTC processes
- Remote clients
Connections 26
- RTC processes → Python SHM: uses SHM
- RTC processes → Rust SHM: uses SHM
- RTC processes → MATLAB SHM: uses SHM
- RTC processes → C++ SHM interface: uses SHM
- Python SHM → C SHM API: calls
- Rust SHM → C SHM API: calls FFI
- MATLAB SHM → C SHM API: calls
- C++ SHM interface → C SHM API: calls
- C SHM API → IMAGE layout: uses layout
- C SHM API → Shared image segments: creates / opens
- C SHM API → Frame semaphores: waits / posts
- Python SHM → Shared image segments: reads / writes
- Rust SHM → Shared image segments: reads / writes
- MATLAB SHM → Shared image segments: reads / writes
- C++ SHM interface → Shared image segments: maps / accesses
- Components → State machines: uses framework
- Components → Component threads: runs threads
- ZMQ component thread → Command schema: uses schema
- Python events → Event schema: uses schema
- Python logging → Logging schema: uses schema
- Python proxy → ZMQ component thread: communicates
- SHM registry daemon → Shared image segments: discovers segments
- SHM registry daemon → Redis registry: registers / queries
- Remote clients → SHM registry daemon: requests stream
- SHM registry daemon → Remote clients: publishes frames
- SHM registry daemon → File server schema: supports file API