3 /* The output from the layout processing system to the control
4 * software, describing the layout and the trains, is a data structure
5 * as described in this header file, in <name-of-layout>.layout-data.o
6 * (where <name-of-layout> is currently `ours').
8 * Alternatively, <name-of-layout>.redacted.forsafety contains data in
9 * the form described at the top of redactgraph.c.
15 /*========== basic types etc. ==========*/
17 typedef unsigned short TrainNum;
18 typedef unsigned short SegmentNum;
19 typedef unsigned short MovPosComb;
20 typedef unsigned short BoardObject;
22 typedef unsigned char Small;
24 typedef short Distance;
26 /* for units, see safety.h */
33 /*========== data from config files and layout cad/cam ==========*/
36 unsigned next_backwards:1;
45 const BoardObject *boob;
51 SegmentLinkInfo backwards, forwards;
56 unsigned invertible:1;
58 const MovFeatInfo *movfeats;
59 MovPosComb n_poscombs;
60 const SegPosCombInfo *poscombs;
61 BoardObject sense, invert;
66 Distance tail, detectable, head;
70 /* These data arrays have no sentinel members. Use the info_nfoobars
71 * constants. Alternatively, it is legal to sed out everything from
72 * <name-of-layout>.layout-data.c from the first #include onwards, and
73 * this will give definitions of NUM_SEGMENTS and NUM_TRAINS.
76 extern const SegmentNum info_nsegments;
77 extern const SegmentInfo info_segments[];
79 extern const TrainNum info_nsegments;
80 extern const TrainInfo info_trains[];
82 extern const BoardObject info_nreverses; /* max. reverse + 1 */
84 #define NOTA(x) (~(x##Num)0)
86 #endif /*LAYOUT_DATA_H*/