Distributed Carriage Control System (CCP)
The BladeRunner Project is a high-fidelity simulation of an industrial transportation system. It orchestrates real-time communication between a centralMCP (Master Control Processor) and distributedCCP (Carriage Control Processor) nodes.
By leveraging UDP multicasting and ESP32 hardware integration, the system achieves precise, low-latency synchronization of physical carriage movements, door actuation, and hazard detection.
Interactive interface for the CCP Java Client. Initialize the UDP Uplink below to observe real-time state transitions and packet handling.
The system implements a distributed control pattern, delegating specific responsibilities to three primary nodes for optimal latency and fail-safety.
Stateless UDP communication payload structure.
{
"client_type": "ccp",
"message": "STRQ", // Status Request
"client_id": "BR12", // Unit Identifier
"timestamp": "2026-01-24T14:30:00"
}Strict transitions in CCP.java prevent hardware hazards (e.g., locking motors while doors are open).
if (stateManager.getCurrentState() != CCPState.STOPPED) {
// Force transition before door actuation
stateManager.updateState(CCPState.STOPPED);
updateLEDState();
}Utilizes ScheduledExecutorService for non-blocking heartbeats, ensuring the main thread remains responsive to UDP packets.
heartbeatExecutor.scheduleAtFixedRate(() -> {
try {
sendHeartbeat(); // UDP Packet Dispatch
} catch (Exception e) {
logError(e);
}
}, 0, 2, TimeUnit.SECONDS);Primary carriage control unit & networking node.
Required for track alignment & checkpoint detection.
Door actuation and main drive train.
Retrieve the latest source code from the central VCS.
Navigate to the Carriage Control Program sector.
Configure the Java Runtime Environment and dependencies.