You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.4 KiB
1.4 KiB
Architecture (clean layering)
Layers
- Domain (
src/adn_server/domain/) — entities, value objects, errors,Result. No I/O, no Twisted. - Application (
src/adn_server/application/) — use cases (BridgeUseCases,VoiceUseCases, …) and ports (interfaces). - Infrastructure (
src/adn_server/infrastructure/) — YAML config, Twisted UDP/TCP, voice, persistence, security adapters.
Dependency rule: infrastructure → application → domain (inward only).
Entrypoint
main.py wires configuration, LoopingCall timers, factories for HBPProtocol, report client, and injects use cases.
Where to read code
| Topic | Location |
|---|---|
Bridge routing, dmrd_received, OpenBridge loop |
application/bridge_use_cases.py |
| HBP / OpenBridge UDP | infrastructure/twisted_adapters/udp_hbp.py |
| Report TCP | infrastructure/twisted_adapters/report_server.py (factory), bridge events from use cases |
| Voice / TTS | application/voice_use_cases.py, infrastructure/voice/ |
| Hotspot proxy (fan-in) | infrastructure/proxy/ (udp_fanin.py, runtime.py), application/proxy/ use cases |
| Self-service (MySQL) | infrastructure/proxy/self_service_bridge.py, infrastructure/proxy/persistence/ |
Configuration as shared state
A mutable config dict is passed through adapters; runtime updates (options, SUB_MAP, OpenBridge _bcsq) remain visible globally for the lifetime of the process.