Usage Hardware Controller
1st Step
Import and build Controller_SCTx in KIELER.
2nd Step
Run run_manual.sh in code/girlsday
3rd Step
Run RailController in code/girlsday
Options and Commands:
Note: Train 10 has special ICE-handling, so the ICE should always be assigned to this number.
Commandline options (order matters):
RailController [+] [s<fast_speed> [s<slow_speed>]] [<train1_pos> [<train2_pos> [...] | DEFAULT] | DEFAULT]
+ | if present then there will be no startup hardware check which turns on the lamps and |
---|---|
fast_speed | pre-sets the global driving speed for the trains. Default: 70 |
slow_speed | pre-sets the global parking speed for the trains. Default: 59 |
trainX_pos | sets the position of the train X, caseinsensitive, prefixed with '-' for reversed on bidirectional tracks, |
DEFAULT | fillst the remaining positions with the home Positons of each train |
Valid track identifyer are the Track names (IC_ST_2, OC_LN_4), their numbers (9, 38) and for stations the short versions (I1, I2, I3, O1, O2, O3, K1, K2, K3, K4, K5).
If reverse is a possible information then a preceeding '-' signals this. All Track inputs should be case insensitive.
Commands:
There is a handful of debug and settings commands, each has to be submitted with enter, commands with spaces in them need exactly one space between their words.
<train_num> <target> | sets the target of a train |
---|---|
sc | schedule | print requested locks for each train |
c | set destination of each train to their starting position |
reset trains | set destinbation of each train to their home position (coded into the controller) |
toggle bell | toggles the crossings-gate-bell On and Off |
toggle lamp <range> | toggles selected lamps On and Off |
enable lamp <range> | turns selected lamps On |
disable lamp <range> | turns selected löamps Off |
print tick | toggles the output of the current tick number each tick On and Off |
r | toggles randommode |
x | reconnects to the hardware |
t | prints positions of each train |
s | speeds | prints the speeds for each track |
st | " " | (second option is only a space) toggles stop mode, which sets all hardware speeds to 0 |
pt <point_num> | toggles a Point, only works when the point isn't locked |
ts | prints the 4 speeds of each train (2nd and 4th number are the used slow and fast speeds) |
setspeed [t<train_num>] <fast_speed> [slowspeed] | sets the global or train specific speeds |
reach_t <track> | (DEBUG)sends a reached signal from this track |
reach <train_num> | (DEBUG) sends a reached signal for given train |
sim [s|e]<track> | (DEBUG) simulates the contacts on a track. s: only the first contact, e: only the second contact (no space after s or e) |
dest | prints entered destination for each train |
time | prints maximum and average time for different loop parts (stdin, input, tick, output), partition may not be fully accurate |
trains | prints for each track the train ontop |
move [on|off] | toggles or sets moveing mode, which sends some trains to two toggeling destinations, with some time waiting in a station |
move_time <time> | sets waiting time in stations for moveing mode in ms (1000 = 1s) |
clear | sets each destination to 0 (= IC_JCT_0 => Invalid, no Destination) |
deb | currently has no effect, may be used for requested debug output |
block <train_num> | toggles the 'dont_force_destination' input for the train. If enabled, this train would not start moveing to make space for another train |
webprovider debug | toggles webprovider communication debug outputs |
json output | toggles the creation of a '.simin' JSON file for kivis every 2s |
Examples for ranges:
3
3-7
2-9,11,13-9