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. ==========*/
18 typedef int SegmentNum;
19 typedef int MovPosComb;
20 typedef int BoardObject;
22 typedef short SegmentNumInMap;
31 /* must also add new entries to movpos.c:methods[] and topology-dump.c */
32 /* only entries up to here are used by movpos.c, since only
33 * the n_fixedmovfeats entries use mfk_ifxed. */
37 /*========== data from config files and layout cad/cam ==========*/
40 unsigned next_backwards:1;
47 Small posns; /* for mfk_fixed: is the actual position */
48 MovPosComb weight; /* for mfk_fixed: is 0 */
49 const BoardObject *boob; /* for mfk_fixed: is 0 */
55 SegmentLinkInfo link[2]; /* 0: forwards; 1: backwards */
60 unsigned invertible:1, interferes_polarity_opposed:1;
61 Small n_movfeats, n_fixedmovfeats;
62 const MovFeatInfo *movfeats; /* first n_movfeats then n_fixedmovfeats */
63 MovPosComb n_poscombs;
64 const SegPosCombInfo *poscombs;
65 BoardObject sense, invert;
66 SegmentNum interferes;
67 unsigned char interferes_movposcomb_map;
70 /* This data array has no sentinel member. Use the info_nsegments
71 * constant. 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 a definition of NUM_SEGMENTS.
76 extern const SegmentNum info_nsegments;
77 extern const SegmentInfo info_segments[];
78 extern const SegmentNumInMap info_segmentmap[];
79 extern const int info_segmentmaplen;
81 extern const BoardObject info_maxreverse; /* max. reverse + 1 */
83 #define NOTA(thing) (-1)
84 #define SOMEP(x) ((x) >= 0)
86 #endif /*LAYOUT_DATA_H*/