-
Notifications
You must be signed in to change notification settings - Fork 0
Communication Protocols
Marc Sanchis edited this page Jun 8, 2025
·
1 revision
This section provides comprehensive documentation for all communication protocols used in the Hyperloop Control Station system.
The Control Station uses a three-layer communication architecture designed for real-time pod monitoring and control:
┌─────────────┐ Binary Protocol ┌─────────────┐ WebSocket API ┌─────────────┐
│ Vehicle │ ◄─────────────────────► │ Backend │ ◄─────────────────► │ Frontend │
│ Systems │ TCP/UDP + TFTP │ Server │ JSON/WS │ Applications │
└─────────────┘ └─────────────┘ └─────────────┘
- Transport: TCP (reliable), UDP (fast), TFTP (files)
- Encoding: Binary packets with little-endian byte order
- ADJ-Defined: Message structures defined by JSON specifications
- Real-Time: Sub-10ms latency for critical safety messages
- Transport: WebSocket over HTTP
- Encoding: JSON with topic-based routing
- Bidirectional: Real-time updates and command sending
- Type-Safe: Structured schemas for all message types
- Message Broker: Topic-based routing system
- Component Integration: Vehicle management, data logging, WebSocket clients
- Concurrent Processing: Go routines for real-time performance
Purpose: Continuous sensor telemetry from vehicle boards
- Frequency: 10-100 Hz per measurement
- Content: Pressure, temperature, position, status values
- Safety: Real-time validation against safe ranges
Purpose: Safety alerts and fault notifications
- Types: Fault (critical), Warning (attention), OK (recovery)
- Response: Immediate propagation to operators
- Logging: Persistent storage for analysis
Purpose: Commands sent from operators to vehicle
- Types: State changes, parameter updates, emergency stops
- Validation: Parameter checking before transmission
- Acknowledgment: Vehicle confirmation required
Purpose: Firmware updates and configuration management
- Protocol: TFTP for reliable file transfers
- Types: Firmware binaries, configuration files, logs
- Security: Checksum validation and access control
- TCP Client: 50401 (Backend → Vehicle)
- TCP Server: 50500 (Vehicle → Backend)
- UDP Data: 8000 (Bidirectional)
- TFTP Files: 69 (Bidirectional)
- WebSocket API: 8080 (Frontend → Backend)
- Backend: 127.0.0.9 (configurable)
-
Vehicle Boards: Per-board IPs in ADJ configuration
- VCU: 127.0.0.6 (Vehicle Control Unit)
- BCU: 127.0.0.7 (Brake Control Unit)
- LCU: 127.0.0.8 (Levitation Control Unit)
- Network Failures: Automatic reconnection with backoff
- Protocol Errors: Graceful degradation and logging
- Data Validation: Range checking and type verification
- Redundant Connections: Multiple transport protocols
- Message Queuing: Buffering during disconnections
- State Recovery: Automatic resynchronization
- Priority Queuing: Critical messages processed first
- Deterministic Latency: Bounded response times
- Watchdog Timers: Connection health monitoring
- Data Rate: 1000+ measurements/second
- Concurrent Clients: 10+ frontend connections
- Packet Processing: 500+ packets/second per board
- Vehicle → Frontend: < 20ms typical
- Command Response: < 50ms typical
- Protection Alerts: < 5ms critical path
- Packet Sender: Simulation tool for development
- Network Monitoring: Real-time traffic analysis
- Load Testing: Performance validation under stress
- Schema Validation: Automated checking of message formats
- Version Control: Tracked changes to protocol specifications
- Backward Compatibility: Migration support for legacy systems
For complete technical details, see the individual protocol specifications:
- Binary Protocol Specification - Vehicle ↔ Backend wire protocol
- WebSocket API Specification - Backend ↔ Frontend communication
- Message Structure Reference - Complete data format documentation
- ADJ Configuration Format - Board and measurement definitions
This documentation is maintained alongside the codebase. For the latest specifications, refer to the docs/architecture/
directory in the software repository.