The Train Operating System is a Senior Capstone Experience project written in 2007 by Chris Kratz (to see the project website, check here). Using Windows named pipes, the CCR Simulator is able to receive commands from the Train OS and manipulate the corresponding trains and turnouts.
I have modified the original source code to connect to the CCR Simulator. Here are step-by-step instructions for setting up and running the Train OS:
- 1. Download and unzip the Train OS. (ZIP, 262 KB)
- 2. Compile the following projects using a Visual C++
compiler (if none are available, try the free
Visual C++ 2008 Express).
- DCCManager\DccMan.dsw
- MESSAGING SERVER\test.dsw (see step 3)
- ResourceManager\ResourceMan.dsw
- TrackManager\TrackMan.dsw
- TrianManager\TrainMan.dsw
- UI\TOS User Interface\hellowindow.dsw
- 3. Enable MFC in the Messaging Server project before
compiling it. Instructions for enabling MFC in Visual C++ 6:
- Go to Project->Settings...
- Set the "Settings For" dropdown to "All Configurations"
- Click the "General" tab if it isn't already open.
- Set the Microsoft Foundation Classes setting to "Use MFC in a Shared DLL".
- 4. Run all six programs simultaneously.
- 1. Start the CCR Simulator.
- 2. Load a track and start a simulation.
- 3. Click Communications->Create named pipe.
- 4. Click Communications->Wait for connections.
- 5. In the Train OS, click System Tests->"DCCMan - Init DCC".
- 6. Click System Tests->"DCCMan - Test #48" or System Tests->"DCCMan - DCC CAB" to change a train's speed and direction.
- 7. Click System Tests->"DCCMan - Set Turnout" to change simulator turnouts.