Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Field nameContent typeValue rangeNumber of valuesDescription
TrackSpeedsint0-25548

The speed each track is set at.

TrackContactsbooleanfalse-true96Whether or not a contact is triggered. Contacts on the same track are consecutive, for instance the contacts on track 0 are represented by indexes 0 and 1 in this array.
TrackPointsboolean

false-true

(Branch=true,Straight=false)

30Whether a given directional switch is set to straight or branch.
TrainPositionsint0-4711

The track each train is currently on.

Bellbooleanfalse-true1Whether the bell is ringing or not.
Gate0booleanfalse-true1Whether gate 0 is raised or not.
Gate1booleanfalse-true1Whether gate 1 is raised or not.


Controller Input

The controller accepts the following input format read from a JSON file. The JSON file is called input.json and is found in $XDG_CONFIG_HOME/railway if XDG_CONFIG_HOME is set or from $HOME/.config/railway if it isn't.

Field nameContent typeValue rangeNumber of valuesDescription
Actionint0-MAXINT10, 0-47,0-47,0-142Contains the description of a new train action in the format: [ id, start, destination , reverse flag ]