How tsntools/opencnc works
OpenCNC is a TSN network-control system: operators define device models, topology and streams; services then configure devices, discover topology and monitor resources. The tree shows distinct configuration, monitoring, topology-discovery and TSN allocation/notification domains, alongside a GUI and shared state/management code. The README is empty, and excerpts are partial; several service-to-service relationships are therefore represented only as unverified dashed links or omitted. The GUI's stream API is shown, but its server-side destination is not established by the available evidence.
Main entry points: App.tsx OpenCNC GUI · engine.go Monitoring engine · handler.go Event handling · streamsScreen.tsx Stream editor
Components 28
Operator interface
- OpenCNC GUI
gui_service/frontend/src/App.tsx - Operator screens
gui_service/frontend/src/screens.tsx - Stream editor
gui_service/frontend/src/streamsScreen.tsx - GUI API client
gui_service/frontend/src/api.ts - UI components
gui_service/frontend/src/components.tsx - UI sample data
gui_service/frontend/src/data.ts - GUI application service
gui_service/internal/app/service.go - GUI HTTP transport
gui_service/internal/transport/http/handler.go
Device configuration
- Configuration API
config_service/grpc_server/service.go - Configuration transactions
config_service/pkg/engine/engine.go - Device protocol backend
config_service/pkg/protocolbackends/netconf/netconf_backend.go - Device model plugins
config_service/pkg/plugins/netconf/vlan_2021.go
Topology and state
- Management interface
main_service/pkg/nni/server.go - Shared configuration store
common/store-wrapper/topology_store.go - Topology discovery
topology_service/pkg/discovery/dicovery.go - Topology service
topology_service/pkg/server/server.go - Observability client
common/observability/client.go
Monitoring
- Monitoring engine
monitor_service/pkg/engine/engine.go - Resource monitor
monitor_service/pkg/monitors/resourcemonitor.go - Device collectors
monitor_service/pkg/collectors/netconf_collector.go - Monitoring API
monitor_service/structures/grpc_server/service.go
TSN orchestration
- Event handling
main_service/pkg/event-handler/handler.go - UNI endpoints
main_service/pkg/uni/grpc_server.go - Stream admission
tsn_service/pkg/admission_control/admissionCheck.go - Resource allocation
tsn_service/pkg/resource_allocation_entity/rae.go - Path optimization
tsn_service/pkg/internalOptimizer/internalOptimizer.go - TSN notifications
tsn_service/pkg/notificationHandler/notificationHandler.go
Other components
- Network operator
Connections 26
- Network operator → OpenCNC GUI: uses
- OpenCNC GUI → Operator screens: selects screens
gui_service/frontend/src/App.tsx - OpenCNC GUI → UI components: renders
gui_service/frontend/src/App.tsx - OpenCNC GUI → UI sample data: loads navigation
gui_service/frontend/src/App.tsx - OpenCNC GUI → Stream editor: renders streams
gui_service/frontend/src/App.tsx - Stream editor → GUI API client: loads and mutates
gui_service/frontend/src/streamsScreen.tsx - Stream editor → UI components: renders
gui_service/frontend/src/streamsScreen.tsx - Operator screens → UI components: renders
gui_service/frontend/src/screens.tsx - OpenCNC GUI → GUI HTTP transport: calls API
- GUI HTTP transport → GUI application service: delegates
- Management interface → Shared configuration store: stores topology
main_service/pkg/nni/server.go - Topology discovery → Topology service: reports discovery
- Configuration API → Configuration transactions: dispatches config
- Configuration transactions → Device protocol backend: creates backend
config_service/pkg/engine/engine.go - Device protocol backend → Device model plugins: uses mappings
- Configuration transactions → Shared configuration store: persists config
- UNI endpoints → Event handling: dispatches requests
- Event handling → Stream admission: requests admission
- Stream admission → Path optimization: checks path
- Stream admission → Resource allocation: allocates resources
- TSN notifications → Event handling: reports events
- Monitoring engine → Resource monitor: creates monitor
monitor_service/pkg/engine/engine.go - Resource monitor → Device collectors: adds collectors
- Monitoring API → Monitoring engine: dispatches monitoring
- Monitoring engine → Observability client: records events
monitor_service/pkg/engine/engine.go - Monitoring engine → Event handling: requests reconfiguration