The controller executable outputs JSON data whenever certain internal values are updated. The JSON output contains one or more of the following fields.

Field name

Content type

Value range

Number of values

Description

TrackSpeeds

int

0-255

48

The speed each track is set at.

TrackContacts

boolean

false-true

96

Whether 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.

TrackPoints

boolean

false-true

(Branch=true,Straight=false)

30

Whether a given directional switch is set to straight or branch.

TrainPositions

int

0-47

11

The track each train is currently on.

Bell

boolean

false-true

1

Whether the bell is ringing or not.

Gate0

boolean

false-true

1

Whether gate 0 is raised or not.

Gate1

boolean

false-true

1

Whether gate 1 is raised or not.

Tags: