6 typedef unsigned short TrainIx;
7 typedef unsigned short SegmentIx;
8 typedef unsigned short Distance;
9 typedef unsigned char Speed; /* non-negative, units of 4mm/s */
13 unsigned justarrived:1, reverse:1;
18 unsigned present_now:1, present_future:1,
19 detectable_now:1, detectable_future:1,
20 sideways:1, autostop:1;
33 SegmentLink backwards, forwards, sideways;
39 const Distance *detections; /* incremental distances from front */
44 TrainState trasNUM_TRAINS];
45 SegmentState segs[NUM_SEGMENTS];