Railway Interface
To interface with the railway or the simulator a wrapper interface around the so called Hoerman-API is used. It can be found in the repository at
/code/hostcode/controller.c and /code/hostcode/controller.h.
The interface provides shorter and simpler access to most of the railway components. To prevent conflicts with existing function names all functions in our interface are prefixed with rail.
Additionally, the interface handles the repeated reading of the reed contacts and persists these values for one tick to prevent side effects.
The interface also provides waiting timers for the stations and generates a random timing for each train and each station. The preferences for this can be found in /code/hostcode/train_preferences.h
Interaction
Quit, Pause and Cleanup
While running the following user inputs are provided by the controller:
...
Building / Make Script
The build process for the controller consists of two main tasks:
Compilation from SCChart to C-Code
The SCCharts for the Controller are compiled by KIELER. This can either be done in the usual GUI Version or with the KIELER Command Line Compiler.
...
The generated C-Files should be stored in the /code/ part of the local working copy but not commited to the repository.
Compilation from C-Code to executable
To generate the final executable a python script is provided. This can be found at /code/make.py. The script takes care of including the required modules and adds the needed headers to the controller.
...