RBC_Test_Sim_Train 0.1.0 build a98ee69
ADR-029 Train (EVC) simulator — dual-homed TCP client speaking the RBC wire protocol
Loading...
Searching...
No Matches
RBC_Test_Sim_Train

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.

What's here

Building

python -m build --outdir dist

Depends on simcore (pyproject.toml's dependencies), resolved from RBC_Test_Sim_Core/dist/ or Conan — see RBC_Test_Sim_Core's README.

Running

pip install --find-links ../RBC_Test_Sim_Core/dist --find-links dist trainrbcsim
train-sim # reads config from SIM_CONFIG_PATH, default /app/config.json

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.

Interfaces exposed to other products

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