|
RBC_Test_Sim_Train 0.1.0 build a98ee69
ADR-029 Train (EVC) simulator — dual-homed TCP client speaking the RBC wire protocol
|
Product: RBC_Test_Sim_Train, Train (EVC) simulator (repository RBC_Test_Sim_Train, package trainrbcsim). Layer: verification, Python, not safety-rated. Stands in for an external system; it is not RBC code.
The Train (EVC) simulator of the ADR-029 sim trio — a real, dual-homed TCP client speaking the RBC's own rbc_envelope_t wire protocol against both WEST and EAST sites at once, built on RBC_Test_Sim_Core's shared transport plumbing. Originates position reports (M136), acknowledges Movement Authority grants (M146), receives M24/M15/M3. One instance per train slot.
Driven by RBC_Test_Env/robot/ over RBC_Test_Sim_Core's control port, not a fixed wall-clock schedule.
Depends on simcore (pyproject.toml's dependencies), resolved from RBC_Test_Sim_Core/dist/ or Conan — see RBC_Test_Sim_Core's README.
Dockerfile (context: the workspace root, since it needs the sibling RBC_Test_Sim_Core/) builds a multi-stage image: stage 1 builds both the RBC_Test_Sim_Core and this project's own wheel, stage 2 installs both into the runtime image. Normally run as part of the full stack via RBC_Test_Env/docker-compose.yml.
| Interface | Form | Used by |
|---|---|---|
| Control port | TCP command table: REPORT, PING, sendMessage, getMessage, connectTrain | RBC_Test_Env Robot keywords |
| connectTrain | Optional nidLrbg and dLrbg override the starting balise and position; applied before the first M136, setting both the reported position and d_lrbg | Test scenarios that need a train to start somewhere specific |
| Console script | train-sim (train.train_sim:main), config from SIM_CONFIG_PATH | Docker image, local environment |
| Wire | RBC wire protocol through RBC_Test_CommServer or directly to both sites | RBC_GP role C train gateway |