Szerkesztő:B.Zsolt/Test2020
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <link rel="stylesheet" type="text/css" href="bahn.css"> <title>JB BAHN Railway Simulation, Layout File Data Format Specification</title> <meta name="author" content="Jan Bochmann, Dresden, DE">
</head> <body>
Railway Simulation BAHN
Specification of Layout Files
Last recent changes: 2014-Dec-07
Valid for versions:
- 3.88r1 (05/2014), 3.88r2 (12/2014)
(Info about previous versions 3.86..3.87 is not available, for 3.84 and 3.85 see original text files nt3_384d/e.txt and nt3_385e.txt)
There is no warranty for the contents of this file. Changes are reserved.
This file may be of interest for programmers who like to write
software that can read, write or alter BAHN layout files.
It may be understandable for someone who has some experience
as a programmer and who is familiar with BAHN.
Contents:
- <a href="#changes">Changes</a>
- <a href="#remarks">General Remarks</a>
- <a href="#filenames">Filenames and Extensions</a>
- <a href="#datatypes">Data Types</a>
- <a href="#structures">Multiple Used Data Structures</a>
- <a href="#fversion">File Format (version)</a>
- <a href="#k3">Coordinates</a>
- <a href="#richtg">Directions</a>
- <a href="#textmz">(Multi-lined) Texts</a>
- <a href="#textinfo">Info Text</a>
- <a href="#zeit">Time</a>
- <a href="#namen">Names</a>
- <a href="#dpgl">Depot References</a>
- <a href="#dlist">Depot Lists</a>
- <a href="#llist">Route Lists</a>
- <a href="#tlist">Time Lists</a>
- <a href="#schfkt">Switching function</a>
- <a href="#schlist">Switching list</a>
- <a href="#farben">Colors</a>
- <a href="#header">File Header</a>
- <a href="#allg">General Data</a>
- <a href="#lin">Route Codes</a>
- <a href="#fziel">Destinations</a>
- <a href="#netz">Layout Data (Lines, Elements)</a>
- <a href="#netzelem">Coding of elements</a>
- <a href="#netzq">Storing of elements</a>
- <a href="#zuege">Train Data</a>
- <a href="#zugkallg">Train head, General</a>
- <a href="#zugkv">Train head, Speed</a>
- <a href="#zugkea">Train head, On/off service</a>
- <a href="#zugt">Train, elements</a>
- <a href="#zugf">Train, vehicles</a>
- <a href="#res">Reservation of lines (Locking)</a>
- <a href="#wei">Turnouts (Points/Switches)</a>
- <a href="#weiallg">General Data</a>
- <a href="#weivz">Junction/Branching</a>
- <a href="#weiwx">Alternating Turnout</a>
- <a href="#weizf">Random Turnout</a>
- <a href="#weizt">Train Type Turnout</a>
- <a href="#weisa">Signal-dependent Turnout</a>
- <a href="#weifs">Itinerary Turnout</a>
- <a href="#krzfs">Itinerary Crossings</a>
- <a href="#rangp">Shunting Points (Turning Points)</a>
- <a href="#depot">Depots</a>
- <a href="#depotallg">General Data</a>
- <a href="#depotgl">Single Tracks</a>
- <a href="#taktp">Timing points</a>
- <a href="#taktpallg">General Data</a>
- <a href="#taktprzeit">Reset Times</a>
- <a href="#taktpausf">Failed Departures</a>
- <a href="#taktpgl">Single Tracks</a>
- <a href="#taktpll">Route List</a>
- <a href="#taktpzl">Time List (Departure Times)</a>
- <a href="#dwx">Data Change Points (Route Change Points)</a>
- <a href="#sig">Signal Systems and Elements</a>
- <a href="#sigsys">Signal Systems</a>
- <a href="#fstr">Itineraries</a>
- <a href="#sigel">Signal System Elements</a>
- <a href="#fstranm">Requests for Itineraries</a>
- <a href="#textfmt">Text Formats</a>
- <a href="#text">Text Data</a>
- <a href="#hst">Stopping points / Stops / Stations</a>
- <a href="#lafa">Speed restrictions</a>
- <a href="#fzgsatz">Vehicle Sets</a>
- <a href="#hgrbmp">Background Bitmap</a>
- <a href="#logp">Log Points (Protocolling)</a>
- <a href="#prellb">Bumpers / Line terminators</a>
- <a href="#infotext">Local Information texts</a>
- <a href="#soundp">Sound Points</a>
- <a href="#anhang">Attached Additional Files</a>
- <a href="#elemweg">Numbering/Coding of driving way elements</a>
<a name="changes"></a>Changes
Changes in BAHN 3.88r2
- <a href="#fversion">file format</a> FV_3882
- max. count of <a href="#hst">stopping points</a> 200,000 per layout
- <a href="#lin">route codes</a>: display route and colors added
- <a href="#llist">route list</a>:
- <a href="#llist_znr">assignment of train number</a> relative ±99,900
- <a href="#llist_lin2">assignment of route code</a>: same route is allowed
- new condition <a href="#llist_b_sfkt">signal switching function</a> (for some elements)
- <a href="#taktp">timing point</a>: some parameters omitted
- <a href="#wei">turnout</a>: directions as RICHTUNG_xx instead of RICHTUNGBIT_xx
- <a href="#weifs">itinerary turnout</a>: list of itineraries as _FL
- <a href="#krzfs">itinerary crossing</a>: new structure, similar to itinerary turnout
- turnouts + itinerary crossings: maximum count 524,287 (0x7FFFF) all together
- <a href="#sigel">signal elements</a>: new multiple pairs of route lists and switching lists allow itinerary request contacts
<a name="remarks"></a>General Remarks
Since BAHN 3.88, the layout files are text files in XML style, always coded in UTF-8.
There is one exception: If other files are attached to a layout file, then these are copied binary "as is".
Many XML tags are empty i.e. they have only parameters (attributes) but no content.
The order of tags is important but the order of the attributes of a single tag is don't care.
Many parameters are optionally and get assigned a default value when missing.
On loading data, not all data are completely checked for correct values
(this would be very slow and in some case impossible).
In result, wrong data can cause program aborts or other bad results.
For some data, BAHN tries to ignore wrong values and to exchange them by standard values.
That makes it possible to continue without error in many situations.
There are many data that stand at different places in the file but
belong together (referring each other).
In result these must be changed together.
Examples: Erasing a turnout from the layout data has to delete
this turnout from the turnout data, too.
Adding a stopping point element to the layout data needs to add a station data set in the stations data
section too.
<a name="filenames"></a>Filenames and Extensions
Filename / Extension | Contents |
---|---|
*.nt3 | BAHN layout file |
*.nnn.nt2 |
Security copy of a layout file, where nnn is a decimal number |
<a name="datatypes"></a>Data types and symbols, used in this documentation
All numerical values are integers if not stated otherwise (speeds, accelerations).
Normally stored as decimal numbers but sometimes hexadecimal (should be stated).
When real numbers occur then the decimal point is used as separator.
Symbol | Meaning |
---|---|
BYTE | 8 bit unsigned |
WORD16 | 16 bit unsigned |
INT16 | 16 bit signed |
WORD32 | 32 bit unsigned |
INT32 | 32 bit signed |
CHAR16 | 16 bit signed character coded in Unicode UTF-16 Remark: The files are UTF-8 coded but internally BAHN uses UTF-16, i.e. codes that cannot be stored as UTF-16 (but UTF-32 only) are not supported. |
KOORD3 | coordinate triple, see <a href="#k3">coordinates</a> |
DPGL | depot track reference, see <a href="#dpgl">depot reference</a> |
ZEIT2, ZEIT4, ZEITD | time data, see <a href="#zeit">time data</a> |
RGBX3 | color data, see <a href="#farben">color data</a> |
[] | array of variable length (with an extra given terminator sign or an extra given length measure) |
[n] | array of constant length (normally without end sign), n = Number (count) of elements |
0x.. | hexadecimal number (e.g. 0xFF = 255) |
| | bitwise OR (non-exclusive) |
& | bitwise AND |
>>n | shift-right by n bit, left filled with 0 |
<<n | shift-left by n bit, right filled with 0 |
bpp | bit per Pixel (color depth) |
a == b | a is equal b |
a != b | a is not equal b |
UNICODE_NULL | = 0x0000 |
UNICODE_TAB | = 0x0009 |
UNICODE_CR | = 0x000d |
UNICODE_LF | = 0x000a |
UNICODE_SPACE | = 0x0020 |
UNICODE_HILO | = 0xFeFf |
UNICODE_LOHI | = 0xFfFe |
<a name="structures"></a>Multiple Used Data Structures
<a name="fversion"></a>File Format (version)
The file format or version info serves to distinguish files created by different BAHN versions.
The format info is found in the <a href="#header">file header</a> and should be a value of the table below.
Name | Value | created by BAHN Version | Remarks |
---|---|---|---|
FV_3877 | 0x3877 | 3.88Beta4 | compatible with FV_3880, used by all 3.88Beta up to 3.88r1 |
FV_3880 | 0x3880 | 3.88r1 | also 3.88r1a,r1b, can be opened by 4.00b3 |
FV_3881 | 0x3881 | 3.88r1c,r1d | temporary, not published, incompatible with 4.00b3 |
FV_3882 | 0x3882 | 3.88r2 | incompatible with 4.00b3 |
FV_3953 | 0x3953 | 4.00Beta3 | incompatible with 3.8x |
Normally, they are upwards compatible, i.e. a newer version can open files of older formats,
but mostly not vice-versa.
The value of a newer version is normally higher than a value of an older one.
However, due to the parallel development of BAHN 3.8x and 4.00,
there exist some exceptions to this simple idea.
<a name="k3"></a>Coordinates
#define NETZBREITE 65536 #define NETZHOEHE 65536 #define NETZEBENE_MIN -4 #define NETZEBENE_MAX 0 #define NETZEBENE_STANDARD 0
Coordinates are always given as triple k3="nx,ny,nz"
.
Name | Needed | Range | Default | Meaning |
---|---|---|---|---|
nx | yes | 0..NETZBREITE-1 | - | West-East |
ny | yes | 0..NETZHOEHE-1 | - | North-South |
nz | no | NETZEBENE_MIN..NETZEBENE_MAX | NETZEBENE_STANDARD | level |
The nz value is by default =NETZEBENE_STANDARD and then can be omitted,
resulting in a pair k3="nx,ny"
that means k3="nx,ny,NETZEBENE_STANDARD"
.
<a name="richtg"></a>Directions
_KEINE = no, _N = North, _S = South, _W = West, _O = East, _ANZAHL = count
Directions as values:
#define RICHTUNG_KEINE (-1) #define RICHTUNG_MIN 0 #define RICHTUNG_MIN_90 0 #define RICHTUNG_N 0 #define RICHTUNG_S 1 #define RICHTUNG_W 2 #define RICHTUNG_O 3 #define RICHTUNG_MAX_90 3 #define RICHTUNG_SO 4 #define RICHTUNG_NW 5 #define RICHTUNG_SW 6 #define RICHTUNG_NO 7 #define RICHTUNG_MAX 7 #define RICHTUNG_ANZAHL (RICHTUNG_MAX+1) #define GETGEGENRICHTUNG( r ) ((r) ^ 1 ) /* get reverse direction */
Directions as bits (stored as hex codes):
#define RICHTUNGBIT_KEINE 0x00 #define RICHTUNGBIT_N (1 << RICHTUNG_N) #define RICHTUNGBIT_S (1 << RICHTUNG_S) #define RICHTUNGBIT_W (1 << RICHTUNG_W) #define RICHTUNGBIT_O (1 << RICHTUNG_O) #define RICHTUNGBIT_SO (1 << RICHTUNG_SO) #define RICHTUNGBIT_NW (1 << RICHTUNG_NW) #define RICHTUNGBIT_SW (1 << RICHTUNG_SW) #define RICHTUNGBIT_NO (1 << RICHTUNG_NO) #define RICHTUNGBIT_ALLE 0xFf /* all */ #define GETRICHTUNGBIT( r ) (1 << (r)) /* get direction bit */ #define MAKEGEGENRICHTUNGBIT( r ) {if ((r) & 0x55 ) (r) <<= 1; else (r) >>= 1;} /* make reverse dir. bit */ #define GETGEGENRICHTUNGBIT( r ) ( (r) & 0x00000055 ? (r) << 1 : (r) >> 1 ) /* get reverse dir. bit */
bit for backwards (as bit in a WORD16, the LOBYTE is RICHTUNGBIT_xx)
#define RICHTUNGBIT_RW (BIT_15)
<a name="textmz"></a>(Multi-lined) Texts
Some text data can consist of multiple lines. These texts can contain line-breaks (hard-coded).
Typical XML characters are masked:
Character | Written as | Meaning |
---|---|---|
< | < | less than, sometimes used as arrow |
> | > | greater than, sometimes used as arrow |
" | " | quotation mark |
' | ' | apostrophe |
& | & | ampersand |
tabulator | <tb /> | tabulator (not recommended to use) |
line-break | <br /> | hard line-break |
arrows | <p1..9 /> | arrow (in BAHN's own code, used only in <a href="#text">texts in the layout</a>) 1..9 = direction like on the num pad, e.g. p4 = arrow to West |
<a name="textinfo"></a>Info Text
Info texts belong to some data, e.g. <a href="#lin">route codes</a>, <a href="#zuege">trains</a>, <a href="#sigsys">signal systems</a> and <a href="#fstr">itineraries</a>. Mostly the length is given as count of characters. However, the length is checked binary only: In case of length = 0 the statement is omitted completely, and if length > 0 then the text is read up to MAXINFOTEXTSIZE-1 and cut if longer.
#define MAXINFOTEXTSIZE (20001)
<code> <info>..</info> </code>
The text stands between. It is a <a href="#textmz">multi-line</a> text.
<a name="zeit"></a>Time Data
Days of week as single values:
Name | Value | Meaning |
---|---|---|
WTAG_KEIN | 0 | no day |
WTAG_MO | 1 | Monday |
WTAG_DI | 2 | Tuesday |
WTAG_MI | 3 | Wednesday |
WTAG_DO | 4 | Thursday |
WTAG_FR | 5 | Friday |
WTAG_SA | 6 | Saturday |
WTAG_SO | 7 | Sunday |
WTAG_MIN | (WTAG_MO) | lowest day of week |
WTAG_MAX | (WTAG_SO) | highest day of week |
Days of week as bit masks:
Name | Value | Meaning |
---|---|---|
WTAGMASK_MO | 0x01 | Monday |
WTAGMASK_DI | 0x02 | Tuesday |
WTAGMASK_MI | 0x04 | Wednesday |
WTAGMASK_DO | 0x08 | Thursday |
WTAGMASK_FR | 0x10 | Friday |
WTAGMASK_SA | 0x20 | Saturday |
WTAGMASK_SO | 0x40 | Sunday |
WTAGMASK_NIE | 0x00 | never |
WTAGMASK_TGL | 0x7F | daily |
WTAGMASK_MF | 0x1F | Mon-Fri |
WTAGMASK_WE | 0x60 | Sat+Sun (weekend) |
<code> #define GETWTAGBIT( day ) ( 1 << (day-1) ) #define ZEIT_NIE (( WTAGMASK_NIE << 24 ) | ( 0 << 16 ) | ( 0 << 8 ) | 0 ) #define ZEIT_MIN (( WTAGMASK_MO << 24 ) | ( 0 << 16 ) | ( 0 << 8 ) | 0 ) </code>
Time data are specified as:
Name | Value | Meaning |
---|---|---|
wtag | WTAG_xx | as above, can define exactly one day, given as decimal number |
wtagm | WTAGMASK_xx | as above, can define multiple days, given as hex code |
h | 0..23 | Hour |
min | 0..59 | Minute |
sec | 0..59 | Second |
ZEIT2 | h:min | day is not needed (=daily), sec=0 |
ZEITD | wtag:h:min:sec | can define exactly one day, wtag = WTAG_KEIN is omitted |
ZEIT4 | wtagm:h:min:sec | can define multiple days |
<a name="namen"></a>Names of Objects
Valid characters as found in the BAHN Help, maximum length also found in the following sections.
Note that there is a difference between <a href="#textfmt"> text formats</a>, <a href="#fziel">destinations</a> and <a href="#lin">display route code names</a> on one side and all other names on the other.
<a name="dpgl"></a>Depot references
References to <a href="#depot">depots</a> and depot tracks consist of 2 decimal values, separated by colon.
The first is the depot id, the second the track number.
Example: "2:3" means depot with id == 2 and track number == 3.
#define DEPOTANZAHL 4000 /* max. count of depots */ #define DEPOTNR_MIN 1 #define DEPOTNR_MAX DEPOTANZAHL #define DEPOTNR_UNDEF 0 #define DEPOT_MINGLEISNR 1 /* smallest track number */ #define DEPOT_MAXGLEISNR 99 #define DEPOT_ALLEGLEISE 0 /* undefined track (== all tracks) */ #define DEPOT_MAXGLEISZAHL (DEPOT_MAXGLEISNR - DEPOT_MINGLEISNR + 1) /* max. count of tracks */
If depot == DEPOTNR_UNDEF, then track number == DEPOT_ALLEGLEISE.
Otherwise it can specify an exact track or "all tracks" or "undefined",
depending on the context.
In this case it is not stored, e.g. "2" means depot with id == 2, all track numbers.
<a name="dlist"></a>Depot List
Depot lists are found at <a href="#weivz">junction turnouts</a> and <a href="#sigel">signal system elements</a>.
#define MAXDEPLISTSIZE (MAXLINLISTSIZE) /* maximum length */ #define DLELEMLEN_BASIS (2) /* maximum length of single entry */
<code><DLx>..</DLx></code>
The x is a place holder for one character (or none) to distinguish between multiple lists at the same object, e.g. "DL1" and "DL2". For objects that have only one list, it is mostly omitted.
Empty lists are not stored, i.e. the whole tag is omitted.
The count of entries is not stored but must not exceed the limit MAXDEPLISTSIZE/DLELEMLEN_BASIS.
Each element (depot or depot:track) is counted as one entry.
The single elements are tags and contain a <a href="#dpgl">DPGL</a> reference of a depot number (id) and an optional track number.
<code><Dx>..</Dx></code>
In the BAHN dialogs there are intervals of multiple tracks of the same depot, e.g. "DepotA:1-3". However, these intervals are stored as single entries following each other.
<a name="llist"></a>Route List
Route lists are found at many elements like <a href="#weivz">junction turnouts</a>,
<a href="#dwx">data change points</a>, <a href="#sigel">signal system elements</a> and others.
Formerly they contained route codes only but today they can store much more conditions and assignments.
However, often there is the simple situation of one ore multiple route codes without more parameters.
#define LINDEPLISTUNIT (sizeof(INT32)) /* unit for elements in route lists */ #define MAXLINLISTSIZE (1600) /* maximum size of a route list in LINDEPLISTUNIT */ #define LINTEXTBUFSIZE (8001) /* maximum size of a route list in characters for input/output */
<code><LLx>..</LLx></code>
The x is a place holder for one character (or none) to distinguish between multiple lists at the same object, e.g. "LL1" and "LL2". For objects that have only one list, it is mostly omitted.
Empty lists are not stored, i.e. the whole tag is omitted.
The count of entries is not stored.
The summary length of entries must not exceed the limit MAXLINLISTSIZE,
however these are of different length internally.
For display/input of route lists, the LINTEXTBUFSIZE is defined (summary of all characters incl. UNICODE_NULL terminator). If a binary route list is longer when displaying it, then it will be shown incomplete, and in case of input it will be cut. This may occur if named objects like route codes, destinations or depots have been renamed later and got a longer name this way.
The list is processed from left to right (top to bottom), and the first entry is taken that is suitable for the train at current moment.
Each entry is a tag, covered by:
<code><E>..</E></code>
It can contain conditions and assignments, depending on the context.
The conditions are valid in all route lists if not stated otherwise (few exceptions).
In some route lists, only certain or no assignments are allowed
(e.g. at <a href="#weivz">junction turnouts</a>: conditions, but no changes).
At data change points at least one assignment must exist.
<a name="llist_b_lin"></a>Route as condition
#define MAXANZAHL_LIN1 (40) /* maximum count of routes per entry (before the opening parenthesis) */
<code><l>..</l></code>
The tag contains the id of a <a href="#lin">route code</a> as LINNR_MIN..LINNR_MAX or LINNR_UNDEF. In the text display, the routes are connected by "+". The route code LINNR_UNDEF (in BAHN shown as "*") is valid and means "valid for trains of all routes". In case of multiple entries, it makes sense as last entry only or connected with other conditions.
The route code condition is handled here as well as the other conditions and assignments. For historical reason it is shown different in BAHN before the parentheses while all others are inside the parentheses.
<a name="llist_b_fziel"></a>Destination as condition
#define MAXANZAHL_B_FZIEL (40) /* maximum count of destination conditions per entry */
<code><Z>..</Z></code>
The tag starts with the operator (optionally, default is "="):
<code><o>..</o></code>
There follow the <a href="#fziel">destinations</a>, each as tag:
<code><z>..</z></code>
Inside the tag there is the destination id as LINNR_MIN..LINNR_MAX or LINNR_UNDEF (for "empty").
<a name="llist_b_intv"></a>Time interval as condition
#define MAXANZAHL_B_INTV (40) /* maximum count of time intervals (=time conditions) per entry */ #define LL_INTV_WDH_KEINE 0 /* no repetition (no loop) */ #define LL_INTV_WDH_ABST_MIN 60 /* smallest distance between intervals to repeat in sec */ #define LL_INTV_WDH_ABST_MAX (6*60*60) /* highest ~ = 6h = 21600s */ #define LL_INTV_WDH_LEN_MIN 60 /* smallest length of interval to repeat in sec (=1min) */ #define LL_INTV_WDH_LEN_MAX (6*60*60-1) /* highest ~ = 6h-1s = 21599s */
<code><i a= e= w= /></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
a | yes | <a href="#zeit">ZEIT4</a> | - | first time, begin |
e | yes | ZEIT4 | - | last time, end |
w | no | LL_INTV_WDH_ABST_MIN..LL_INTV_WDH_ABST_MAX, LL_INTV_WDH_LEN_MIN..LL_INTV_WDH_LEN_MAX | no loop | repeat info, 2 values: distance and duration, both in sec |
<a name="llist_b_wsl"></a>Probability as condition
#define LL_WSL_SUM_MIN 2 /* less would be nonsense */ #define LL_WSL_SUM_MAX 1000 /* maximum summary value */ #define LL_WSL_ANTEIL_MIN (LL_WSL_SUM_MIN-1) /* minimum part value */
<code><p>..</p></code>
Inside the tag there are 2 values: summary and part, e.g. "2,1" for 1:2 or "100,50" for 50%.
summary is in range LL_WSL_SUM_MIN..LL_WSL_SUM_MAX
part is in range LL_WSL_ANTEIL_MIN..summary-1.
<a name="llist_b_znr"></a>Train number as condition
#define MAXANZAHL_B_ZNR (40) /* maximum count of train number conditions per entry */
<code><N>..</N></code>
The tag starts with the operator (optionally, default is "="):
<code><o>..</o></code>
There follow the <a href="#zugkallg">train numbers</a>, each as tag:
<code><n>..</n></code>
Inside the tag there is the train number in range ZUGNUMMER_MIN..ZUGNUMMER_MAX. A 2nd value separated by comma defines an interval from the first one.
<a name="llist_b_zkat"></a>Train category as condition
#define ZUGKAT_BIT ( 1 << ( ZUGKAT_xxx - ZUGKAT_MIN ))
<code><t>..</t></code>
Inside the tag there is a mask of <a href="#zugkallg">train category</a> bits (hex), each of these =ZUGKAT_BIT( category value )
<a name="llist_b_zgat"></a>Train species (priority) as condition
#define ZUGGAT_BIT ( 1 << ( ZUGGAT_xxx - ZUGGAT_MIN ))
<code><g>..</g></code>
Inside the tag there is a mask of <a href="#zugkallg">train species</a> bits (hex), each of these =ZUGGAT_BIT( species value )
<a name="llist_b_zeig"></a>Train properties as condition
Single bits for properties:
#define LL_ZEIG_KEINE 0x00000000 /* nothing (senseless) */ #define LL_ZEIG_AR_NORMAL 0x00000001 /* going on-duty, with passengers */ #define LL_ZEIG_AR_DF 0x00000002 /* going on-duty, non-revenue */ #define LL_ZEIG_ER_NORMAL 0x00000004 /* going off-duty, with passengers */ #define LL_ZEIG_ER_DF 0x00000008 /* going off-duty, non-revenue */ #define LL_ZEIG_WDZUG 0x00000010 /* is shuttle train (push-pull) */ #define LL_ZEIG_KWDZUG 0x00000020 /* is not a shuttle train (not push-pull) */ #define LL_ZEIG_TFZ_VORN 0x00000040 /* 1st vehicle is motorized */ #define LL_ZEIG_KTFZ_VORN 0x00000080 /* 1st vehicle is non-motorized */ #define LL_ZEIG_AR_KEIN 0x00000100 /* is not going on-duty */ #define LL_ZEIG_ER_KEIN 0x00000200 /* is not going off-duty */
<code><e>..</e></code>
Inside the tag there is a mask of LL_ZEIG_xxx bits (hex).
Some of the bits do not make sense when used both, e.g. _WDZUG and _KWDZUG.
<a name="llist_b_fzahl"></a>Vehicle count as condition
#define LL_FZAHL_MIN 1 /* less would be nonsense */ #define LL_FZAHL_MAX (MAXZUGFSYM) /* maximum value for vehicle count */ #define LL_FZAHL_0 0 /* invalid value */
<code><f>..</f></code>
The tag starts with the operator:
<code><o>..</o></code>
There follows the count of vehicles, in range of LL_FZAHL_MIN..LL_FZAHL_MAX.
An optional 2nd value separated by comma defines an interval from the first one.
Then, only equal or not equal operators make sense.
<a name="llist_b_zlen"></a>Train length as condition
#define LL_ZUGLEN_MIN (MIN_FZGLEN) /* less would be nonsense */ #define LL_ZUGLEN_MAX (MAXZUGGSYM * SYMBREITE) /* maximum value for vehicle count, pixels! */ #define LL_ZUGLEN_0 0 /* invalid value */
<code><m>..</m></code>
The tag starts with the operator:
<code><o>..</o></code>
There follows the length, in range of LL_ZUGLEN_MIN..LL_ZUGLEN_MAX.
Note these are pixels in M1:1, not elements.
An optional 2nd value separated by comma defines an interval from the first one.
Then, only equal or not equal operators make sense.
<a name="llist_b_sfkt"></a>Signal switching function as condition
Available only if (<a href="#fversion">file format</a> ≥ FV_3882).
Restricted to some elements: <a href="#weivz">junction turnouts</a>, <a href="#rangp">shunting points</a> and <a href="#dwx">data change points</a>.
<code><s>..</s></code>
Inside there is a <a href="#schfkt">signal switching function</a> without additional character.
<a name="llist_lin2"></a>Route code assignment
<code><Li>..</Li></code>
The tag contains the id of a <a href="#lin">route code</a> as LINNR_MIN..LINNR_MAX or LINNR_UNDEF. The route code LINNR_UNDEF (in BAHN shown as "*") is valid and means "set value to base route code".
If (<a href="#fversion">file format</a> ≥ FV_3881) then it is allowed to assign the same route code as mentioned as condition. This makes sense sometimes when combining with other assignments.
<a name="llist_fziel2"></a>Destination assignment
<code><Zi>..</Zi></code>
The tag contains the id of a <a href="#fziel">destination</a> as LINNR_MIN..LINNR_MAX or LINNR_UNDEF. The code LINNR_UNDEF is valid and means "clear destination (set to empty)".
<a name="llist_hsti"></a>Stop time interval assignment
<code><Hs>..</Hs></code>
The tag contains the minimum and maximum value of time to stay at <a href="#hst">stopping points</a>
in the range MIN_HSTMINMAX..MAX_HSTMINMAX.
The 2nd value is separated by comma, needs to be ≥ the 1st one and is omitted if equal.
<a name="llist_zkat"></a>Train category assignment
<code><Zk>..</Zk></code>
The tag contains the train category as ZUGKAT_MIN..ZUGKAT_MAX or ZUGKAT_KEINE. The code ZUGKAT_KEINE is valid and means "set value to base category".
<a name="llist_zgat"></a>Train species assignment
<code><Zg>..</Zg></code>
The tag contains the train species (priority) as ZUGGAT_MIN..ZUGGAT_MAX or ZUGGAT_KEINE. The code ZUGGAT_KEINE is valid and means "set value to base species".
<a name="llist_fweg"></a>Driving way assignment
<code><Fw>..</Fw></code>
The tag contains the new way as <a href="#zugkallg">FW_SCHIENE</a>, FW_WASSER or FW_BUS.
<a name="llist_znr"></a>Train number assignment
<code><Zn>..</Zn></code>
The tag contains two values, separated by comma.
The first value is either a train number or a relative value.
The second value is one of ATTR_LL_MINMAX_xxx and defines how to interpret the first one.
The default is ATTR_LL_MINMAX_EXAKT, then the 2nd value is not stored.
Possible values of 2nd parameter:
#define ATTR_LL_MINMAX_EXAKT (0) /* value1 is an absolute <a href="#zugkallg">train number</a> */ #define ATTR_LL_MINMAX_MIN (1) /* use free number, value1 is minimum */ #define ATTR_LL_MINMAX_MAX (2) /* use free number, value1 is maximum */ #define ATTR_LL_MINMAX_REL (3) /* add value1 to current number, value1 may be <0 */
If the 1st parameter is a relative value (i.e. the 2nd is =ATTR_LL_MINMAX_REL), then the valid range is both -ZUGNRMASK_SET_REL_MAX..-ZUGNRMASK_SET_REL_MIN and ZUGNRMASK_SET_REL_MIN..ZUGNRMASK_SET_REL_MAX:
#define ZUGNRMASK_SET_REL_MIN (1) #define ZUGNRMASK_SET_REL_MAX (1000) /* <a href="#fversion">file format</a> < FV_3881 */ #define ZUGNRMASK_SET_REL_MAX (99900) /* file format ≥ FV_3881 */
<a name="llist_bsl"></a>Acceleration assignment
<code><Aa>..</Aa></code> for speeding up <code><Ab>..</Ab></code> for braking
The tag contains the new <a href="#zugkv">acceleration</a> value. The range is BSL_MIN..BSL_MAX or BSL_UNDEF, with 2 digits after the decimal point.
<a name="llist_kfrei"></a>Keep crossings free assignment
<code><Kf>..</Kf></code>
The tag contains the new value as 1 (keep crossings free) or 0 (do not).
<a name="llist_wdzug"></a>Push-pull train assignment
<code><Wz>..</Wz></code>
The tag contains the new value as 1 (train is push-pull train) or 0 (is not).
<a name="llist_arerzeit"></a>Times to go on/off duty assignment
<code><Az z= l= t= dp= fd= /></code> for going on-duty <code><Ez z= l= t= dp= fd= /></code> for going off-duty
There can be multiple tags. The Ez follow after the Az.
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
z | yes | 0..MAX_ARERDAT | - | line number, 0 means "for all lines" (only for deleting) |
l | no | 0 or 1 | 0 | 1= delete line or all lines, then no further attributes |
t | (l=0) | <a href="#zeit">ZEIT4</a> | - | time |
dp | no | <a href="#dpgl">DPGL</a> | DEPOTNR_UNDEF | depot and track, DEPOTNR_UNDEF means home depot |
df | no | 0 or 1 | 0 | 1= as non-revenue trip |
<a name="llist_vmax"></a>Maximum speed assignment
<code><Vm>..</Vm></code>
The tag contains the new <a href="#zugkv">vmax</a> value. The range is MIN_VMAX..MAX_VMAX, with 3 digits after the decimal point.
<a name="llist_rglen"></a>Shunting length assignment
<code><Rl>..</Rl></code>
The tag contains the new <a href="#zugkallg">shunting length</a> value. The range is -MAXZUGGSYM+1..MAXZUGGSYM-1. Negative values will be added to the train's current shunting length, i.e. effect from tail backwards. If the train is not longer than abs(value), then the data are ignored.
<a name="llist_blzeit"></a>Time to report blockage assignment
<code><Bz>..</Bz></code>
The tag contains the new time to report that the train is blocked, in sec. The range is MIN_BLOCKZEIT..MAX_BLOCKZEIT (0=no report).
<a name="llist_ausr"></a>Status going on-duty assignment
<code><Ar>..</Ar></code>
The tag contains the new status as
- 0 = clear (train is not going on-duty)
- 1 = set (train is going on-duty)
- 3 = set (train is going on-duty as non-revenue trip)
The status cannot be set if "going off-duty" has been set for the train.
<a name="llist_einr"></a>Status going off-duty assignment
<code><Er dp= >..</Er></code>
Parameter:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
dp | no | <a href="#dpgl">DPGL</a> | DEPOTNR_UNDEF | target depot and track, DEPOTNR_UNDEF see below |
The tag contains the new status as
- 0 = clear (train is not going off-duty), parameter dp is ignored
- 1 = set (train is going off-duty)
- 3 = set (train is going off-duty as non-revenue trip)
If set but no depot is given:
- If the train was not going off-duty before, then to the home depot
- If the train does not have a home depot, the entry is ignored
- If the train already is going off-duty, then the entry only toggles between non-revenue trip or not
If the status is set, then the status "going on-duty" is cleared implicitly when set before.
<a name="llist_licht"></a>Light status assignment
<code><Lt>..</Lt></code>
The tag contains the new value as 1 (lights are on) or 0 (lights are off).
<a name="tlist"></a>Time List
Time lists are found at <a href="#taktp">timing points</a> and <a href="#sigsys">signal systems</a>.
<code><ZL>..</ZL></code>
In case of an empty list, the whole tag is missing.
A time list consists of one or multiple day groups, each of them containing data for 24h.
<a name="tlisttg"></a>Day Group
<code><TG wt= >..</TG></code>
Parameter: wt = WTAGMASK_xx, can store multiple days.
In case of WTAGMASK_NIE, the whole tag is omitted.
If there are multiple day groups, then their wt parameters must define exlusive days, i.e. not overlap.
The day group embraces the data of 24 hours, following sorted from 0 to 23.
<a name="tliststd"></a>Hour
#define ZEICHEN_ZLWD 'w'
<code><H h= >..</H></code>
Parameter: h = hour 0..23.
If there are hours with the same data following each other directly,
then there is a 2nd value, e.g. h="6,16" means valid for all hours from 6 to 16.
Hours without data are omitted.
Inside the hour, there are following the times, sorted by time, divided by comma.
If seconds are =0, then they are ignored, otherwise stored with 2 digits, separated by colon.
If a time forces to turn backwards, then a ZEICHEN_ZLWD character follows. In contrast with BAHN dialogues, this is constant and not language-depending.
<a name="schfkt"></a>Switching Function
#define MAX_SCHALTFKT_LEN (200) /* maximum count of entries in a switching list */
A switching function contains the numbers of <a href="#sigsys">signal systems</a> or <a href="#fstr">itineraries</a> and operators.
<code><SFx>..</SFx></code>
The x is a place holder for one character (or none) to distinguish between multiple lists at the same object, e.g. "SF1" and "SF2". For objects that have only one list, it is mostly omitted.
Empty lists are not stored, i.e. the whole tag is omitted.
The count of entries is not stored but must not exceed the limit MAX_SCHALTFKT_LEN.
Each element (operator or operand) is counted as one entry.
The single elements are tags and contain either an operand (id of a signal system or an itinerary) or an operator:
Tag | Content | Meaning |
---|---|---|
<s>..</s> | operand | id of signal system or itinerary |
<o>..</o> | operator | operator except parenthesis |
<k>..</k> | parenthesis | parentheses |
The operators are the same as in BAHN dialogs, but keep in mind that ampersand & is masked as & in XML.
The function is calculated from left to right, but in consideration of the priority of operators (see BAHN Help).
<a name="schlist"></a>Switching List
#define MAX_SCHALTLIST_LEN (100) /* maximum count of entries in a switching list */
A switching list contains the numbers of <a href="#sigsys">signal systems</a> or <a href="#fstr">itineraries</a>.
<code><SLx>..</SLx></code> or <code><ALx>..</ALx></code> or <code><FLx>..</FLx></code>
The SL is used for real switching lists. It can contain both signal systems and itineraries, to switch up (+) or down (-). The same element may be listed multiple, when all entries are of the same way (i.e. all + or all -).
The AL is used for alternative lists of itineraries.
The FL is used for lists at <a href="#weifs">itinerary turnouts</a>
and <a href="#krzfs">itinerary crossings</a> (see remark below).
Both contain itineraries only without switching.
It does not make sense to list the same element multiple.
Remark: In <a href="#fversion">file format</a> <FV_3881, SL lists are used for itinerary turnouts for some mysterious reason. However, they do not switch the itineraries.
The x is a place holder for one character (or none) to distinguish between multiple lists at the same object, e.g. "FL1" and "FL2". For objects that have only one list, it is mostly omitted.
Empty lists are not stored, i.e. the whole tag is omitted.
The count of entries is not stored but must not exceed the limit MAX_SCHALTLIST_LEN.
The single elements are tags and contain the id of a signal system or an itinerary:
Tag | Used in | Meaning |
---|---|---|
<e>..</e> | SL list | turning on (+) |
<a>..</a> | SL list | turning off (-) |
<s>..</s> | AL and FL lists | no switching |
<a name="farben"></a>Colors
#define RGBX3_TRANSPARENT L't' /* transparent, no RGB */ #define RGBX3_WIE_TEXTVG L'v' /* same as foreground, no RGB */ #define RGBX3_IMMERHELL L'h' /* always lighting (without darkness at night), RGB3 follows */
RGB (red-green-blue) is stored as hex value of 6 digits, 2 digits for each part.
Instead of RGB there can occur RGBX3_TRANSPARENT or RGBX3_WIE_TEXTVG.
RGB value can be preceded by RGBX3_IMMERHELL, e.g. "hFFFFFF" is white, always lighting.
<a name="header"></a>Header
As for standard XML, the first line is
<code> <?xml version="1.0" encoding="UTF-8"?> </code>
BAHN does not support other codings than UTF-8 here.
Some comment lines may follow (generally comment lines may be added anywhere).
A DTD (DOCTYPE declaration) may follow but is ignored. BAHN self does not write a DTD.
All the data are embraced by the tag:
<code> <BAHN_Sim_Netz_NT3 format="nnnn"></code>
The "format" parameter is the file format info (version info), as hexadecimal number of 4 digits. For valid values see <a href="#fversion">file format</a>.
Next, the creator statement:
<code> <Prog name="xxxx" vs_n="nnn" reg="xxxx-xxxx" /></code>
Parameters:
Name | Needed | Meaning | Example |
---|---|---|---|
name | no, but recommended | Name of program that created the file | BAHN 3.88r1 |
vs_n | no, but recommended | Version of program that created the file | 3.88.1.0 |
reg | no | Some info about registration status of the user (if created by BAHN) | r388-... |
<a name="allg"></a>General Data
The section is embraced in
<code> <Allg></code>
Parameters: none
Contents
Some Status Info
<code> <Status pw= anhang= zufall= /></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
pw | no | INT32 | 0 | If not zero then the file is password protected (not further described here) |
anhang | no | 0 or 1 | 0 | 1 = Additional files are attached to the file, see <a href="#anhang">attachments</a> |
zufall | no | INT32 | 0 | value > 0 for initialisation of pseudo random generator
(i.e. after each load of the file, all "random" events will occur exactly the same way) |
General Info Texts
for each: maximum number of characters + 1 for internal UNICODE_NULL, i.e. here one character less
#define NETFILEHEADSIZE 81 /* title */ #define NETFILEAUTSIZE 81 /* author */ #define NETFILETEXTSIZE 20001 /* text info */
<code> <Titel></code>
no parameters, but content: the head line of the file, as found in "Edit" - "General Info"
<code> <Autor></code>
no parameters, but content: the author information of the file, as found in "Edit" - "General Info"
<code> <NetzInfo></code>
no parameters, but content: the general information text of the file, as found in "Edit" - "General Info".
This text may consist of <a href="#textmz">multiple lines</a>.
Edit Window Parameters
<code> <EditF nxlo= nylo= k3= /></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
nxlo | yes | 0..NETZBREITE-1 | - | nx coordinate of upper left corner |
nylo | yes | 0..NETZHOEHE-1 | - | ny coordinate of upper left corner |
k3 | yes | KOORD3 | - | cursor position (nz is also the Window's nz position) |
Only the data of the current Edit window are stored, even if multiple Edit windows are open.
The coordinate values of the upper left corner of the current Edit window are given in BAHN coordinates. Both values may be corrected on loading, because the screen size resp. window size may different than in the moment the file was stored. The values are corrected in a way that the right and down border are not exceeded.
The cursor position's nx and ny values may be corrected while loading, respectively the window corner is changed; in any case in a way, that after loading, the cursor is in the visible area, depending on the current window size and zoom option. The nz value is set as current level of the window.
Stored Cursor Positions
<code> <MerkPos anz= ></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
anz | yes | 0..MERKPOS_ANZAHL-1 | - | count of stored positions |
#define MERKPOS_ANZAHL (400) #define AUTOSTOPSTD_UNDEF (0xFF) #define MERKPOSCOMMENTSIZE (65)
The data for the single positions follow. However, BAHN stores only data that differ from the previous position, i.e. lines of same content as previous line are not stored.
For each position:
<code> <P nr= k3= t_ruf= info= ></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
nr | yes | 0..MERKPOS_ANZAHL-1 | - | line number |
k3 | yes | KOORD3 | - | position (coordinates) |
t_ruf | no | ZEIT2 | no call | time of call |
info | no | text[MERKPOSCOMMENTSIZE] | empty | info text |
Home Position
<code><Pos1 k3= ></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
k3 | yes | KOORD3 | - | position (coordinates) |
The "Home" position is to reach by default by hot-key "Home/Pos1". Normally it is set to a central position in the layout.
Marked Area
<code><Mark1 k3= /></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
k3 | yes | KOORD3 | - | position (coordinates) |
<code> <Mark2 k3= ein= /></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
k3 | yes | KOORD3 | - | position (coordinates) |
ein | no | 0 or 1 | 0 | 1= marking is visible |
The 2 coordinate triples define a space (room) for the marked area (for complex edit functions as Shifting, Copy/Paste etc.). Both points may be defined freely, i.e. it is not needed that X1,Y1,Z1 is the upper left corner. Both points belong to the area.
Start Point to Build Lines/Connections
<code> <Bau1 k3= /></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
k3 | yes | KOORD3 | - | position (coordinates) |
The nz coordinate value is ignored and by default 0. As nz, the current level of the cursor position of the current Edit window is used.
Simulation Time of the Layout
#define MINSPEED (1) #define MAXSPEED (20) #define AUTOSTOPWDH_MAX (999)
<code> <Zeit v_sim= t_sim= t_ms= wtblock= minsum= t_stop= stop_wdh= /></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
v_sim | yes | MINSPEED..MAXSPEED | - | simulation speed (1 = synchronised by real time, 20 = without braking, 2..19 somewhere between) |
t_sim | yes | ZEITD | - | simulation time {day,h,min,sec}, if day missing, then Monday |
t_ms | no | 0..999 | 0 | simulation time {ms}, not all values really used |
wtblock | no | 0 or 1 | 0 | 1=counting of days of week is blocked (always same day) |
minsum | no | INT32 | 0 | summary of minutes the layout did run |
t_stop | no | ZEITD | no stop | auto stop time, if day = WTAG_KEIN, then the stop is daily, i.e. undependent on the current day. |
stop_wdh | no | 0..AUTOSTOPWDH_MAX | 0 | auto stop time, backwards count of days Only valid go-throughs are counted: If a day of week is defined, then weekly only, i.e. the counter counts weeks. |
Borders (Extent of the Layout)
The complete tag is informal only and can be omitted.
<code> <RandMin k3= /></code> <code> <RandMax k3= /></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
k3 | yes | KOORD3 | - | position (coordinates) |
The data contain the smallest and highest position where something is located in the layout, except dispatcher messages. These values are not really checked on loading, but updated after loading the other data. However, you can use them for test purposes.
In an empty layout, the min values nx, ny are = -1, the max values nx, ny = 0.
Scale of the Layout
#define MIN_MASSSTAB 2 #define MAX_MASSSTAB 90
<code> <Massstab el_p_km= /></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
el_p_km | yes | MIN_MASSSTAB..MAX_MASSSTAB | - | scale in elements / km |
Grid
#define MIN_GITTERABSTAND 2 #define MAX_GITTERABSTAND 512 #define GITTER_INI_POS 0 #define GITTER_INI_HLIN 64 #define GITTER_INI_NLIN 16
<code><Gitter nx0= ny0= dx1= dy1= dx2= dy2= ein= /></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
nx0 | no | 0..NETZBREITE-1 | GITTER_INI_POS | nx coordinate of base point |
ny0 | no | 0..NETZHOEHE-1 | GITTER_INI_POS | ny coordinate of base point |
dx1 | yes | MIN_GITTERABSTAND..MAX_GITTERABSTAND | GITTER_INI_HLIN | Step of main grid lines in x direction |
dy1 | yes | MIN_GITTERABSTAND..MAX_GITTERABSTAND | GITTER_INI_HLIN | Step of main grid lines in y direction |
dx2 | yes | MIN_GITTERABSTAND..MAX_GITTERABSTAND | GITTER_INI_NLIN | Step of secondary grid lines in x direction |
dy2 | yes | MIN_GITTERABSTAND..MAX_GITTERABSTAND | GITTER_INI_NLIN | Step of secondary grid lines in y direction |
ein | no | 0 or 1 | 0 | 1 = grid is turned on (visible) |
Day / Night switching
#define TAG_BEGIN_STD (( 7<<8) | 0) /* 7:00 */ #define TAG_ENDE_STD ((17<<8) | 0) /* 17:00 */ #define NACHT_BEGIN_STD ((18<<8) | 30) /* 18:30 */ #define NACHT_ENDE_STD (( 5<<8) | 30) /* 5:30 */
<code> <TagNacht tag_a= tag_e= nacht_a= nacht_e= zust= /></code>
Parameters:
Name | Needed | Value | Default | Meaning | |
---|---|---|---|---|---|
tag_a | no | ZEIT2 | TAG_BEGIN_STD | begin of day | |
tag_e | no | ZEIT2 | TAG_ENDE_STD | end of day (begin of dusk) | |
nacht_a | no | ZEIT2 | NACHT_BEGIN_STD | begin of night | |
nacht_e | no | ZEIT2 | NACHT_ENDE_STD | end of night (begin of dawn) | |
zust | no | 0..3 | 0 |
0 = off |
If one or more of the times are missing, wrong, equal or in a non-sense order, then all are set to default.
Files of user-defined scenic elements
#define NUTZERGZGSATZ_DATEIZAHL 110 #define MAXPATH 256
<code> <NElemLand anz= ></code>
Parameter: anz = count of files = 0..NUTZERGZGSATZ_DATEIZAHL
if (anz == 0) then the whole tag is omitted.
For each entry:
<code> <Dt pos= name= /></code>
pos = line number, zero based
name = file name:
- without path data (no drive or other device, no directory)
- normally with extension ".uz1" or ".uzg"
- Win32-compatible, i.e. CHAR16[1..MAXPATH] of valid charactersCHAR16[1..MAXPATH]
Empty lines are not stored.
Files of user-defined signals
#define NUTZERSIG_DATEIZAHL_HSIG 20 /* Hauptsignale = stop signals */ #define NUTZERSIG_DATEIZAHL_VSIG 20 /* Vorsignale = distant signals */ #define NUTZERSIG_DATEIZAHL_KSIG 20 /* Kombisignale = combined signals */
<code> <NElemHSig anz= ></code> <code> <NElemVSig anz= ></code> <code> <NElemKSig anz= ></code>
Parameter: anz = count of files = 0..NUTZERSIG_DATEIZAHL_HSIG
Further details are the same as for user-defined scenic elements (see section above).
Stop, distant and combined signals follow in this order.
Files of user-defined way elements
#define NUTZERFWEG_DATEIZAHL 20
<code> <NElemFweg anz= ></code>
Parameter: anz = count of files = 0..NUTZERFWEG_DATEIZAHL
Further details are the same as for user-defined scenic elements and signals (see sections above).
Files of user-defined vehicles
#define NUTZERZGGSATZ_DATEIZAHL 100
<code> <NElemFzg anz= ></code>
Parameter: anz = count of files = 0..NUTZERZGGSATZ_DATEIZAHL
if (anz == 0) then the whole tag is omitted.
For each entry:
<code> <Dt pos= name= /></code>
pos = line number, zero based
name = file name:
- without path data (no drive or other device, no directory)
- normally with extension ".nfz" or ".ufg"
- Win32-compatible, i.e. CHAR16[1..MAXPATH] of valid characters
Empty lines are not stored.
For an ".ufg" file, a suitable ".uzz" file must exist. The name is generated by BAHN by exchanging the extension.
<a name="lin"></a>Route Codes
Maximum count of route codes:
#define MAXLINANZAHL (5000)
#define LINBZLEN (12) #define LINNR_UNDEF 0 #define LINNR_MIN 1 #define LINNR_MAX (MAXLINANZAHL+MAXFZIELANZAHL+5) /* some more than needed */
<code> <Linien anz= ></code>
Parameter: anz = count of route codes = 0..MAXLINANZAHL
if (anz == 0) then the whole tag is omitted.
For each route code:
<code> <L id= name= n2= vg= hg= info= ></code>
Parameters:
Name | File Format | Needed | Value | Default | Meaning |
---|---|---|---|---|---|
id | all | yes | LINNR_MIN..LINNR_MAX | no | unique identifier (also unique to destinations) |
name | all | yes | CHAR16[1..LINBZLEN] | no | unique <a href="#namen">name</a> (also unique to destinations) |
n2 | ≥FV_3882 | no | CHAR16[1..LINBZLEN] | empty | display name (not unique) |
vg | ≥FV_3882 | no | RGBX3 | RGBX3_TRANSPARENT | display text color (characters) |
hg | ≥FV_3882 | no | RGBX3 | RGBX3_TRANSPARENT | display background color |
info | all | no | 0..MAXINFOTEXTSIZE | 0 | length of info text in characters |
The id is used for references to this route, e.g. in <a href="#llist">route lists</a>.
When erasing a route from the route data, it has to be deleted from all references too
(trains, turnouts, timing points etc.). When renaming, then change the name only, but the id remains.
If the colors are equal RGBX3_TRANSPARENT then they are not used. Other special values of <a href="#farben">RGBX3</a> type are invalid here.
If info > 0 then the info text follows as the data of the tag, see <a href="#textinfo">info texts</a>. The real length value is unimportant.
<a name="fziel"></a>Destinations
#define MAXFZIELANZAHL (5000) /* max. count of destinations */ #define FZIELNAMELEN (32) #define FZIELKNAMELEN (8)
<code> <Ziele anz= ></code>
Parameter: anz = count of destinations = 0..MAXFZIELANZAHL
if (anz == 0) then the whole tag is omitted.
For each destination:
<code> <Zi id= name= n2= n3= n4= nk= ></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
id | yes | LINNR_MIN..LINNR_MAX | no | unique identifier (also unique to route codes) |
name | yes | CHAR16[1..FZIELNAMELEN] | no | unique name (also unique to route codes) |
n2 | no | CHAR16[1..FZIELNAMELEN] | empty | 2nd name (also unique to route codes) |
n3 | no | CHAR16[1..FZIELNAMELEN] | empty | 3rd name (also unique to route codes) |
n4 | no | CHAR16[1..FZIELNAMELEN] | empty | 4th name (also unique to route codes) |
nk | no | CHAR16[1..FZIELKNAMELEN] | empty | short name (also unique to route codes) |
The id is used for references to this destination, e.g. in <a href="#llist">route lists</a>.
When erasing a destination, it has to be deleted from all references too
(trains, turnouts, timing points, trains etc.). When renaming, then change the name only, but the id remains.
When setting a name to empty, then shift the next ones in a suitable way, e.g. when n2=empty but n3="Abc" then set n2="Abc" and n3=empty.
<a name="netz"></a>Layout Data (Lines, Elements)
<a name="netzelem"></a>Coding of elements
All elements of the layout are of WORD16 size.
Bits15..0 | Hex code | Used for |
---|---|---|
00-- ---- ---- ---- | 0x0000-0x31FF | 32 × 0x200 standard driving way, not locked |
0011 ---- ---- ---- | 0x3200-0x3907 | 20 × 90 user-defined driving way, not locked |
0011 ---- ---- ---- | 0x3908-0x3FFF | not used |
01-- ---- ---- ---- | 0x4000-0x71FF | standard driving way, locked |
0111 ---- ---- ---- | 0x7200-0x7907 | user-defined driving way, locked |
0011 ---- ---- ---- | 0x7908-0x7FFF | not used |
10-- ---- ---- ---- | 0x8000-0xBFFF | not used inside layout files, however some more are used while running the simulation |
110- ---- ---- ---- | 0xC000-0xD8FF | standard scenic elements (Bit0 = mostly for mirrored or similar) |
11-- ---- ---- ---- | 0xD900-0xFFAB | 110 × 90 user-defined scenic elements (Bit0 = often used for mirrored) |
1111 ---- ---- ---- | 0xFFAC-0xFFFF | not used |
Some element codes:
Name | Hex code | Meaning |
---|---|---|
MIN_FAHRWEG..MAX_FAHRWEG | 0x0000..0x3FFF | driving way elements (without locking) |
MIN_SCHIENE..MAX_SCHIENE | 0x0000..MAX_GLEIS_BBK | track elements (rails) |
MIN_GLEIS_STR..MAX_GLEIS_STR | 0x0000..0x0FFF | track elements (rails on road) |
MIN_GLEIS_STR1..MAX_GLEIS_STR1 | 0x0000..0x01FF | track elements (rails on road1, dark grey) |
MIN_GLEIS_STR1RD..MAX_GLEIS_STR1RD | 0x0200..0x03FF | track elements (rails on road1, dark grey, with additional borders) |
MIN_GLEIS_STR2..MAX_GLEIS_STR2 | 0x0400..0x05FF | track elements (rails on road2, light grey - dark grey) |
MIN_GLEIS_STR2RD..MAX_GLEIS_STR2RD | 0x0600..0x07FF | track elements (rails on road2, light grey - dark grey, with additional borders) |
MIN_GLEIS_STR3..MAX_GLEIS_STR3 | 0x0800..0x09FF | track elements (rails on road3, dark red - dark grey) |
MIN_GLEIS_STR3RD..MAX_GLEIS_STR3RD | 0x0A00..0x0BFF | track elements (rails on road3, dark red - dark grey, with additional borders) |
MIN_GLEIS_STR4..MAX_GLEIS_STR4 | 0x0C00..0x0DFF | track elements (rails on road4, concrete grey) |
MIN_GLEIS_STR4RD..MAX_GLEIS_STR4RD | 0x0E00..0x0FFF | track elements (rails on road4, concrete grey, with additional borders) |
MIN_GLEIS_BBK..MAX_GLEIS_BBK | 0x1000..0x17FF | track elements (rails on own trackbed) |
MIN_GLEIS_BBK0..MAX_GLEIS_BBK0 | 0x1000..0x11FF | track elements (rails on own trackbed, grey sleepers) |
MIN_GLEIS_BBK1..MAX_GLEIS_BBK1 | 0x1200..0x13FF | track elements (rails on own trackbed, brown sleepers) |
MIN_GLEIS_BBK2..MAX_GLEIS_BBK2 | 0x1400..0x15FF | track elements (rails on own trackbed, grassy) |
MIN_GLEIS_BBK3..MAX_GLEIS_BBK3 | 0x1600..0x17FF | track elements (rails on own trackbed, less sleepers) |
MIN_WASSER..MAX_WASSER | 0x1C00..0x1FFF | track elements (water) |
MIN_WASSER0..MAX_WASSER0 | 0x1C00..0x1DFF | track elements (water, without border) |
MIN_WASSER0RD..MAX_WASSER0RD | 0x1E00..0x1FFF | track elements (water, with additional border) |
MIN_BUS..MAX_BUS | 0x2000..0x31FF | track elements (bus way) |
MIN_BUS_STR..MAX_BUS_STR | 0x2000..0x2FFF | track elements (road) |
MIN_BUS_STR1..MAX_BUS_STR1 | 0x2000..0x21FF | track elements (bus road1, dark grey) |
MIN_BUS_STR1RD..MAX_BUS_STR1RD | 0x2200..0x23FF | track elements (bus road1, dark grey, with additional borders) |
MIN_BUS_STR2..MAX_BUS_STR2 | 0x2400..0x25FF | track elements (bus road2, light grey - dark grey) |
MIN_BUS_STR2RD..MAX_BUS_STR2RD | 0x2600..0x27FF | track elements (bus road2, light grey - dark grey, with additional borders) |
MIN_BUS_STR3..MAX_BUS_STR3 | 0x2800..0x29FF | track elements (bus road3, dark red - dark grey) |
MIN_BUS_STR3RD..MAX_BUS_STR3RD | 0x2A00..0x2BFF | track elements (bus road3, dark red - dark grey, with additional borders) |
MIN_BUS_STR4..MAX_BUS_STR4 | 0x2C00..0x2DFF | track elements (bus road4, concrete grey) |
MIN_BUS_STR4RD..MAX_BUS_STR4RD | 0x2E00..0x2FFF | track elements (bus road4, concrete grey, with additional borders) |
MIN_BUS_FWEG..MAX_BUS_FWEG | 0x3000..0x31FF | track elements (bus path) |
MAX_FAHRWEG_STD | MAX_BUS_FWEG = 0x31FF | maximum standard track element |
SYMDIFF_GLBLK | 0x0200 | length of blocks of driving way symbols of same function |
GLEIS_STRRD | 0x0200 | bit to mark versions with additional road borders |
SYM_RES | 0x4000 | bit to mark <a href="#res">reservation</a> (locked way elements), see also <a href="#zuege">train data</a> |
MIN_FAHRWEG_USER | MAX_FAHRWEG_STD+1 = 0x3200 | first user-defined way element |
ANZAHL_FAHRWEG_USER | NUTZERFWEG_DATEIZAHL × NUTZERFWSYMZAHL_PER_DATEI = 20×90 = 1800 | max. count of user-defined way elements per layout |
MAX_FAHRWEG_USER | MIN_FAHRWEG_USER + ANZAHL_FAHRWEG_USER - 1 | last user-defined way element |
MIN_FAHRWEG_USER..MAX_FAHRWEG_USER | 0x3200..0x3907 | user-defined way elements |
For any simple straight standard driving way elements, the bits2..0 define the <a href="#richtg">direction</a> (direction of effect). Codes for directions by 1 bit per direction:
( 1 << ( driving_way_symbol & 7 )) = 2^(driving_way_symbol & 7)
At curves, turnouts, crossings and some other special situations,
the interpretation is different. You find the complete list in the <a href="#elemweg">appendix</a>.
For user-defined way elements, there is no correlation between code and function.
More element codes (not all are really used):
Name | Hex code | Meaning |
---|---|---|
MINLSYMBOL..MAXLSYMBOL | 0xC000..0xFFFF | scenic elements |
LSYMBLOCKLEN | 0x0100 | maximum length for each group of scenic elements (except user-defined) |
LSYM_SONDER..+LSYMBLOCKLEN-1 | 0xC000..0xC0FF | special elements |
SYM_LEER | 0xC000 | empty element, opaque |
SYM_GLASFREI | 0xC001 | empty, completely transparent |
SYM_GLASBLAU | 0xC002 | empty, transparent "behind glass" |
LSYM_STR1..+LSYMBLOCKLEN-1 | 0xC100..0xC1FF | roads 1 (dark grey) |
LSYM_STR2..+LSYMBLOCKLEN-1 | 0xC200..0xC2FF | roads 2 (light grey - dark grey) |
LSYM_STR3..+LSYMBLOCKLEN-1 | 0xC300..0xC3FF | roads 3 (red - dark grey) |
LSYM_STR4..+LSYMBLOCKLEN-1 | 0xC400..0xC4FF | roads 4 (concrete grey) |
LSYM_BRUECKEN..+LSYMBLOCKLEN-1 | 0xC500..0xC5FF | some bridges/gates that are no way elements |
LSYM_H2OGROSS..+LSYMBLOCKLEN-1 | 0xC600..0xC6FF | water (areas) |
LSYM_H2OKLEIN..+LSYMBLOCKLEN-1 | 0xC700..0xC7FF | water (small, brook, fountains) |
LSYM_BAUM..+LSYMBLOCKLEN-1 | 0xC800..0xC8FF | trees |
LSYM_WTIERE..+LSYMBLOCKLEN-1 | 0xC900..0xC9FF | animals, wild |
LSYM_HTIERE..+LSYMBLOCKLEN-1 | 0xCA00..0xCAFF | animals, domestic |
LSYM_INDALT..+LSYMBLOCKLEN-1 | 0xCB00..0xCBFF | industry, old design |
LSYM_INDNEU..+LSYMBLOCKLEN-1 | 0xCC00..0xCCFF | industry, more modern design |
LSYM_BAHNPV..+LSYMBLOCKLEN-1 | 0xCD00..0xCDFF | railway-related buildings, public, passenger service |
LSYM_BAHNGV..+LSYMBLOCKLEN-1 | 0xCE00..0xCEFF | railway-related buildings, public, freight service |
LSYM_BAHNDI..+LSYMBLOCKLEN-1 | 0xCF00..0xCFFF | railway-related buildings, non-public (workshops, maintenance, signal boxes...) |
LSYM_KIRCHEN..+LSYMBLOCKLEN-1 | 0xD000..0xD0FF | buildings of religious kind (churches...) |
LSYM_DORF..+LSYMBLOCKLEN-1 | 0xD100..0xD1FF | houses village-typical |
LSYM_HAUS1..+LSYMBLOCKLEN-1 | 0xD200..0xD2FF | residential houses, single |
LSYM_HAUSALT..+LSYMBLOCKLEN-1 | 0xD300..0xD3FF | residential houses, blocks, old |
LSYM_HAUSMITT..+LSYMBLOCKLEN-1 | 0xD400..0xD4FF | residential houses, blocks, middle |
LSYM_HAUSNEU..+LSYMBLOCKLEN-1 | 0xD500..0xD5FF | residential houses, blocks/single/large, modern |
LSYM_KAUFKAUF..+LSYMBLOCKLEN-1 | 0xD600..0xD6FF | shops/restaurants/offices |
LSYM_FELDWEG..+LSYMBLOCKLEN-1 | 0xD700..0xD7FF | path (scenic, no driving way) |
LSYM_WIESE..+LSYMBLOCKLEN-1 | 0xD800..0xD8FF | fields/meadows |
NUTZERGSYMZAHL_PER_DATEI | 90 | number of user-defined scenic elements per file |
USERLSYMBOLZAHL | NUTZERGZGSATZ_DATEIZAHL × NUTZERGSYMZAHL_PER_DATEI = 110×90 = 9900 | summary count of user-defined scenic elements per layout |
MINUSERLSYMBOL | 0xD900 | first user-defined scenic element |
MAXUSERLSYMBOL | MINUSERLSYMBOL + USERLSYMBOLZAHL - 1 | last user-defined scenic element |
MINUSERLSYMBOL..MAXUSERLSYMBOL | 0xD900..0xFFAB | user-defined scenic elements |
<a name="netzq"></a>Storing of elements
The layout is similar to a chessboard, but a bit larger and using multiple levels. The great chessboard is divided into small non-overlapping chessboards of one level each, so-called quadrants.
#define QUADR_BREITE 32 /* Elements West-East */ #define QUADR_HOEHE 32 /* Elements North-South */
The quadrants are stored from level NETZEBENE_MIN to NETZEBENE_MAX, from North to South (0..NETZHOEHE-1), from West to East (0..NETZBREITE-1). If a quadrant consists of empty elements only (SYM_LEER) then it is omitted completely.
<code> <Netz typ= dx= dy= dz= anz= ></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
typ | yes | "QU32" | - | identifier |
dx | yes | 32 | - | standard quadrant width (West-East) |
dy | yes | 32 | - | standard quadrant depth (North-South) |
dz | yes | 1 | - | standard quadrant hight (levels) |
anz | yes | INT32 ≥ 0 | - | count of really stored (non-empty) quadrants not really used, but must exist (BAHN stores the current value but does not use it on load) |
If (anz == 0) then the whole section is omitted. This is marked also in section <a href="#allg">general data</a> at borders/extent.
Single quadrant
<code> <Q k3= dx= dy= e1= e2= e3= e4= > </code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
k3 | yes | KOORD3 | - | position of the North-West corner |
dx | no | 1..QUADR_BREITE | QUADR_BREITE | quadrant width (West-East) |
dy | no | 1..QUADR_HOEHE | QUADR_HOEHE | quadrant depth (North-South) |
e1 | no | WORD16, hex | SYM_LEER | most frequent element in the quadrant |
e2 | no | WORD16, hex | no element | 2nd most frequent element in the quadrant |
e3 | no | WORD16, hex | no element | 3rd most frequent element in the quadrant |
e4 | no | WORD16, hex | no element | 4th most frequent element in the quadrant |
By definition of QUADR_BREITE and QUADR_HOEHE, the nx and ny coordinates are multiples of 32 always. However, if complete lines or columns at the border are empty, then the quadrant will be reduced by them. In this case, the nx or ny or both are increased and the dx or dy or both get less than 32.
There follow all the elements from North West corner to South East corner, one line after the other. In principle, these are WORD16[dx × dy]. However, to pack the large amount of data, many of these words are substituted by some abbreviation symbols (all numerical values "n" as hex code):
Symbol | Count | Meaning |
---|---|---|
hex number | 1 | element of this code, we use always Capital A..F as hex digits here |
g..k | 1..5 | e1 element (mostly SYM_LEER, but maybe e.g. a water area too) |
l..p | 1..5 | e2 element, e.g. "m" means e2[2] |
q..u | 1..5 | e3 element, e.g. "q" means e3[1] |
v..z | 1..5 | e4 element |
[n] | 6+n | e1 element, e.g. "[0]" means e1[6] |
(n) | 6+n | e2 element, e.g. "(2)" means e2[8] |
[n) | 6+n | e3 element |
(n] | 6+n | e4 element |
+ | 1 | previous element +1, e.g. "1000+" means {0x1000,0x1001} |
- | 1 | previous element -1, e.g. "1000-" means {0x1000,0x0FFF} |
+n | 1 | previous element +(n+1), e.g. "1000+1" means {0x1000,0x1002} |
-n | 1 | previous element -(n+1), e.g. "2005-2" means {0x2005,0x2002} |
, | 1 | separator between elements, can be omitted if next element starts with no hex digit |
: | 2 | instead of comma, repeat previous element, e.g. "1005:" means {0x1005,0x1005} |
. | 3 | instead of comma, repeat previous element twice, e.g. "2010." means 0x2010[3] |
* | 4 | instead of comma, repeat previous element ×3 |
At end of line the packing is not broken.
<a name="zuege"></a>Train Data
<code><Zuege anz= ></code>
Parameter: anz = count of stored trains
If (anz == 0) then the whole section is omitted.
Each train consists of a head, at least one section, the train tail and at least one vehicle. The train is embraced in <Zug>..</Zug>
Trains are sorted by base route code and train number.
<a name="zugkallg"></a>Train head, general data
#define ZUG_ANZAHL_MAX (100000) /* max. count of trains */ #define ZUG_ID_UNDEF 0 #define ZUG_ID_MIN (1) #define ZUG_ID_MAX (ZUG_ID_MIN + ZUG_ANZAHL_MAX - 1) #define ZUGNUMMER_MIN (1) /* min. train number */ #define ZUGNUMMER_MAX (99999) #define ZUGNUMMER_UNDEF (0) #define MAXZUGGSYM 200 /* max. count of elements needed for a train */ #define MAXZUGFSYM 200 /* max. count of vehicles of a train */ #define STAT_UNTW 0x00000000 on the way without other special properties #define STAT_EINR 0x00000001 going off-duty (then see following values) #define STAT_EING 0x00000002 off-duty (parked in depot) #define STAT_HHST 0x00000004 halted (at stopping point/station) #define STAT_HEND 0x00000008 halted at timing point #define STAT_RES 0x00000010 train has locked/reserved following line #define STAT_RUECKW 0x00000020 train is running backwards (only important for display in train table) #define STAT_STOP 0x00000080 train is stopped, steam locos don't smoke #define STAT_AUSR 0x00000400 train is going on-duty #define STAT_RG 0x00000800 train is in coupling status #define STAT_DPAUSF 0x00001000 train is waiting for "clear" when leaving a depot. it is no more "off-duty", however still invisible (occurs when depot is combined with signal system, mostly displayed as STAT_BLOCK) #define STAT_BLOCK 0x00002000 train is blocked (by another train, "danger" signal etc.) #define STAT_HHST2 0x00004000 train has served double stop, i.e. ignore next stop also used for triple stop #define STAT_DIENSTF 0x00008000 train is travelling as non-revenue trip used only together with STAT_EINR or STAT_AUSR #define STAT_HABF 0x00010000 immediate status between _HHST/_HEND and the real departure. is set for the time while the departure sound is played. (if sound duration == 0 then change to STAT_UNTW immediatly without _HABF) #define STAT_HRANG 0x00020000 stopped while shunting: nearly the same as _HHST, but there is no sound played at the end #define STAT_TUER_O 0x00100000 some doors are open, side is specified by STAT_TUER_L/_R only used with STAT_HHST, _HABF, _HEND #define STAT_TUER_L 0x00040000 doors on the left side are/were open #define STAT_TUER_R 0x00200000 doors on the right side are/were open only used with STAT_TUER_O or after: it is not cleared after closing the doors to inform a 2nd/3rd train about side at a double/triple stop #define STAT_ABFWD 0x00080000 turn backwards on start only used with STAT_HHST or _HABF #define MIN_HSTMINMAX 1 stop time interval minimum value (sec) #define MAX_HSTMINMAX 960 stop time interval maximum value (sec) #define ZUGGAT_KEINE 0 /* no train species/priority (e.g. as return code) */ #define ZUGGAT_MIN 1 /* smallest train priority */ #define ZUGGAT_MAX 10 /* highest train species */ #define ZUGGAT_ANZAHL (ZUGGAT_MAX-ZUGGAT_MIN+1) /* count of different train specie */ #define ZUGGAT_NV1 1 /* local/commuter / tram/streetcar / metro */ #define ZUGGAT_NV2 2 /* ditto (e.g. B train on A/B technique) */ #define ZUGGAT_BNV 3 /* accelerated */ #define ZUGGAT_REG 4 /* regional */ #define ZUGGAT_EIL 5 /* semi fast */ #define ZUGGAT_D1 6 /* fast / Interregio */ #define ZUGGAT_D2 7 /* high distance / Interregio */ #define ZUGGAT_EX1 8 /* express / IC/EC / */ #define ZUGGAT_EX2 9 /* high speed / ICE/TGV / TEE */ #define ZUGGAT_EX3 10 /* express high speed / Sprinter-ICE */ #define ZUGKAT_KEINE 0 /* no train category, (i.e. as return code) */ #define ZUGKAT_MIN 1 /* smallest category value */ #define ZUGKAT_MAX 3 /* highest category value */ #define ZUGKAT_ANZAHL (ZUGKAT_MAX-ZUGKAT_MIN+1) /* count of different categories */ #define ZUGKAT_REISE 1 passenger service #define ZUGKAT_GUETER 2 freight/goods/cargo, ignore stopping points #define ZUGKAT_SONDER 3 special service, ignore stopping and timing points #define ZUGEIG_NORMAL 0 train properties, standard value #define ZUGEIG_WDZR 4 shuttle train (Push-Pull-train) #define ZUGEIG_KVFWS 8 don't keep crossings free #define FW_KEIN 0x0000 no driving way #define FW_SCHIENE 0x0001 tracks / rails #define FW_WASSER 0x0002 water #define FW_BUS 0x0004 road / path #define MAX_RESLEN 10000 max. length of section to reserve (lock), in elements Values for measurement of blockage time: #define MIN_BLOCKZEIT 0 =out of service, valid value #define MAX_BLOCKZEIT (24*60*60) =24h (sec) #define MAX_TFSEC 100 #define MIN_ZEITEINHEITMS (1000/MAX_TFSEC) /* 10ms */ #define ZUGSOUNDTEST_DELTA (10) #define LAEUTZEIT_UNDEF (-1) #define LAEUTZEIT_NEXT (+1)
<code> <Zug id= li= nr= zi= fstr= ele= elrg= fzge= dp_h= stat= dp_z= kat= gat= eig= hst= h_zlr= t_pl= fweg= elres= pos_l= rixy= riz= blmax= t_bl= pf2z= bim= info= > </code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
id | yes | ZUG_ID_MIN..ZUG_ID_MAX | - | unique identifier |
li | yes | LINNR_MIN..LINNR_MAX[2] | - | base and current route codes (divided by comma), if both are equal then base only |
nr | yes | ZUGNUMMER_MIN..ZUGNUMMER_MAX | - | train number |
zi | no | LINNR_MIN..LINNR_MAX | LINNR_UNDEF | destination |
fstr | no | MIN_SIGOBJ_NUMMER..MAX_SIGOBJ_NUMMER or SIGSYSNR_UNDEF | SIGSYSNR_UNDEF | currently assigned itinerary (the one that defines the current itinerary speed limit, i.e. the one beginning at last recently passed start signal) |
ele | no | 1..MAXZUGGSYM | 1 | minimum number of elements needed for the train
(if pos_l > 0, then at the train's end an additional element can be covered. This must be calculated from pos_l + summary length of the vehicles. Calculate with SYMBREITE = 32 pixels per way element) |
elrg | no | 0..fzge-1 | 0 | shunting length |
fzge | no | 1..MAXZUGFSYM | 1 | number of vehicles |
dp_h | no | <a href="#dpgl">DPGL</a> | DEPOTNR_UNDEF:DEPOT_ALLEGLEISE | home depot and track |
stat | no | INT32, hex | STAT_UNTW | status, combination of STAT_xxx bits |
dp_z | if (stat & STAT_EINR) | DPGL | DEPOTNR_UNDEF:DEPOT_ALLEGLEISE | destination depot and track (if track undefined then use standard track of the depot) |
kat | no | ZUGKAT_MIN..ZUGKAT_MAX[2] | ZUGKAT_REISE, ZUGKAT_REISE | train species (base and current when different) |
gat | no | ZUGGAT_MIN..ZUGGAT_MAX[2] | ZUGGAT_NV1, ZUGGAT_NV1 | train priority (base and current when different) |
eig | no | ZUGEIG_xxx | ZUGEIG_NORMAL | train properties |
hst | no | MIN_HSTMINMAX..MAX_HSTMINMAX[2] | MIN_HSTMINMAX,MIN_HSTMINMAX | stop time interval in sec, 2nd value only if different |
h_zlr | no | INT32 ≥ 0 | 0 | backwards counter (sec) for stat == STAT_HHST, _HRANG, _HABF further used as buffer for coupling time in couple status (STAT_RG): the coupling time is stored here until the coupling will take place really; if > 0, then after coupling the train changes to STAT_HRANG, using this value as waiting time. |
t_pl | no | INT32 | -1 | departure time, if arrived late at timing point and serving it as a stop only in seconds, max. 24×60×60 i.e. one day, if undefined == -1 |
fweg | no | FW_SCHIENE, FW_WASSER or FW_BUS | FW_SCHIENE | driving way (exactly one) |
elres | if (stat & STAT_RES) | 0..MAX_RESLEN | 0 | remaining length of <a href="#res">reserved way section</a>, in elements |
pos_l | no | 0,4,8,12,16,20,24,28 | 0 | local position of train's head in the driving way element:0 = train starts at the element's border, >0 = train begins later |
rixy | no | RICHTUNG_MIN..RICHTUNG_MAX | 0 | <a href="#richtg">direction</a> of travel (nx, ny) |
riz | no | -1,0,+1 | 0 | direction of travel, nz (level) |
blmax | no | MIN_BLOCKZEIT..MAX_BLOCKZEIT | MIN_BLOCKZEIT | Maximum value of blockage time in sec |
t_bl | if (stat & (STAT_BLOCK | STAT_DPAUSF) ) && (blmax > MIN_BLOCKZEIT )) | MIN_BLOCKZEIT..MAX_BLOCKZEIT | 0 | Time in seconds that the train is still waiting in status "blocked" or "waiting at depot exit" (set to 0 when moving the first step) |
pf2z | no | INT32 ≥0 | 0 | counter (countdown) for starting a 2nd horn, =0 when no >0 value in MIN_ZEITEINHEITMS (10ms) simulation time, but counted in steps of ZUGSOUNDTEST_DELTA |
bim | no | LAEUTZEIT_UNDEF or LAEUTZEIT_NEXT | LAEUTZEIT_UNDEF | =LAEUTZEIT_UNDEF continuous ringing bell is off =LAEUTZEIT_NEXT continuous ringing bell is on |
info | no | 0..MAXINFOTEXTSIZE | 0 | length of info text in characters |
<a name="zugkv"></a>Train head, speed data
#define V_GENAU 1000 #define MIN_VMAX 1 / V_GENAU /* km/h */ #define MAX_VMAX (600) /* km/h */ #define VMAX_UNDEF 0 #define BSL_MIN 0.05 /* m/s² */ #define BSL_MAX 3.00 /* m/s² */ #define BSL_UNDEF 0
Speed values in km/h, with up to 3 digits after decimal point
Acceleration values in m/s², with up to 2 digits after decimal point
<code> <v max= akt= la= vsig= psig= fstr= zlr= af= br= /> </code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
max | yes | MIN_VMAX..MAX_VMAX | - | maximum speed |
akt | no | 0 or MIN_VMAX..MIN_VMAX | 0 | current speed, >0 when train is travelling |
la | no | VMAX_UNDEF or MIN_VMAX..MIN_VMAX | VMAX_UNDEF | speed limit set last recently passed speed restriction
(in a wider sense: can be set also at stopping points, timing points, depots) |
vsig | no | VMAX_UNDEF or MIN_VMAX..MIN_VMAX | VMAX_UNDEF | speed limit by last recently passed distant/combined signal showing "Caution" |
psig | no | VMAX_UNDEF or MIN_VMAX..MIN_VMAX | VMAX_UNDEF | speed limit for permissive running, set by last recently passed stop signal showing "Danger" |
fstr | no | VMAX_UNDEF or MIN_VMAX..MIN_VMAX | VMAX_UNDEF | speed limit for current itinerary, set by last recently passed start signal showing "Clear" |
zlr | no | INT32 | 0 | counter for control of speed/time, only if akt >0 (The internal clock of BAHN simulation time is running in steps. For each step the counter of the trains is reduced and in case of <0 an action may be taken, e.g. =moving one step and setting zlr to a new value) |
af | no | BSL_UNDEF or BSL_MIN..BSL_MAX | BSL_UNDEF | acceleration to speed up, BSL_UNDEF="infinite" |
br | no | BSL_UNDEF or BSL_MIN..BSL_MAX | BSL_UNDEF | deceleration (acc. to brake), BSL_UNDEF="infinite" |
<a name="zugkea"></a>Train head, data to go on/off service
#define MAX_ARERDAT 6 max. number of on/off duty data sets per train
<code> <Ar anz= > <Er anz= > </code>
"Ar" = "Ausrücken" = go on service
"Er" = "Einrücken" = go off duty (to depot)
Parameter anz = 1..MAX_ARERDAT = count of lines (empty lines are omitted)
For each line:
<code><Z nr= t= dp= df= /></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
nr | yes | 0..MAX_ARERDAT-1 | - | line number, zero based |
t | yes | <a href="#zeit">ZEIT4</a> | - | time (multiple days possible, sec ignored always = 0) |
dp | yes | <a href="#dpgl">DPGL</a> | - | depot and track |
df | no | 0 or 1 | 0 | 1 = as non-revenue trip (0 = with passengers) |
Train head, info text
<code><Info>..</Info></code>
The tag exists only if train head info>0. The exact length value is ignored. See <a href="#textinfo">info texts</a>.
<a name="zugt"></a>Train, elements
Here, the element positions are stored that are covered by the train. When parked in depot (stat & STAT_EING) then only the first one is stored. Otherwise, the count is head.ele+1, the order from train's head to tail.
<code><Ele>..</Ele></code>
For each element:
<code><s k3= /></code> or <code> <u k3= /></code>
"s" = visible, "u" = invisible.
"Invisible" may occur when leaving or entering a depot.
For the last element, it is also set when this element is not needed
because the train already did leave it completely.
This depends on the length of vehicles and the local position, see <a href="#zugkallg">train head</a>
ele and pos_l.
The parameter k3 stores the <a href="#k3">coordinates</a>.
<a name="zugf"></a>Train, vehicles
#define FZG_ANZAHL_MAX (200000) maximum count of vehicles #define FZG_ID_UNDEF 0 #define FZG_ID_MIN (1) #define FZG_ID_MAX (FZG_ID_MIN + FZG_ANZAHL_MAX - 1) #define FMSP1BREITE 8 pixels scale 1:1 #define MAXFSYMLEN 32 units of FMSP1BREITE #define MIN_FZGLEN 8 minimum length pixels scale 1:1 #define MAX_FZGLEN (MAXFSYMLEN * FMSP1BREITE) maximum length pixels scale 1:1 #define NUTZERFMSPSATZNR_PRODATEI 10 max. count of sets per .nfz file #define FZGF_MAXFZGZAHL 16 max. count of vehicles per set #define MINSTDFMSPSATZNR383 (4096 << 4) min. set number of standard vehicles #define MAXSTDFMSPSATZNR383 (65534 << 4) max. set number of standard vehicles
<code><Fzg>..</Fzg></code>
For each vehicle:
<code><F id= dt= ty= ln= rw= li= /></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
id | yes | FZG_ID_MIN..FZG_ID_MAX | - | unique identifier (needed although not used in BAHN 3.88r1) |
dt | no | 0..NUTZERZGGSATZ_DATEIZAHL-1 | -1 | file number (-1=standard, ≥0=user-defined) |
ty | yes | INT32[2] | -, 0 | 1st value: set number, 0..NUTZERFMSPSATZNR_PRODATEI-1 for user-defined 2nd value: local number in the set, 0..FZGF_MAXFZGZAHL-1, if =0 then omitted |
ln | yes | MIN_FZGLEN..MAX_FZGLEN | - |
Length of the vehicle in pixels, calculated for West-East view in 1:1 scale (even numbers recommended) |
rw | no | 0 or 1 | 0 | 1=travelling backwards (important for graphics only) |
li | no | 0 or 1 | 1 | 0=light is off (important for graphics only) |
<a name="res"></a>Reservation of lines (Locking)
If the train reserved a line section, then the status bit STAT_RES is set in the train head. The line section has to be marked by SYM_RES bit completely in the layout data. When moving on the last element of the locked section, the status bit in the train head will be cleared. The SYM_RES-bit of the driving way is cleared when travelling on it. Junction turnouts that are located in the reserved line must be blocked. Otherwise, a time-dependent change of the train's way (e.g. going off-duty) could cause the train leaving the reserved line. In that case, the line would not be cleared. A train that does not own a set STAT_RES bit, will not move on reserved lines. If clearing the STAT_RES bit (e.g. when turning ahead, erasing train on the line, going off-duty manually, following by manual control), the locked line must be released.
<a name="wei"></a>Turnouts (Points/Switches)
Minimum turnout number:
#define MINWEICHENNUMMER 1
Maximum turnout number:
#define MAXWEICHENNUMMER 0x0003FfFf /* (=262143) <a href="#fversion">file format</a> < FV_3882 */
#define MAXWEICHENNUMMER 0x0007FfFf /* (=524287) file format ≥ FV_3882 */
Maximum count of turnouts:
#define MAX_WEIZAHL (MAXWEICHENNUMMER-MINWEICHENNUMMER+1)
These numbers and limits are used together with <a href="#krzfs">itinerary crossings</a>. The numbers should be assigned unique.
#define WEINUMMER_UNDEF 0 #define DKWPOS_KEINE 0 /* simple turnout */ #define DKWPOS_ZWEIG1 1 /* part 1 (English points, combined points) */ #define DKWPOS_ZWEIG2 2 /* part 2 (ditto) */ #define DKWPOS_ZWEIG3 3 /* part 3 (only double English) */ #define DKWPOS_ZWEIG4 4 /* part 4 (ditto) */ #define WEI_FORM_0 0 all ways, all turnout constructions: without platform #define WEI_FORM_1_B 1 all ways: with platform turnouts 45 degrees simple: platform straight (dir.1) Y-turnouts: platform to left (dir.1) 3-way-turnouts: platform to left (dir.2) double slip turnouts: one side simple slip turnouts: the side with curve #define WEI_FORM_2_B 2 all ways: with platform turnouts 45 degrees simple: platform turning dir. (dir.2) Y-turnouts: platform to right (dir.2) 3-way-turnouts: platform to right (dir.3) double slip turnouts: the other side simple slip turnouts: the side without curve #define WEI_FORM_MIN 0 #define WEI_FORM_MAX 2
<code> <Weichen anz= ></code>
Parameter: anz = count of turnouts = 0..MAX_WEIZAHL
if (anz == 0) then the whole tag is omitted.
The turnouts follow, sorted by number.
All Turnouts own the general data. Some have additional data, for each following after the general ones.
<a name="weiallg"></a>Turnouts, General data
<code> <? k3= nr= kp= r0= r1= r2= r3= bf= ></code>
The tag name self defines the turnout type:
Name | Type |
---|---|
u | trailing point driven only |
a | sprung turnout, direction 1 |
b | sprung turnout, direction 2 |
c | sprung turnout, direction 3 |
A | junction/branching, main direction 1 |
B | junction/branching, main direction 2 |
C | junction/branching, main direction 3 |
W | alternating turnout |
Z | random turnout |
T | train-type turnout |
S | signal dependent turnout |
F | itinerary turnout |
Parameters:
Name | File format | Needed | Value | Default | Meaning |
---|---|---|---|---|---|
k3 | all | yes | KOORD3 | - | position (<a href="#k3">coordinates</a>) |
nr | all | yes | MINWEICHENNUMMER..MAXWEICHENNUMMER | - | unique number |
kp | all | no | DKWPOS_KEINE or DKWPOS_ZWEIG1..DKWPOS_ZWEIG4 | DKWPOS_KEINE | position as part of English points or combined turnout (DKWPOS_KEINE = is not part of a slip turnout, DKWPOS_ZWEIG1..4 = is part a..d) |
r0 | <FV_3881 | yes | <a href="#richtg">RICHTUNGBIT_nn</a> | - | departure direction when passing trailing-point |
r1 | <FV_3881 | no | RICHTUNGBIT_nn | opposite to r0 | departure direction 1 when passing facing (if there is a straight on way, then this) |
r2 | <FV_3881 | yes | RICHTUNGBIT_nn | - | departure direction 2 when passing facing |
r3 | <FV_3881 | no | RICHTUNGBIT_nn | RICHTUNGBIT_KEINE | departure direction 3 when passing facing (used only at 3-way-turnout) |
r0 | ≥FV_3881 | yes | <a href="#richtg">RICHTUNG_nn</a> | - | departure direction when passing trailing-point |
r1 | ≥FV_3881 | no | RICHTUNG_nn | opposite to r0 | departure direction 1 when passing facing (if there is a straight on way, then this) |
r2 | ≥FV_3881 | yes | RICHTUNG_nn | - | departure direction 2 when passing facing |
r3 | ≥FV_3881 | no | RICHTUNG_nn | RICHTUNG_KEINE | departure direction 3 when passing facing (used only at 3-way-turnout) |
bf | all | no | WEI_FORM_MIN..WEI_FORM_MAX | WEI_FORM_MIN | graphical version (design) |
With <a href="#fversion">file format</a> FV_3881 the direction data have been changed from RICHTUNGBIT_nn to RICHTUNG_nn here.
At double English turnouts there are the parts a..d, but simple ones and combined turnouts own a+b only. All of these must exist and stand in the order a..d. The turnout number and the coordinates of all parts of one turnout are equal. Combined turnouts work like "bent English points".
<a name="weivz"></a>Junction/Branching, additional data
Reservation status:
<code><R>..</R></code>
value = 1, 2 or 3: Turnout has been locked and must be driven to direction 1/2/3.
On passing the status needs to be cleared.
This algorithm is needed because between locking and driving on there may be exceeded
a time interval begin/end (see <a href="#res">reservation of lines</a>).
value = 0: Turnout is not locked, the whole tag is omitted.
There follow <a href="#llist">route lists</a> and <a href="#dlist">depot lists</a>, each for the facing directions 1, 2 and 3.
<code><LL1>..</LL1></code> <code><LL2>..</LL2></code> <code><LL3>..</LL3></code> <code><DL1>..</DL1></code> <code><DL2>..</DL2></code> <code><DL3>..</DL3></code>
All the lists are stored only if not empty.
<a name="weiwx"></a>Alternating turnout, additional data
#define MAX_WXLWEI_RI 99 Maximum value for counter at alternating turnouts
<code><Ww r1= r2= r3= z= ></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
r1 | no | 0..MAX_WXLWEI_RI | 1 | count of trains running to direction1 |
r2 | no | 0..MAX_WXLWEI_RI | 1 | count of trains running to direction2 |
r3 | no | 0..MAX_WXLWEI_RI | 1 | count of trains running to direction3 |
z | no | 0..r1+r2+r3-1 | 1 | counter of all together, backwards (from MaxRi1 + MaxRi2 + MaxRi3 to 1)
|
At 3-way-turnouts, at maximum one of the 3 values r1..r3 may be set =0, at all the others is r3=0 and the others are >0.
#define WXL_RESET_ZAHL 3 maximum count of lines with reset data
Reset data, for each line:
<code><R z= t= w= ></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
z | yes | 0..WXL_RESET_ZAHL-1 | - | line number, zero-based |
t | yes | <a href="#zeit">ZEIT4</a> | - | time (multiple days possible, sec ignored and =0) |
w | no | 0..r1+r2+r3-1 | 1 | reset value for counter |
<a name="weizf"></a>Random turnout, additional data
#define MAX_ZUFWEI_RI 99
<code><Zw r1= r2= r3= z= ></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
r1 | no | 0..MAX_ZUFWEI_RI | 1 | part (probability) for direction1 |
r2 | no | 0..MAX_ZUFWEI_RI | 1 | part (probability) for direction2 |
r3 | no | 0..MAX_ZUFWEI_RI | 0 | part (probability) for direction3 |
z | yes | - | the random value for the next train this is needed for checking the value multiple without changing (analoguous to alternating turnout), needed in reserved/locked sections |
The values r1..r3 are partial probabilities, refering to the summary.
I.e. the summary is defined as 100%.
One of the values can be =0. At 2-way-turnouts this is ri3.
If the value for one direction =0, then this direction is never driven.
<a name="weizt"></a>Train type turnout, additional data
#define TYPWEIRIZAHL 3 =the three directions 1,2,3
Values for train typ definitions at train type turnouts (these are different from the bits in the train head and at stopping points):
For train types: #define TYPWEI_NICHTS 0x0000 #define TYPWEI_NV1 (1<<(ZUGGAT_NV1-1)) #define TYPWEI_NV2 (1<<(ZUGGAT_NV2-1)) #define TYPWEI_BNV (1<<(ZUGGAT_BNV-1)) #define TYPWEI_REG (1<<(ZUGGAT_REG-1)) #define TYPWEI_EIL (1<<(ZUGGAT_EIL-1)) #define TYPWEI_D1 (1<<(ZUGGAT_D1 -1)) #define TYPWEI_D2 (1<<(ZUGGAT_D2 -1)) #define TYPWEI_EX1 (1<<(ZUGGAT_EX1-1)) #define TYPWEI_EX2 (1<<(ZUGGAT_EX2-1)) #define TYPWEI_EX3 (1<<(ZUGGAT_EX3-1)) #define TYPWEI_ALLGT (TYPWEI_NV1 | TYPWEI_NV2 | TYPWEI_BNV | TYPWEI_REG\ | TYPWEI_EIL | TYPWEI_D1 | TYPWEI_D2\ | TYPWEI_EX1 | TYPWEI_EX2 | TYPWEI_EX3) #define TYPWEI_MIN TYPWEI_NV1 For properties: #define TYPWEI_ARDF 0x0001 Going on-duty as non-revenue trip #define TYPWEI_ERDF 0x0002 Going off-duty as non-revenue trip #define TYPWEI_AR 0x0004 Going on-duty as normal service #define TYPWEI_ER 0x0008 Going off-duty as normal service
There follow
<code>for (k = 0; k < TYPWEIRIZAHL; k++ )</code> <code><Tw r= p= g= s= e= ></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
r | yes | 0..TYPWEIRIZAHL-1 | - | direction, zero-based |
p | no | INT32 | 0 | passenger trains, mask of TYPWEI_xxx |
g | no | INT32 | 0 | freight/goods trains, ditto |
s | no | INT32 | 0 | special trains, ditto |
e | no | INT32 | 0 | properties, mask of TYPWEI_ARDF, TYPWEI_ERDF, TYPWEI_AR, TYPWEI_ER |
Each combination of train species/category can be defined in one direction at maximum.
If no direction is set, the decision is made at random (evenly distributed).
Train type turnouts that are driven facing, should not be part of reserved (locked) line sections
(i.e. the reservation ends at the turnout, similar to signal-dependent turnouts).
The properties can be undefined: Then the train category/species is used.
<a name="weisa"></a>Signal-dependent turnout, additional data
The priority is defined by two values:
Prior1 = 1, 2 or 3 for direction 1/2/3 or = 0 for "no priority set (at random)".
Prior2 = the same, if track of Prior1 is blocked and there is a choice (3-way-turnout).
<code><P>Prior1, Prior2</P></code>
In case of Prior1=0, the whole tag is omitted. In case of Prior2=0, the 2nd value is omitted.
Direction 3 and Prior2 exist for 3-way-turnouts only. Prior2 must not be equal to Prior1.
Switching functions for directions 1..3:
<code><SF1>..</SF1></code> <code><SF2>..</SF2></code> <code><SF3>..</SF3></code>
If the <a href="#schfkt">switching function</a> of a direction is empty, then this direction is interpreted as clear and the tag is not stored.
<a name="weifs"></a>Itinerary turnout, additional data
<code><Fw p= fs= r= /></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
p | no | 1..3 | 1 | priority, direction 1..3 |
fs | no | MIN_SIGOBJ_NUMMER..MAX_SIGOBJ_NUMMER | SIGSYSNR_UNDEF | id of itinerary when currently blocked, SIGSYSNR_UNDEF = not blocked |
r | if (fs != SIGSYSNR_UNDEF) | 1..3 | 1 | if blocked, then direction |
If not blocked and p=1 then the whole tag is omitted.
There follow the <a href="#schlist">lists</a> of itineraries for directions 1..3:
<a href="#fversion">file format</a> < FV_3881:
<code><SL1>..</SL1></code> <code><SL2>..</SL2></code> <code><SL3>..</SL3></code>
file format ≥ FV_3881:
<code><FL1>..</FL1></code> <code><FL2>..</FL2></code> <code><FL3>..</FL3></code>
If a list of a certain direction is empty, then this tag is not stored.
<a name="krzfs"></a>Itinerary Crossings
Available if <a href="#fversion">file format</a> ≥ FV_3881, and already in BAHN 4.00b3.
The itinerary crossings are managed together with the <a href="#wei">turnouts</a>. They use the same numbers (unique).
<code> <Kreuzgn anz= ></code>
Parameter: anz = count of itinerary crossings = 0..MAX_WEIZAHL
if (anz == 0) then the whole tag is omitted.
The crossings follow, sorted by number.
<code> <F k3= nr= ></code>
Parameters:
Name | File format | Needed | Value | Default | Meaning |
---|---|---|---|---|---|
k3 | all | yes | KOORD3 | - | position (<a href="#k3">coordinates</a>) |
nr | all | yes | MINWEICHENNUMMER..MAXWEICHENNUMMER | - | unique number |
<code><Fw fs= /></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
fs | no | MIN_SIGOBJ_NUMMER..MAX_SIGOBJ_NUMMER | SIGSYSNR_UNDEF | id of itinerary when currently blocked, SIGSYSNR_UNDEF = not blocked |
If not blocked then the whole tag is omitted.
There follows the <a href="#schlist">list</a> of itineraries for all directions together:
<code><FL>..</FL></code>
If the list is empty, then this tag is not stored.
<a name="rangp"></a>Shunting Points (Turning Points)
#define RP_MAXZAHL 40000
Properties:
#define RPEIG_NICHTS 0x0000 nothing #define RPEIG_STANDARD (RPEIG_NICHTS) #define RPEIG_UNSICHTBAR 0x0001 shunting point is invisible #define RPEIG_ZUGENDE 0x0002 works on train's tail (otherwise on head) #define RPEIG_STD_RG 0x0004 default direction is shunting (otherwise pass straight-on)
Graphical designs:
#define RP_FORM_0 0 Str: turkey sign "H" bBK: ditto H2O: turkey buoy #define RP_FORM_1 1 Str: turkey sign "H" + platform bBK: turkey sign "H" + platform H2O: --- #define RP_FORM_2 2 Str: white half-circle plate bBK: white half-circle plate H2O: --- #define RP_FORM_3 3 Str: white half-circle plate + platform bBK: white half-circle plate + platform H2O: --- #define RP_FORM_MIN 0 #define RP_FORM_MAX 3
Shunting options:
#define TRENNOPT_WEITER 0 Continue straight on (no separating train) #define TRENNOPT_Z2STOP 0x0002 Rear train part gets coupling status #define TRENNOPT_Z2WENDEN 0x0004 Rear train part turns #define TRENNOPT_ZGNRNEUZ1 0x0008 Front train part gets new train number #define TRENNOPT_AKTLINNEUZ1 0x0010 Front train part gets new current route (if not divided but a new route is given, then this route is always assigned undependent from this option) #define TRENNOPT_ZUGIDNEUZ1 0x0400 Front train part gets the new id, otherwise rear part #define TRENNOPT_Z0WEITER 0x0020 If separating impossible, then go straight on #define TRENNOPT_TRENNEN 0x0040 Separating when shunting; if not set, then always simple turning or coupling #define TRENNOPT_Z1STOP 0x0080 Front train part gets coupling status #define TRENNOPT_Z1WENDEN 0x0100 Front train part turns #define TRENNOPT_Z1UMDREHEN 0x0200 The front train part is turned back (complete train and vehicles, i.e. like a turntable for trains of any length) only effecting together with _Z1WENDEN
Shunting times (all values in sec):
#define MAXRGZEIT 960 #define STD_TRENNZEIT 15 #define STD_KUPPELZEIT 30 #define STD_WENDEZEIT 0 (The standard value is 0 because of compatibility with older layout files and with the bumpers/line terminators, where no waiting time could be set in former versions)
<code><RangPkte anz= ></code>
Parameter: anz = count of shunting points = 0..RP_MAXZAHL
if (anz == 0) then the whole tag is omitted.
The shunting points follow, unsorted.
For each shunting point:
<code><R k3= eig= ri= bf= tro= trp= tk= tt= tw= ></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
k3 | yes | KOORD3 | - | position (<a href="#k3">coordinates</a>) |
eig | no | RPEIG_nnn | RPEIG_STANDARD | properties, mask of RPEIG_nnn bits |
ri | yes | RICHTUNGBIT_nnn | - | direction(s) of effect must be set suitable to the driving way element, each allows 2 directions only, both can be set |
bf | no | RP_FORM_MIN..RP_FORM_MAX | RP_FORM_MIN | graphical version (design) |
tro | no | TRENNOPT_nnn | TRENNOPT_WEITER | shunting options |
trp | (tro & TRENNOPT_TRENNEN) | -MAXZUGFSYM+1..+MAXZUGFSYM-1[2] | 0, 0 | separating positions: Define, after what vehicle the train should be divided
the 2nd value defines an interval and is stored only if different to the first |
tk | no | 0..MAXRGZEIT | STD_KUPPELZEIT |
time that is waited after coupling in status STAT_HRANG |
tt | no | 0..MAXRGZEIT[2] | STD_TRENNZEIT, STD_TRENNZEIT |
time that is waited after separating in status STAT_HRANG, |
tw | no | 0..MAXRGZEIT[2] | STD_WENDEZEIT |
time that is waited after turning in status STAT_HRANG, |
There follow <a href="#llist">route lists</a> and <a href="#dlist">depot lists</a>, each for the directions g (straight on) and r (shunting).
<code><LLg>..</LLg></code> <code><LLr>..</LLr></code> <code><DLg>..</DLg></code> <code><DLr>..</DLr></code>
All the lists are stored only if not empty.
<a name="depot"></a>Depots (Car barns)
<a name="depotallg"></a>Depots, General Data
#define DEPOTNAMELEN_LANG 16 max length of a long depot name in characters #define DEPOTNAMELEN_KURZ 4 max length of a short depot name in characters
more constants see at <a href="#dpgl">depot references</a>
<code><Depots anz= ></code>
Parameter: anz = count of depots = 0..DEPOTANZAHL
if (anz == 0) then the whole tag is omitted.
The depots follow sorted alphabetically by long name.
For each depot:
<code><DP id= n_l= n_k= gl= stgl= zi= ></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
id | yes | DEPOTNR_MIN..DEPOTNR_MAX | - | unique identifier, used in <a href="#dlist">depot lists</a> and other <a href="#dpgl">references</a> |
n_l | yes | CHAR16[1..DEPOTNAMELEN_LANG] | - | long name |
n_k | yes | CHAR16[1..DEPOTNAMELEN_KURZ] | - | short name |
gl | yes | 1..DEPOT_MAXGLEISZAHL | - | count of tracks |
stgl | yes | DEPOT_MINGLEISNR..DEPOT_MAXGLEISNR | - | standard track number |
zi | no | LINNR_UNDEF or LINNR_MIN..LINNR_MAX | LINNR_UNDEF | destination code for trains bound to here, LINNR_UNDEF if no |
<a name="depotgl"></a>Depots, Single Tracks
There follow the single tracks of the depot, count = gl, sorted by number.
For each track:
Properties of depot tracks:
#define DEPOTEIG_STD 0x0000 Standard value #define DEPOTEIG_ER 0x4000 Depot track only valid for trains with set going off-duty bit (STAT_EINR) #define DEPOTEIG_ERHIER 0x2000 Restriction: parking only for trains with set STAT_EINR bit, and only when this depot is the target depot (i.e. for trains only, that really like to go exactly to here) #define DEPOTEIG_VIRT 0x8000 Virtual depot: instead of parking, the train continues, ignoring any other data of the depot, without influencing signal systems, without changing the travelling direction; however the STAT_EINR bit in the train is cleared the _NRESET properties are processed #define DEPOTEIG_FZG 0x0001 Count vehicles (if not: trains instead) analoguous to signal system elements, only of importance when switching lists are existing #define DEPOTEIG_NRESET_LIN 0x0002 Do not set current route to base route #define DEPOTEIG_NRESET_KAT 0x0004 Do not set current category to base value #define DEPOTEIG_NRESET_GAT 0x0008 Do not set current train species to base
<code><G k3= nr= ri= eig= v= ></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
k3 | yes | KOORD3 | - | position (<a href="#k3">coordinates</a>) |
nr | yes | DEPOT_MINGLEISNR..DEPOT_MAXGLEISNR | - | track number, unique inside the depot |
ri | yes | RICHTUNGBIT_nnn | - | direction to leave must be set suitable to the driving way element, each allows 2 directions only, but only one can be set here the direction for incoming trains is not set, but both directions are possible in any case |
eig | no | DEPOTEIG_xxx (hex) | DEPOTEIG_STD | properties for this track, mask of DEPOTEIG_xxx |
v | no | VMAX_UNDEF or MIN_VMAX..MAX_VMAX | VMAX_UNDEF | speed restriction on leaving, =VMAX_UNDEF if unlimited |
There follows the <a href="#schfkt">switching function</a> for leaving if not empty:
<code><SF>..</SF></code>
There follow the <a href="#schlist">switching lists</a>, a for leaving and e for incoming:
<code><SLa>..</SLa></code> <code><SLe>..</SLe></code>
If a list is empty, then this tag is not stored.
<a name="taktp"></a>Timing Points
<a name="taktpallg"></a>Timing Point, General Data
#define MAXANZENDP 20000 max. count of timing points #define TP_MAXGLEISZAHL 8 max. count of tracks per timing point #define TPNAMELEN (32) max. length of name
Properties:
#define TPSPEC_STANDARD 0x0000 #define TPSPEC_HST 0x0001 Serve like stop for invalid trains #define TPSPEC_AUSF_0 0x0004 Do not tell about failed departures (do not send dispatcher message) #define TPSPEC_VSP_0 0x0008 Do not tell about late trains (do not send dispatcher messages) #define TPSPEC_HST2 0x0020 Serve like double stop for invalid trains #define TPSPEC_HST3 0x0040 Serve like triple stop for invalid trains "invalid trains" means trains that have to ignore the departure times, caused by conditions in the routes list or by status "going off-duty". #define TPSPEC_VSP_HST0 0x0080 Do not stop when late #define TPSPEC_KNAPP_HST 0x0100 Extend stopping time when short #define TPSPEC_WENDEN 0x0200 Turn back for invalid trains #define TPSPEC_LICHT_AUS 0x0400 Turn off lights as long as standing here #define TPSPEC_TUEREN_ZU 0x0800 Do not open doors while standing here #define MIN_AUSFALL 0 do not count failed departures, do not tell of lateness #define MAX_AUSFALL 60 max count of failed departures
<code><TaktPkte anz= ></code>
Parameter: anz = count of timing points = 0..MAXANZENDP
if (anz == 0) then the whole tag is omitted.
The timing points follow sorted alphabetically by name.
For each timing point:
<code><TP name= eig= gl= v= af_max= af_akt= ></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
name | yes | CHAR16[1..TPNAMELEN] | - | unique name |
eig | no | TPSPEC_xxx (hex) | TPSPEC_STANDARD | properties, mask of TPSPEC_xxx |
gl | no | 1..TP_MAXGLEISZAHL | 1 | count of single tracks |
v | no | VMAX_UNDEF or MIN_VMAX..MAX_VMAX | VMAX_UNDEF | speed limit when leaving, VMAX_UNDEF=no limit only important, if the train really stops |
af_max | no | MIN_AUSFALL..MAX_AUSFALL | MIN_AUSFALL | maximum count of failed departures |
af_akt | no | MIN_AUSFALL..af_max | MIN_AUSFALL | current count of failed departures |
<a name="taktprzeit"></a>Timing Point, Reset Times
The reset times for the fail counter follow, to avoid the transfer of fails to later (e.g. to the next day).
#define AUSFALL_RESET_ZAHL 6
There follow up to AUSFALL_RESET_ZAHL lines. Undefined lines are omitted.
For each:
<code><R z= t= /></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
z | yes | 0..AUSFALL_RESET_ZAHL-1 | - | line number, zero-based |
t | yes | <a href="#zeit">ZEIT4</a> | - | time (multiple days possible) |
<a name="taktpausf"></a>Timing Point, Failed Departures
The list of failed departures follows, as af_akt lines, for each:
<code><A t= w= /></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
t | yes | <a href="#zeit">ZEITD</a> | - | time (day of week = WTAG_KEIN) |
w | no | 0 or 1 | 0 | 1= the train had to turn back that time |
<a name="taktpgl"></a>Timing Point, Single Tracks
Graphical versions (designs):
#define TP_FORM_MIN 0 #define TP_FORM_MAX 18 #define TP_FORM_NUR_T 0 only "T" for all driving ways #define TP_FORM_NUR_TB 1 Str+bBk: "T" only + platform H2O: platform #define TP_FORM_KGE_B 2 Str+bBk: small yellow-green sign + platform H2O: lifebelt + platform #define TP_FORM_KRO_B 3 Str+bBk: small red sign + platform H2O: --- #define TP_FORM_KBL_B 4 Str+bBk: small blue-white sign + platform H2O: --- #define TP_FORM_KGR_B 5 Str+bBk: small green sign + platform H2O: --- #define TP_FORM_GSW_B 6 Str+bBk: large black-white sign + platform H2O: --- #define TP_FORM_GRO_B 7 Str+bBk: large red sign + platform H2O: --- #define TP_FORM_GBL_B 8 Str+bBk: large blue sign + platform H2O: --- #define TP_FORM_GGR_B 9 Str+bBk: large green sign + platform H2O: --- #define TP_FORM_KGE 10 Str+bBk: small yellow-green sign without platform H2O: --- #define TP_FORM_KRO 11 Str+bBk: small red sign without platform H2O: --- #define TP_FORM_KBL 12 Str+bBk: small blue sign without platform H2O: --- #define TP_FORM_KGR 13 Str+bBk: small green sign without platform H2O: --- #define TP_FORM_H 14 Str+bBk: black-white rectangle ("H") without platform H2O: --- #define TP_FORM_HB 15 Str+bBk: black-white rectangle ("H") witht platform H2O: --- #define TP_FORM_GLI_B 16 Str+bBk: large violet plate + platform H2O: --- #define TP_FORM_GGE_B 17 Str+bBk: large yellow plate + platform H2O: --- #define TP_FORM_GBR_B 18 Str+bBk: large brown plate + platform H2O: ---
The count of tracks is gl, the track number is defined by the order.
For each:
<code> <G k3= ri= bf= abf= zugid= lin= zi= znr= zgt= zkt= zeig= zstat= zln= zf1= t_a= hsn= hsw= fst= fsn= fsw= > </code>
Parameters:
Name | File format | Needed | Value | Default | Meaning |
---|---|---|---|---|---|
k3 | all | yes | KOORD3 | - | position (<a href="#k3">coordinates</a>) |
ri | all | yes | RICHTUNGBIT_nnn | - | directions of effect must be set suitable to the driving way element, each allows 2 directions only, both can be set here |
bf | all | no | TP_FORM_MIN..TP_FORM_MAX | TP_FORM_MIN | graphical version (design) |
abf | all | no | 0..gl | 0 | Info about the order of departure for the train waiting here, 0=no train |
zugid | all | abf > 0 | ZUG_ID_MIN..ZUG_ID_MAX | ZUG_ID_UNDEF | id of train here |
lin | all | abf > 0 | LINNR_MIN..LINNR_MAX | LINNR_UNDEF | current route code of train here on arrival |
zi | all | abf > 0 | LINNR_UNDEF or LINNR_MIN..LINNR_MAX | LINNR_UNDEF | current destination code of train here on arrival |
znr | all | abf > 0 | ZUGNUMMER_MIN..ZUGNUMMER_MAX | ZUGNUMMER_UNDEF | train number of train here on arrival |
zgt | all | abf > 0 | ZUGGAT_MIN..ZUGGAT_MAX | ZUGGAT_KEINE | train type/priority of train here on arrival |
zkt | all | abf > 0 | ZUGKAT_MIN..ZUGKAT_MAX | ZUGKAT_KEINE | train type/category of train here on arrival |
zeig | all | abf > 0 | ZUGEIG_xxx (hex) | ZUGEIG_NORMAL | train properties of train here on arrival |
zstat | all | abf > 0 | STAT_xxx (hex) | STAT_UNTW | train status of train here on arrival |
zln | < FV_3881 | abf > 0 | 1..MAXZUGFSYM, 1..MAXZUGGSYM*SYMBREITE | 1, 1 | train length of train here on arrival (count of vehicles, count of pixels M1:1 if different) |
zf1 | < FV_3881 | abf > 0 | FZGSPEC_xxx (hex) | FZGSPEC_STD | status of 1st vehicle of train here on arrival |
t_a | all | abf > 0 | <a href="#zeit">ZEITD</a> | ZEIT_NIE | time of arrival of train here |
hsn | all | no | MIN_SIGOBJ_NUMMER..MAX_SIGOBJ_NUMMER | SIGSYSNR_UNDEF | signal to wait for on departure, if going straight on |
hsw | all | no | MIN_SIGOBJ_NUMMER..MAX_SIGOBJ_NUMMER | SIGSYSNR_UNDEF | signal to wait for on departure, if turning |
fst | all | no | FSTR_EINZEIT_MIN..FSTR_EINZEIT_MAX | FSTR_EINZEIT_STD | time to request an itinerary before departure, in sec |
fsn | all | no | MIN_SIGOBJ_NUMMER..MAX_SIGOBJ_NUMMER | SIGSYSNR_UNDEF | itinerary to request before departure, if going straight on |
fsw | all | no | MIN_SIGOBJ_NUMMER..MAX_SIGOBJ_NUMMER | SIGSYSNR_UNDEF | itinerary to request before departure, if turning |
<a name="taktpll"></a>Timing Point, Route List
The <a href="#llist">route list</a> is stored only if not empty.
<code><LL>..</LL></code>
<a name="taktpzl"></a>Timing Point, Time List (Departure Times)
The <a href="#tlist">time list</a> is stored only if not empty.
<code><ZL>..</ZL></code>
<a name="dwx"></a>Data Change Points (Route Change Points)
#define DWX_ANZAHL_MAX (10000) maximum number of data change points #define DWXNAMELEN (32) in characters #define DWX_ID_UNDEF 0 #define DWX_ID_MIN (1) minimum id #define DWX_ID_MAX (DWX_ID_MIN + DWX_ANZAHL_MAX - 1) maximum id
Graphical versions (designs):
#define DWX_FORM_MIN 0 #define DWX_FORM_MAX 1 #define DWX_FORM_0 0 Str+bBk: green sign "D" H2O: green buoy #define DWX_FORM_1 1 Str+bBk: green sign "D" + platform H2O: ---
<code><DwxPkte anz= ></code>
Parameter: anz = count of data change points = 0..DWX_ANZAHL_MAX
if (anz == 0) then the whole tag is omitted.
The data change points follow sorted alphabetically by name.
For each data change point:
<code><C k3= ri= bf= id= name= vw= ></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
k3 | yes | KOORD3 | - | position (<a href="#k3">coordinates</a>) |
ri | yes | RICHTUNGBIT_nnn | - | directions of effect must be set suitable to the driving way element, each allows 2 directions only, both can be set here |
bf | no | DWX_FORM_MIN..DWX_FORM_MAX | DWX_FORM_MIN | graphical version (design) |
id | yes | DWX_ID_MIN..DWX_ID_MAX | - | unique identifier |
name | yes | CHAR16[1..DWXNAMELEN] | - | unique name |
vw | no | DWX_ID_UNDEF or DWX_ID_MIN..DWX_ID_MAX | DWX_ID_UNDEF | id of referenced data change point (link), =DWX_ID_UNDEF when no |
The <a href="#llist">route list</a> is stored only if not empty. In case a link is defined, then the list is always empty.
<code><LL>..</LL></code>
<a name="sig"></a>Signal Installations and Elements
Each signal system, itinerary and each element has a unique identifier from the range:
#define MIN_SIGOBJ_NUMMER (0x00000001) /* minimum signal object number */ #define MAX_SIGOBJ_NUMMER (0x0003ffff) /* =262143, maximum signal object number */ #define MAX_SIGOBJ_ANZAHL (MAX_SIGOBJ_NUMMER-MIN_SIGOBJ_NUMMER+1) /* max. count of sig. objs. altogether */ #define SIGSYSNR_UNDEF (0) /* undefined number */
Each signal system, itinerary and each element has a unique <a href="#namen">name</a> from a shared name space:
#define SIGNAMELEN (32) /* maximum name length in characters */
<a name="sigsys"></a>Signal Systems
#define SIGSPEC_NORMAL 0 /* normal signal system */ #define SIGSPEC_ZEIT 1 /* signal system owns a time list */ #define MIN_MAXSAZAEHLER 1 /* smallest maximum counter value (smallest value = 0) */ #define MAX_MAXSAZAEHLER 500 /* highest maxmium counter value */
Properties of time list, if existing:
#define SIGZEITSPEC_EIN 1 /* turning on (at time to danger, counter++) */ #define SIGZEITSPEC_AUS 2 /* turning off (at time to clear, counter--) */ #define SIGDELTA_KEINS 0 /* no turning back */ #define MIN_SIGDELTA 1 /* minimum time for turning back (sec) */ #define MAX_SIGDELTA (600*60) /* maximum time for turning back (sec) */
<code><SigAnl anz= ></code>
Parameter: anz = count of signal systems = 0..MAX_SIGOBJ_ANZAHL
if (anz == 0) then the whole tag is omitted.
The signal systems follow sorted alphabetically by name.
For each signal system:
<code><S id= name= eig= z_akt= z_max= zug_max= zleig= t_r= ></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
id | yes | MIN_SIGOBJ_NUMMER..MAX_SIGOBJ_NUMMER | - | <a href="#sig">unique identifier</a> |
name | yes | CHAR16[1..SIGNAMELEN] | - | <a href="#sig">unique name</a> |
eig | no | SIGSPEC_xxx (hex) | SIGSPEC_NORMAL | properties, mask of SIGSPEC_xxx |
z_akt | no | 0..z_max | 0 | current counter value |
z_max | no | MIN_MAXSAZAEHLER..MAX_MAXSAZAEHLER | MIN_MAXSAZAEHLER | maximum counter value |
zug_max | no | MIN_MAXSAZAEHLER..z_max | z_max | counter value (number of turn-on events) to switch to blocked status |
zleig | no | SIGZEITSPEC_xxx (hex) | SIGZEITSPEC_EIN | properties of time list |
t_r | no | 1..MAX_SIGDELTA | SIGDELTA_KEINS | time difference in seconds until a switching action from the time list will turn backThis is valid for switching actions only that are caused by the time list! If the system also owns contacts or signals with switching effect then the actions forced by them are not reset via t_r. The same is valid for manual actions. =SIGDELTA_KEINS then no turning back, e.g. when switching is done via contacts |
The <a href="#tlist">time list</a> is stored only if not empty.
<code><ZL>..</ZL></code>
The <a href="#textinfo">info text</a> is stored only if not empty.
<code><Info>..</Info></code>
<a name="fstr"></a>Itineraries
#define FSTR_EINZEIT_MIN ( 1) /* minimum time to turn on (sec) */ #define FSTR_EINZEIT_MAX (120) /* maximum time to turn on (sec) */ #define FSTR_EINZEIT_STD ( 20) /* standard time to turn on (sec) */
<code><SigFStr anz= ></code>
Parameter: anz = count of itineraries = 0..MAX_SIGOBJ_ANZAHL
if (anz == 0) then the whole tag is omitted.
The itineraries follow sorted alphabetically by name.
For each itinerary:
<code><F id= name= stat= zug_id= t_ein= t_z= ></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
id | yes | MIN_SIGOBJ_NUMMER..MAX_SIGOBJ_NUMMER | - | <a href="#sig">unique identifier</a> |
name | yes | CHAR16[1..SIGNAMELEN] | - | <a href="#sig">unique name</a> |
stat | no | 0..3 | 0 | status, 0=unassigned, 1..3=assigned, start signal not yet clear/clear/no more clear |
zug_id | (stat >0) | ZUG_ID_MIN..ZUG_ID_MAX | ZUG_ID_UNDEF | id of the assigned <a href="#zugkallg">train</a> |
t_ein | no | FSTR_EINZEIT_MIN..FSTR_EINZEIT_MAX | FSTR_EINZEIT_STD | time to turning on (sec) |
t_z | (stat == 1) | FSTR_EINZEIT_MIN*1000..t_ein*1000 | t_ein*1000 | current counter value (count down) to turn start signal to Clear (msec) |
v | no | VMAX_UNDEF or MIN_VMAX..MAX_VMAX | VMAX_UNDEF | speed restriction while passing the itinerary (km/h), VMAX_UNDEF=no limit |
There follow <a href="#schfkt">switching function</a>, <a href="#schlist">switching list</a> and list of alternative itineraries.
<code><SF>..</SF></code> <code><SLb>..</SLb></code> <code><AL>..</AL></code>
All the lists are stored only if not empty.
The <a href="#textinfo">info text</a> is stored only if not empty.
<code><Info>..</Info></code>
<a name="sigel"></a>Signal System Elements
Element properties:
#define SIGELEMEIG_NICHTS 0x0000 /* nothing, standard value */ Route lists analoguous for stopping points and junctions (for both switching effect AND stop at blocked signal) #define SIGELEMEIG_LIN 0x0001 /* valid only for the routes mentioned in the list */ #define SIGELEMEIG_NLIN 0x0002 /* not valid for the mentioned routes */ #define SIGELEMEIG_BLINKREVERSE 0x0020 /* element blinks with other phase, makes only sense for alternating lights */ #define SIGELEMEIG_FZG 0x0100 /* element counts single vehicles (otherwise whole trains) */ #define SIGELEMEIG_ZUGSCHLUSS 0x0080 /* element counts on train's tail, do not combine with _FZG */ #define SIGELEMEIG_UNSICHTBAR 0x0200 /* element is invisible (not for contacts and grade crossing signals) */
Graphical designs:
Grade crossing signals: (all driving ways except H2O, also bBK) all exist right and left: this is not dependent on right or left handed traffic, but the signals often stand on both sides of wide roads "mirrored". for each _B0 without platform, _B1 platform on signal's side Warning cross (more vertically, "St.Andrew's cross") right (Danger = blinking inside): #define BUE_FORM_WKDER_B0 0 #define BUE_FORM_WKDER_B1 1 ditto left: #define BUE_FORM_WKDEL_B0 2 #define BUE_FORM_WKDEL_B1 3 ditto + barrier right (Danger = blinking) #define BUE_FORM_WKSDER_B0 4 #define BUE_FORM_WKSDER_B1 5 ditto left: #define BUE_FORM_WKSDEL_B0 6 #define BUE_FORM_WKSDEL_B1 7 Warning cross (more flat, with double blinking lights, e.g. ČSD, SBB) right: #define BUE_FORM_WKCSR_B0 8 #define BUE_FORM_WKCSR_B1 9 ditto left: #define BUE_FORM_WKCSL_B0 10 #define BUE_FORM_WKCSL_B1 11 ditto+barrier right: #define BUE_FORM_WKSCSR_B0 12 #define BUE_FORM_WKSCSR_B1 13 ditto+barrier left: #define BUE_FORM_WKSCSL_B0 14 #define BUE_FORM_WKSCSL_B1 15 Warning cross (more vertically, "St.Andrews cross" with yellow-red traffic light above) right: #define BUE_FORM_WKDBR_B0 16 #define BUE_FORM_WKDBR_B1 17 ditto left: #define BUE_FORM_WKDBL_B0 18 #define BUE_FORM_WKDBL_B1 19 ditto+barrier right: #define BUE_FORM_WKSDBR_B0 20 #define BUE_FORM_WKSDBR_B1 21 ditto+barrier left: #define BUE_FORM_WKSDBL_B0 22 #define BUE_FORM_WKSDBL_B1 23 Stop signals: all with 3 versions for each: 0 without platform 1 platform on signal's side (depending on right/left handed traffic) 2 platform on opposite side all versions for all driving ways (except H2O, see remarks there) for each _B0 without platform, _BR platform right, _BL platform left Small light signal black pole right-handed traffic (not H2O): #define HSIG_FORM_LSDER_B0 0 #define HSIG_FORM_LSDER_BR 1 #define HSIG_FORM_LSDER_BL 2 Small light signal black pole left-handed traffic (not H2O): #define HSIG_FORM_LSDEL_B0 3 #define HSIG_FORM_LSDEL_BL 4 #define HSIG_FORM_LSDEL_BR 5 Small light signal white pole right-handed traffic: H2O: Light signal right-handed traffic: #define HSIG_FORM_LSUSR_B0 6 #define HSIG_FORM_LSUSR_BR 7 #define HSIG_FORM_LSUSR_BL 8 #define HSIG_FORM_LSH2OR_B0 SIG_FORM_LSUSR_B0 #define HSIG_FORM_LSH2OR_BR SIG_FORM_LSUSR_BR #define HSIG_FORM_LSH2OR_BL SIG_FORM_LSUSR_BL Small light signal white pole left-handed traffic: H2O: Light signal left-handed traffic: #define HSIG_FORM_LSGBL_B0 9 #define HSIG_FORM_LSGBL_BL 10 #define HSIG_FORM_LSGBL_BR 11 #define HSIG_FORM_LSH2OL_B0 SIG_FORM_LSGBL_B0 #define HSIG_FORM_LSH2OL_BL SIG_FORM_LSGBL_BL #define HSIG_FORM_LSH2OL_BR SIG_FORM_LSGBL_BR Semaphore signal (DE design) right-handed traffic (not H2O): #define HSIG_FORM_FSDER_B0 12 #define HSIG_FORM_FSDER_BR 13 #define HSIG_FORM_FSDER_BL 14 Semaphore signal (US design) right-handed traffic (not H2O): #define HSIG_FORM_FSUSR_B0 15 #define HSIG_FORM_FSUSR_BR 16 #define HSIG_FORM_FSUSR_BL 17 Semaphore signal (UK/AU design) left-handed traffic (not H2O): #define HSIG_FORM_FSGBL_B0 18 #define HSIG_FORM_FSGBL_BL 19 #define HSIG_FORM_FSGBL_BR 20 Semaphore signal (UK/AU design) "lower quadrant" left-handed traffic (not H2O): #define HSIG_FORM_FSLQL_B0 21 #define HSIG_FORM_FSLQL_BL 22 #define HSIG_FORM_FSLQL_BR 23 High light signal (DE design Hl) right-handed traffic (not H2O): #define HSIG_FORM_LSDRR_B0 24 #define HSIG_FORM_LSDRR_BR 25 #define HSIG_FORM_LSDRR_BL 26 High light signal (DE design Hl) left-handed traffic (not H2O): #define HSIG_FORM_LSDRL_B0 27 #define HSIG_FORM_LSDRL_BL 28 #define HSIG_FORM_LSDRL_BR 29 High light signal (white pole) right-handed traffic (not H2O): #define HSIG_FORM_LSUS2R_B0 30 #define HSIG_FORM_LSUS2R_BR 31 #define HSIG_FORM_LSUS2R_BL 32 High light signal (white pole) left-handed traffic (not H2O): #define HSIG_FORM_LSUS2L_B0 32 #define HSIG_FORM_LSUS2L_BL 33 #define HSIG_FORM_LSUS2L_BR 34 High light signal (DE design Ks) right-handed traffic (not H2O): #define HSIG_FORM_LSDBKSR_B0 36 #define HSIG_FORM_LSDBKSR_BR 37 #define HSIG_FORM_LSDBKSR_BL 38 High light signal (DE design Ks) left-handed traffic (not H2O): #define HSIG_FORM_LSDBKSL_B0 39 #define HSIG_FORM_LSDBKSL_BL 40 #define HSIG_FORM_LSDBKSL_BR 41 Light signal tram (DE design) right-handed traffic (not H2O): #define HSIG_FORM_BLKR_B0 42 #define HSIG_FORM_BLKR_BR 43 #define HSIG_FORM_BLKR_BL 44 Light signal tram (DE design) left-handed traffic (not H2O): #define HSIG_FORM_BLKL_B0 45 #define HSIG_FORM_BLKL_BL 46 #define HSIG_FORM_BLKL_BR 47 Light signal tram (4 points) right-handed traffic (not H2O): #define HSIG_FORM_S4PR_B0 48 #define HSIG_FORM_S4PR_BR 49 #define HSIG_FORM_S4PR_BL 50 Light signal tram (4 points) left-handed traffic (not H2O): #define HSIG_FORM_S4PL_B0 51 #define HSIG_FORM_S4PL_BL 52 #define HSIG_FORM_S4PL_BR 53 Light signal DE (design DB old H/V) right-handed traffic (not H2O): #define HSIG_FORM_LSDBHVR_B0 54 #define HSIG_FORM_LSDBHVR_BR 55 #define HSIG_FORM_LSDBHVR_BL 56 Light signal DE (design DB old H/V) left-handed traffic (not H2O): #define HSIG_FORM_LSDBHVL_B0 57 #define HSIG_FORM_LSDBHVL_BL 58 #define HSIG_FORM_LSDBHVL_BR 59 Traffic lights with immediate phase yellow right-handed (not H2O) since B385Beta0 2008-09-05 #define HSIG_FORM_LSLZA3R_B0 60 #define HSIG_FORM_LSLZA3R_BR 61 #define HSIG_FORM_LSLZA3R_BL 62 Traffic lights with immediate phase yellow left-handed (not H2O) since B385Beta0 2008-09-05 #define HSIG_FORM_LSLZA3L_B0 63 #define HSIG_FORM_LSLZA3L_BL 64 #define HSIG_FORM_LSLZA3L_BR 65 Light signal CH (System L) left-handed (not H2O) since B385b2 2008-10-31 #define HSIG_FORM_LSCHLL_B0 66 #define HSIG_FORM_LSCHLL_BL 67 #define HSIG_FORM_LSCHLL_BR 68 Light signal CH (System L) right-handed (not H2O) since B385b2 2008-10-31 #define HSIG_FORM_LSCHLR_B0 69 #define HSIG_FORM_LSCHLR_BR 70 #define HSIG_FORM_LSCHLR_BL 71 HSig user-defined 0 right-handed (not H2O) since B385b3 2008-11-04 #define HSIG_FORM_USER_MIN 72 #define HSIG_FORM_USER0R_B0 72 #define HSIG_FORM_USER0R_BR 73 #define HSIG_FORM_USER0R_BL 74 HSig user-defined 0 left-handed (not H2O) #define HSIG_FORM_USER0L_B0 75 #define HSIG_FORM_USER0L_BL 76 #define HSIG_FORM_USER0L_BR 77 ...and so on... #define HSIG_FORM_USER19L_B0 189 #define HSIG_FORM_USER19L_BL 190 #define HSIG_FORM_USER19L_BR 191 #define HSIG_FORM_USER_MAX 191 Distant signals: all with 3 versions for each: 0 without platform 1 platform on signal's side (depending on right/left handed traffic) 2 platform on opposite side all versions for all driving ways except H2O the definitions are analoguous to the respective stop signals Small light signal black pole right-handed traffic (not H2O): #define VSIG_FORM_LSDER_B0 0 #define VSIG_FORM_LSDER_BR 1 #define VSIG_FORM_LSDER_BL 2 Small light signal black pole left-handed traffic (not H2O): #define VSIG_FORM_LSDEL_B0 3 #define VSIG_FORM_LSDEL_BL 4 #define VSIG_FORM_LSDEL_BR 5 Small light signal white pole right-handed traffic: H2O: Light signal right-handed traffic: #define VSIG_FORM_LSUSR_B0 6 #define VSIG_FORM_LSUSR_BR 7 #define VSIG_FORM_LSUSR_BL 8 #define VSIG_FORM_LSH2OR_B0 VSIG_FORM_LSUSR_B0 #define VSIG_FORM_LSH2OR_BR VSIG_FORM_LSUSR_BR #define VSIG_FORM_LSH2OR_BL VSIG_FORM_LSUSR_BL Small light signal white pole left-handed traffic: H2O: Light signal left-handed traffic: #define VSIG_FORM_LSGBL_B0 9 #define VSIG_FORM_LSGBL_BL 10 #define VSIG_FORM_LSGBL_BR 11 #define VSIG_FORM_LSH2OL_B0 VSIG_FORM_LSGBL_B0 #define VSIG_FORM_LSH2OL_BL VSIG_FORM_LSGBL_BL #define VSIG_FORM_LSH2OL_BR VSIG_FORM_LSGBL_BR Semaphore signal (DE design) right-handed traffic (not H2O): #define VSIG_FORM_FSDER_B0 12 #define VSIG_FORM_FSDER_BR 13 #define VSIG_FORM_FSDER_BL 14 Semaphore signal (US design) right-handed traffic (not H2O): #define VSIG_FORM_FSUSR_B0 15 #define VSIG_FORM_FSUSR_BR 16 #define VSIG_FORM_FSUSR_BL 17 Semaphore signal (UK/AU design) left-handed traffic (not H2O): #define VSIG_FORM_FSGBL_B0 18 #define VSIG_FORM_FSGBL_BL 19 #define VSIG_FORM_FSGBL_BR 20 Semaphore signal (UK/AU design) "lower quadrant" left-handed traffic (not H2O): #define VSIG_FORM_FSLQL_B0 21 #define VSIG_FORM_FSLQL_BL 22 #define VSIG_FORM_FSLQL_BR 23 High light signal (DE design Hl) right-handed traffic (not H2O): #define VSIG_FORM_LSDRR_B0 24 #define VSIG_FORM_LSDRR_BR 25 #define VSIG_FORM_LSDRR_BL 26 High light signal (DE design Hl) left-handed traffic (not H2O): #define VSIG_FORM_LSDRL_B0 27 #define VSIG_FORM_LSDRL_BL 28 #define VSIG_FORM_LSDRL_BR 29 High light signal (white pole) right-handed traffic (not H2O): #define VSIG_FORM_LSUS2R_B0 30 #define VSIG_FORM_LSUS2R_BR 31 #define VSIG_FORM_LSUS2R_BL 32 High light signal (white pole) left-handed traffic (not H2O): #define VSIG_FORM_LSUS2L_B0 33 #define VSIG_FORM_LSUS2L_BL 34 #define VSIG_FORM_LSUS2L_BR 35 High light signal (DE design Ks) right-handed traffic (not H2O): #define VSIG_FORM_LSDBKSR_B0 36 #define VSIG_FORM_LSDBKSR_BR 37 #define VSIG_FORM_LSDBKSR_BL 38 High light signal (DE design Ks) left-handed traffic (not H2O): #define VSIG_FORM_LSDBKSL_B0 39 #define VSIG_FORM_LSDBKSL_BL 40 #define VSIG_FORM_LSDBKSL_BR 41 Light signal tram (DE design) right-handed traffic (not H2O): #define VSIG_FORM_BLKR_B0 42 #define VSIG_FORM_BLKR_BR 43 #define VSIG_FORM_BLKR_BL 44 Light signal tram (DE design) left-handed traffic (not H2O): #define VSIG_FORM_BLKL_B0 45 #define VSIG_FORM_BLKL_BL 46 #define VSIG_FORM_BLKL_BR 47 Light signal tram (4 points) right-handed traffic (not H2O): #define VSIG_FORM_S4PR_B0 48 #define VSIG_FORM_S4PR_BR 49 #define VSIG_FORM_S4PR_BL 50 Light signal tram (4 points) left-handed traffic (not H2O): #define VSIG_FORM_S4PL_B0 51 #define VSIG_FORM_S4PL_BL 52 #define VSIG_FORM_S4PL_BR 53 Light signal DE (design DB old H/V) right-handed traffic (not H2O): #define VSIG_FORM_LSDBHVR_B0 54 #define VSIG_FORM_LSDBHVR_BR 55 #define VSIG_FORM_LSDBHVR_BL 56 Light signal DE (design DB old H/V) left-handed traffic (not H2O): #define VSIG_FORM_LSDBHVL_B0 57 #define VSIG_FORM_LSDBHVL_BL 58 #define VSIG_FORM_LSDBHVL_BR 59 Light signal CH (System L) left-handed (not H2O) #define VSIG_FORM_LSCHLL_B0 60 #define VSIG_FORM_LSCHLL_BL 61 #define VSIG_FORM_LSCHLL_BR 62 Light signal CH (System L) right-handed (not H2O) #define VSIG_FORM_LSCHLR_B0 63 #define VSIG_FORM_LSCHLR_BR 64 #define VSIG_FORM_LSCHLR_BL 65 VSig user-defined 0 right-handed (not H2O) #define VSIG_FORM_USER_MIN 66 #define VSIG_FORM_USER0R_B0 66 #define VSIG_FORM_USER0R_BR 67 #define VSIG_FORM_USER0R_BL 68 VSig user-defined 0 left-handed (not H2O) #define VSIG_FORM_USER0L_B0 69 #define VSIG_FORM_USER0L_BL 70 #define VSIG_FORM_USER0L_BR 71 ...and so on as for the stop signals... ...until... VSig user-defined 19 left-handed (not H2O) #define VSIG_FORM_USER19L_B0 183 #define VSIG_FORM_USER19L_BL 184 #define VSIG_FORM_USER19L_BR 185 #define VSIG_FORM_USER_MAX 185 Combined signals: all with 3 versions for each: 0 without platform 1 platform on signal's side (depending on right/left handed traffic) 2 platform on opposite side all versions for all driving ways (except H2O, see remarks there) for tram signals there are no combined ones Small light signal black pole right-handed traffic (not H2O): #define KSIG_FORM_LSDER_B0 0 #define KSIG_FORM_LSDER_BR 1 #define KSIG_FORM_LSDER_BL 2 Small light signal black pole left-handed traffic (not H2O): #define KSIG_FORM_LSDEL_B0 3 #define KSIG_FORM_LSDEL_BL 4 #define KSIG_FORM_LSDEL_BR 5 Small light signal white pole right-handed traffic: H2O: Light signal right-handed traffic: #define KSIG_FORM_LSUSR_B0 6 #define KSIG_FORM_LSUSR_BR 7 #define KSIG_FORM_LSUSR_BL 8 #define KSIG_FORM_LSH2OR_B0 KSIG_FORM_LSUSR_B0 #define KSIG_FORM_LSH2OR_BR KSIG_FORM_LSUSR_BR #define KSIG_FORM_LSH2OR_BL KSIG_FORM_LSUSR_BL Small light signal white pole left-handed traffic: H2O: Light signal left-handed traffic: #define KSIG_FORM_LSGBL_B0 9 #define KSIG_FORM_LSGBL_BL 10 #define KSIG_FORM_LSGBL_BR 11 #define KSIG_FORM_LSH2OL_B0 KSIG_FORM_LSGBL_B0 #define KSIG_FORM_LSH2OL_BL KSIG_FORM_LSGBL_BL #define KSIG_FORM_LSH2OL_BR KSIG_FORM_LSGBL_BR Semaphore signal (DE design) right-handed traffic (not H2O): #define KSIG_FORM_FSDER_B0 12 #define KSIG_FORM_FSDER_BR 13 #define KSIG_FORM_FSDER_BL 14 Semaphore signal (US design) right-handed traffic (not H2O): #define KSIG_FORM_FSUSR_B0 15 #define KSIG_FORM_FSUSR_BR 16 #define KSIG_FORM_FSUSR_BL 17 Semaphore signal (UK/AU design) left-handed traffic (not H2O): #define KSIG_FORM_FSGBL_B0 18 #define KSIG_FORM_FSGBL_BL 19 #define KSIG_FORM_FSGBL_BR 20 Semaphore signal (UK/AU design) "lower quadrant" left-handed traffic (not H2O): #define KSIG_FORM_FSLQL_B0 21 #define KSIG_FORM_FSLQL_BL 22 #define KSIG_FORM_FSLQL_BR 23 High light signal (DE design Hl) right-handed traffic (not H2O): #define KSIG_FORM_LSDRR_B0 24 #define KSIG_FORM_LSDRR_BR 25 #define KSIG_FORM_LSDRR_BL 26 High light signal (DE design Hl) left-handed traffic (not H2O): #define KSIG_FORM_LSDRL_B0 27 #define KSIG_FORM_LSDRL_BL 28 #define KSIG_FORM_LSDRL_BR 29 High light signal (white pole) right-handed traffic (not H2O): #define KSIG_FORM_LSUS2R_B0 30 #define KSIG_FORM_LSUS2R_BR 31 #define KSIG_FORM_LSUS2R_BL 32 High light signal (white pole) left-handed traffic (not H2O): #define KSIG_FORM_LSUS2L_B0 33 #define KSIG_FORM_LSUS2L_BL 34 #define KSIG_FORM_LSUS2L_BR 35 High light signal (DE design Ks) right-handed traffic (not H2O): #define KSIG_FORM_LSDBKSR_B0 36 #define KSIG_FORM_LSDBKSR_BR 37 #define KSIG_FORM_LSDBKSR_BL 38 High light signal (DE design Ks) left-handed traffic (not H2O): #define KSIG_FORM_LSDBKSL_B0 39 #define KSIG_FORM_LSDBKSL_BL 40 #define KSIG_FORM_LSDBKSL_BR 41 Light signal DE (design DB old H/V) right-handed traffic (not H2O): #define KSIG_FORM_LSDBHVR_B0 42 #define KSIG_FORM_LSDBHVR_BR 43 #define KSIG_FORM_LSDBHVR_BL 44 Light signal DE (design DB old H/V) left-handed traffic (not H2O): #define KSIG_FORM_LSDBHVL_B0 45 #define KSIG_FORM_LSDBHVL_BL 46 #define KSIG_FORM_LSDBHVL_BR 47 Light signal CH (System L) left-handed (not H2O) #define KSIG_FORM_LSCHLL_B0 48 #define KSIG_FORM_LSCHLL_BL 49 #define KSIG_FORM_LSCHLL_BR 50 Light signal CH (System L) right-handed (not H2O) #define KSIG_FORM_LSCHLR_B0 51 #define KSIG_FORM_LSCHLR_BR 52 #define KSIG_FORM_LSCHLR_BL 53 KSig user-defined 0 right-handed (not H2O) #define KSIG_FORM_USER_MIN 54 #define KSIG_FORM_USER0R_B0 54 #define KSIG_FORM_USER0R_BR 55 #define KSIG_FORM_USER0R_BL 56 KSig user-defined 0 left-handed (not H2O) #define KSIG_FORM_USER0L_B0 57 #define KSIG_FORM_USER0L_BL 58 #define KSIG_FORM_USER0L_BR 59 ...and so on as for the stop signals... ...until... KSig user-defined 19 left-handed (not H2O) #define KSIG_FORM_USER19L_B0 171 #define KSIG_FORM_USER19L_BL 172 #define KSIG_FORM_USER19L_BR 173 #define KSIG_FORM_USER_MAX 173
Switching contacts designs:
for each: B0 without platform, B1R platform right side, B1L platform left side
#define SK_FORM_M_B0 0 /* Orange filled circle with '-' */ #define SK_FORM_M_B1R 1 #define SK_FORM_M_B1L 2 #define SK_FORM_P_B0 3 /* Orange filled circle with '+' */ #define SK_FORM_P_B1R 4 #define SK_FORM_P_B1L 5 #define SK_FORM_X_B0 6 /* Orange filled circle with 'x' */ #define SK_FORM_X_B1R 7 #define SK_FORM_X_B1L 8 #define SK_FORM_S_B0 9 /* Blue filled square with 'S' */ #define SK_FORM_S_B1R 10 #define SK_FORM_S_B1L 11 #define SK_FORM_F_B0 12 /* red filled square with 'F' */ #define SK_FORM_F_B1R 13 #define SK_FORM_F_B1L 14 #define SK_FORM_R_B0 15 /* yellow filled square with 'R' */ #define SK_FORM_R_B1R 16 #define SK_FORM_R_B1L 17
#define MIN_SIGELEMDELTA (MIN_SIGDELTA) #define MAX_SIGELEMDELTA (MAX_SIGDELTA)
<code><SigElem anz= ></code>
Parameter: anz = count of elements = 0..MAX_SIGOBJ_ANZAHL
If (anz == 0) then the whole tag is omitted.
Otherwise, the count is not really checked.
The correct value is counted while reading the single elements.
The elements follow sorted alphabetically by name.
For each element:
<code><?? k3= id= name= eig= bf= hs= vv= vp= nrd= nrt= nrz= grd= grt= grz= ></code>
The element type is coded in the tag name:
Name | Meaning |
---|---|
HS | stop signal (German: Hauptsignal) |
VS | distant signal (German: Vorsignal) |
KS | combined signal (German: kombiniertes Signal or Signalkombination) |
BS | grade crossing signal (German: BÜ-Signal = Bahnübergangs-Signal) |
SK | switching contact, including request contact (German: Schaltkontakt/Anmeldekontakt) |
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
k3 | yes | KOORD3 | - | position (<a href="#k3">coordinates</a>) |
id | yes | MIN_SIGOBJ_NUMMER..MAX_SIGOBJ_NUMMER | - | <a href="#sig">unique identifier</a> |
name | yes | CHAR16[1..SIGNAMELEN] | - | <a href="#sig">unique name</a> |
eig | no | SIGELEMEIG_xxx (hex) | SIGELEMEIG_NICHTS | properties mask of SIGELEMEIG_xxx |
bf | no | xx_FORM_MIN..xx_FORM_MAX | xx_FORM_MIN (=0) | graphical version (design), suitable to object type |
hs | no | MIN_SIGOBJ_NUMMER..MAX_SIGOBJ_NUMMER | SIGSYSNR_UNDEF | assigned stop signal (for VS+KS only) |
vv | no | VMAX_UNDEF or MIN_VMAX..MAX_VMAX | VMAX_UNDEF | distant signal speed (km/h), only if hs≠SIGSYSNR_UNDEF |
vp | no | VMAX_UNDEF or MIN_VMAX..MAX_VMAX | VMAX_UNDEF | speed for permissive travel (km/h) |
nrd | no | SIGDELTA_KEINS or MIN_SIGELEMDELTA..MAX_SIGELEMDELTA | SIGDELTA_KEINS | time difference to switch back for normal direction of travel (sec) |
nrt | no | <a href="#zeit">ZEITD</a> | no time | next time to switch back, day of week = WTAG_KEIN, for normal direction of travel |
nrz | no | INT32 ≥0 | 0 | count of events to switch back, for normal direction of travel |
grd | no | SIGDELTA_KEINS or MIN_SIGELEMDELTA..MAX_SIGELEMDELTA | SIGDELTA_KEINS | time difference to switch back for reverse direction of travel (sec) |
grt | no | <a href="#zeit">ZEITD</a> | no time | next time to switch back, day of week = WTAG_KEIN, for reverse direction of travel |
grz | no | INT32 ≥0 | 0 | count of events to switch back, for reverse direction of travel |
Not all parameters make sense for all element types. Normally, they are not stored then.
About data to switch back:
- if there is no switching list for one direction, there is no delta to switch back for it
- if there is no delta to switch back, then there is neither a time nor a count of events
- turning on and turning off actions are counted (also by single vehicles), but only the time of last recent action (+delta) is stored, overwriting the old value
- at stored moment, a turn back takes place by the nrz resp. grz value and time is set to undef
- turning on actions are added (>0), turning off actions are subtracted (<0)
- when summary =0, then no switching is done
There follows the <a href="#schfkt">switching function</a> if not empty:
<code><SF>..</SF></code>
#define MAX_SCHALTLIST_ZAHL (9)
This defines the maximum count of switching lists since <a href="#fversion">file format</a> FV_3882.
Before, you can assume its value to be =1.
It is also the maximum count of route lists here.
List #0 is the already existing one for normal direction, #1..MAX_SCHALTLIST_ZAHL-1 are optionally new
and especially thought to request different itineraries under different conditions.
The alternative switching list as introduced with BAHN 3.88 is not included here.
Not all of the lists can be edited due to lack of space in the dialog windows.
In result, in BAHN 3.88r2 you can edit only:
- list #0 (stop signal, combined signal, switching contact, request contact)
- lists #1..3 (request contact)
- alternative list (switch contact, request contact)
- list of reverse direction (stop signal, combined signal, switching contact)
The others, if found in a file, will be loaded and stored again, however they will get lost on editing the element.
There follow the <a href="#schlist">switching lists</a>, n for normal direction #0, 1.. for normal direction #1ff, a for normal direction (alternative) and g for reverse direction:
<code><SLn>..</SLn></code> <code><SL1>..</SL1></code>..<code><SL8>..</SL8></code> <code><SLa>..</SLa></code> <code><SLg>..</SLg></code>
If a list is empty, then this tag is not stored.
The <a href="#llist">route list</a> #0 is stored only if not empty:
either <code><LLp>..</LLp></code> or <code><LLn>..</LLn></code>
with p (positive) for "valid for these" or n (negative) for "not valid for these"
There may follow multiple route lists, belonging to the switching lists above, all to interpret as positive:
<code><LL1>..</LL1></code>..<code><LL8>..</LL8></code>
The <a href="#dlist">depot lists</a> are stored only if not empty:
<code><DLp>..</DLp></code> <code><DLn>..</DLn></code>
with p (positive) for "valid for these" or n (negative) for not "valid for these"
<a href="#depot">Depots</a> connected to signal systems are not stored in the signal system data,
i.e. they are no real elements.
The same is valid for <a href="#wei">turnouts</a> with signal or itinerary data.
The connection is done by the references in the switching functions and switching lists only.
When renumbering or deleting the signal system, check the depot and turnout data and update when needed.
The same is with entries of signals at <a href="#hst">stopping points</a>
and <a href="#taktp">timing points</a>, and since BAHN 3.88r2 with entries in
<a href="#llist">route lists</a>.
<a name="fstranm"></a>Requests for Itineraries
<code><SigAnm anz= ></code>
Parameter: anz = count of requests = 0..MAX_SIGOBJ_ANZAHL
If (anz == 0) then the whole tag is omitted.
Otherwise, the count is not really checked.
The correct value is counted while reading the single requests.
The orders follow sorted by time.
For each request:
<code><Anm fs_id= t= zug_id= ></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
fs_id | yes | MIN_SIGOBJ_NUMMER..MAX_SIGOBJ_NUMMER | - | <a href="#sig">unique identifier</a> of an itinerary |
t | yes | <a href="#zeit">ZEITD</a> | - | time when request was stored |
zug_id | yes | ZUG_ID_MIN..ZUG_ID_MAX | - | id of the <a href="#zugkallg">train</a> that sent the request |
<a name="textfmt"></a>Text Formats
#define FMT_ANZAHL_MAX (10000) /* maximum count of text formats */ #define FMT_ID_UNDEF 0 #define FMT_ID_MIN (1) #define FMT_ID_MAX (FMT_ID_MIN + FMT_ANZAHL_MAX - 1) #define TEXTFORMATNAMELEN (32) /* maximum length of name in characters */
<code><TextFormate anz= ></code>
Parameter: anz = count of text formats = 0..FMT_ANZAHL_MAX
if (anz == 0) then the whole tag is omitted.
The text formats follow, in the order defined by the user.
For each text format:
<code><F id= name= vg= hg= rd= ></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
id | yes | FMT_ID_MIN..FMT_ID_MAX | - | unique identifier |
name | yes | CHAR16[1..TEXTFORMATNAMELEN] | - | unique name, case sensitive |
vg | no | <a href="#farben">RGBX3</a> | use standard text color (coded as "transparent" here) | text color (foreground color) |
hg | no | RGBX3 | transparent | background color |
rd | no | RGBX3 | same as background color | border color (frame color) |
<a name="text"></a>Text Data
The text data are stored in string elements of variable length. In the layout data, text data are not marked. In result, they can stand at any place, undependent on the graphic element there.
#define STRLEN_MAX (1024) /* maximum length of a text, valid only inside nt3 layout files */ #define ZEI_PRO_SYM 4 /* characters per layout element */
<code><Texte anz= ></code>
Parameter: anz = count of texts ≥0
if (anz == 0) then the whole tag is omitted.
The texts follow, sorted by ny, nx, -nz.
For each text:
<code><X k3= fmt= >..</X></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
k3 | yes | KOORD3 | - | position (<a href="#k3">coordinates</a>) of Western border |
fmt | yes | FMT_ID_MIN..FMT_ID_MAX | - | id of <a href="#textfmt">text format</a> |
The tag embraces the text. The text can contain some special and control characters, but no line-breaks (<a href="#textmz">details</a>).
The length is limited to STRLEN_MAX. This limit is valid only for storing files, i.e. in BAHN self a text can be longer. Then it is divided on saving to file and put together on loading from file.
The texts must not overlap. Calculate with up to ZEI_PRO_SYM characters per element.
Directly neighbouring strings should be combined to one string. In result, they get the same text format.
Avoid series of space characters in the way that on one graphic element (nx,ny,nz) there are only spaces, except these become visible by respective text format data, e.g. if they have a visible border. Otherwise, separate the string into 2 ones.
<a name="hst"></a>Stopping points / Stops / Stations
Maximum count of stops:
#define HST_MAXZAHL (60000) /* <a href="#fversion">file format</a> < FV_3881 */
#define HST_MAXZAHL (200000) /* file format ≥ FV_3881 */
Type of stop (combination from the following bits for train types):
#define HSTTYP_LEER 0 /* empty, but e.g. HSTEIG_GSD may be set */ #define HSTTYP_NV1 (1<<(ZUGGAT_NV1-1)) #define HSTTYP_NV2 (1<<(ZUGGAT_NV2-1)) #define HSTTYP_BNV (1<<(ZUGGAT_BNV-1)) #define HSTTYP_REG (1<<(ZUGGAT_REG-1)) #define HSTTYP_EIL (1<<(ZUGGAT_EIL-1)) #define HSTTYP_D1 (1<<(ZUGGAT_D1 -1)) #define HSTTYP_D2 (1<<(ZUGGAT_D2 -1)) #define HSTTYP_EX1 (1<<(ZUGGAT_EX1-1)) #define HSTTYP_EX2 (1<<(ZUGGAT_EX2-1)) #define HSTTYP_EX3 (1<<(ZUGGAT_EX3-1))
Properties of stop (combination from the bits):
#define HSTEIG_NORMAL 0x0000 /* standard value */ #define HSTEIG_2 0x0001 /* is double stop */ #define HSTEIG_3 0x0002 /* is triple stop */ #define HSTEIG_AR 0x0004 /* trains going on-duty only (not non-revenue) */ #define HSTEIG_ER 0x0008 /* trains going off-duty only (not non-rev.) */ #define HSTEIG_GSD 0x0040 /* goods + special trains + non-revenue trips */ #define HSTEIG_L 0x0080 /* given routes only */ #define HSTEIG_NL 0x0100 /* not for given routes */ #define HSTEIG_UNSICHTBAR 0x0200 /* sign is invisible */ #define HSTEIG_TUEREN_ZU 0x0800 /* do not open doors while standing here */
Graphical versions (designs):
#define HST_FORM_MIN 0 #define HST_FORM_MAX 16 #define HST_FORM_MIN_H2O 2 #define HST_FORM_NUR_H 0 Str+bBk: black-white rectangle ("H") without platform H2O: --- #define HST_FORM_NUR_HB 1 Str+bBk: black-white rectangle ("H") with platform H2O: --- #define HST_FORM_KGE_B 2 Str+bBk: small yellow-green sign + platform H2O: Lifebelt + platform #define HST_FORM_KRO_B 3 Str+bBk: small red sign + platform H2O: --- #define HST_FORM_KBL_B 4 Str+bBk: small blue-white sign + platform H2O: --- #define HST_FORM_KGR_B 5 Str+bBk: small green sign + platform H2O: --- #define HST_FORM_GSW_B 6 Str+bBk: large black-white sign + platform H2O: --- #define HST_FORM_GRO_B 7 Str+bBk: large red sign + platform H2O: --- #define HST_FORM_GBL_B 8 Str+bBk: large blue sign + platform H2O: --- #define HST_FORM_GGR_B 9 Str+bBk: large green sign + platform H2O: --- #define HST_FORM_KGE 10 Str+bBk: small yellow-green sign without platform H2O: --- #define HST_FORM_KRO 11 Str+bBk: small red sign without platform H2O: --- #define HST_FORM_KBL 12 Str+bBk: small blue-white sign without platform H2O: --- #define HST_FORM_KGR 13 Str+bBk: small green sign without platform H2O: --- #define HST_FORM_GLI_B 14 Str+bBk: large violet sign + platform H2O: --- #define HST_FORM_GGE_B 15 Str+bBk: large yellow sign + platform H2O: --- #define HST_FORM_GBR_B 16 Str+bBk: large brown sign + platform H2O: ---
Lists of waiting times:
#define MAXWZLISTSIZE 50 /* maximum count of entries, in pairs */ #define WZZEIT_MIN (0) /* 0 = no stop is allowed */ #define WZZEIT_MAX (MAX_HSTMINMAX) #define WZWSL_MIN (1) #define WZWSL_MAX (100)
<code><HaltePkte anz= ></code>
Parameter: anz = count of stops = 0..HST_MAXZAHL
if (anz == 0) then the whole tag is omitted.
The stopping points follow, unsorted.
For each stopping point:
<code><H k3= typ= eig= ri= vneu= sig= bf= wzl= ></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
k3 | yes | KOORD3 | - | position (<a href="#k3">coordinates</a>) |
typ | no | HSTTYP_xxx (hex) | HSTTYP_NV1 | type, mask of HSTTYP_xxx |
eig | no | HSTEIG_xxx (hex) | HSTEIG_NORMAL | properties, mask of HSTEIG_xxx |
ri | yes | RICHTUNGBIT_nnn (hex) | - | directions of effect must be set suitable to the driving way element, each allows 2 directions only, both can be set here |
vneu | no | VMAX_UNDEF or MIN_VMAX..MAX_VMAX | VMAX_UNDEF | speed limit when leaving, VMAX_UNDEF=no limit only important, if the train really stops |
sig | no | MIN_SIGOBJ_NUMMER..MAX_SIGOBJ_NUMMER | SIGSYSNR_UNDEF | signal to wait for on departure |
bf | no | HST_FORM_MIN..HST_FORM_MAX | HST_FORM_MIN_H2O | graphical version (design) |
wzl | no | 0..MAXWZLISTSIZE | 0 | number of entries (pairs) in the list of waiting times, 0 = no list |
The types HSTTYP_L and HSTTYP_NL are exclusive.
To define a "compulsory stop" type (as in some former BAHN versions), combine all train types HSTTYP_xx.
The <a href="#llist">route list</a> is stored only if (eig & ( HSTTYP_L | HSTTYP_NL )).
If it is empty, then none of these bits should be set.
<code><LL>..</LL></code>
The list of waiting times follows only if (wzl > 0).
<code><WzL>..</WzL></code>
It consists of pairs, for each pair:
<code><W t= p= /></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
t | yes | WZZEIT_MIN..WZZEIT_MAX | - | waiting time in sec (=0 then train does not stop) |
p | yes | WZWSL_MIN..WZWSL_MAX | - | partial probability |
The same time should occur only once.
The summary of all partial probabilities is defined as 100%.
<a name="lafa"></a>Speed Restrictions (Speed Limits)
#define LFST_MAXZAHL (90000) maximum number of speed limit signs
Properties, combination of bits:
#define LFSTEIG_NICHTS 0x0000 standard value (init.) #define LFSTEIG_ARDFSONDER 0x0001 going on-service #define LFSTEIG_ERDFSONDER 0x0002 going off-duty #define LFSTEIG_UNSICHTBAR 0x0004 invisible #define LFSTEIG_L 0x0008 only for given routes/train numbers... #define LFSTEIG_NL 0x0010 not for given routes/train numbers... #define LFSTEIG_ZUGENDE 0x0040 valid from train's tail (when completely passed)
Graphical versions (designs):
#define LFST_FORM_MIN 0 #define LFST_FORM_MAX 17 #define LFST_FORM_0 0 GlStr+Bus: Traffic sign (round, red border) bBk: --- H2O: white plate with red border #define LFST_FORM_0_B 1 GlStr+Bus: Traffic sign (round, red border) + platform bBk: --- H2O: white plate with red border + platform #define LFST_FORM_2 2 GlStr+Bus: Traffic sign (round, black border) bBk: --- H2O: blue plate with white line #define LFST_FORM_2_B 3 GlStr+Bus: Traffic sign (round, black border) + platform bBk: --- H2O: blue plate with white line + platform #define LFST_FORM_4 4 GlStr+bBk: orange triangle Bus: --- H2O: --- #define LFST_FORM_4_B 5 GlStr+bBk: orange triangle + platform Bus: --- H2O: --- #define LFST_FORM_6 6 GlStr+bBk: white rectangle Bus: --- H2O: --- #define LFST_FORM_6_B 7 GlStr+bBk: white rectangle + platform Bus: --- H2O: --- #define LFST_FORM_8 8 GlStr+bBk: green triangle Bus: --- H2O: --- #define LFST_FORM_8_B 9 GlStr+bBk: green triangle + platform Bus: --- H2O: --- #define LFST_FORM_10 10 GlStr+bBk: yellow rectangle Bus: --- H2O: --- #define LFST_FORM_10_B 11 GlStr+bBk: yellow rectangle + platform Bus: --- H2O: --- #define LFST_FORM_12 12 GlStr+bBk: white triangle (point down) Bus: --- H2O: --- #define LFST_FORM_12_B 13 GlStr+bBk: white triangle (point down) + platform Bus: --- H2O: --- #define LFST_FORM_14 14 GlStr+bBk: yellow triangle (point down) Bus: --- H2O: --- #define LFST_FORM_14_B 15 GlStr+bBk: yellow triangle (point down) + platform Bus: --- H2O: --- #define LFST_FORM_16 16 GlStr+bBk: green triangle (point up) Bus: --- H2O: --- #define LFST_FORM_16_B 17 GlStr+bBk: green triangle (point up) + platform Bus: --- H2O: ---
<code><LafaPkte anz= ></code>
Parameter: anz = count of speed restriction points = 0..LFST_MAXZAHL
if (anz == 0) then the whole tag is omitted.
The speed restriction points follow, unsorted.
For each speed restriction point:
<code><? k3= eig= ri= bf= v= ></code>
Some properties are coded in the tag name self:
Parameters:
Name | Meaning |
---|---|
E0 | effect on train's tail, lift all limits |
E | effect on train's tail |
V0 | effect on train's head, lift all limits |
V | general version with more parameters and options |
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
k3 | yes | KOORD3 | - | position (<a href="#k3">coordinates</a>) |
eig | no | LFSTEIG_xxx (hex) | LFSTEIG_NICHTS | properties, mask of LFSTEIG_xxx |
ri | yes | RICHTUNGBIT_nnn (hex) | - | directions of effect must be set suitable to the driving way element, each allows 2 directions only, both can be set here |
bf | yes | LFST_FORM_MIN..LFST_FORM_MAX | - | graphical version (design) |
v | no | VMAX_UNDEF or MIN_VMAX..MAX_VMAX | VMAX_UNDEF | speed limit with up to 3 digits after comma, VMAX_UNDEF=no limit only defined when speed for all train types is the same and ≠0 (simple speed restriction) |
When the speed is different for some train types, then there follows a detailed info of multiple lines, for each line:
<code><D z= p= g= s= ></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
z | yes | 0..ZUGGAT_ANZAHL-1, 1..ZUGGAT_ANZAHL-1 | - | train type (priority), the 2nd value defines an interval of multiple types beginning at the first value |
p | no | VMAX_UNDEF or MIN_VMAX..MAX_VMAX | VMAX_UNDEF | speed limit with up to 3 digits after comma, VMAX_UNDEF=no limit for passenger trains |
g | no | VMAX_UNDEF or MIN_VMAX..MAX_VMAX | VMAX_UNDEF | speed limit with up to 3 digits after comma, VMAX_UNDEF=no limit for freight/goods trains |
s | no | VMAX_UNDEF or MIN_VMAX..MAX_VMAX | VMAX_UNDEF | speed limit with up to 3 digits after comma, VMAX_UNDEF=no limit for special trains |
The types LFSTEIG_L and LFSTEIG_NL are exclusive.
The <a href="#llist">route list</a> is stored only if (eig & ( LFSTTYP_L | LFSTTYP_NL )).
If it is empty, then none of these bits should be set.
<code><LL>..</LL></code>
<a name="fzgsatz"></a>Vehicle Sets
This data block contains the information about the vehicle sets
that have to be installed when loading the layout.
Alternatively, this information could be collected from the train data.
However, this would need more time, and all sets would be omitted that have been installed but not used.
<code><FzgSatz anz= ></code>
Parameter: anz = count of vehicle sets ≥ 0
if (anz == 0) then the whole tag is omitted.
The vehicle set numbers follow, sorted by number.
For each set:
<code><S dnr= snr= /></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
dnr | no | -1..NUTZERZGGSATZ_DATEIZAHL-1 | -1 | file number: -1 standard, ≥0 user-defined |
snr | yes | INT32 ≥0 | - | set number in the file, see FZG/NFZ graphics documentation for details 0..NUTZERFMSPSATZNR_PRODATEI-1 for user-defined |
<a name="hgrbmp"></a>Background Bitmap
<code><HgrBild anz= ein= ></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
anz | yes | 0 or 1 | 0 | count of bitmaps (actually supported only 1) |
ein | no | 0 or 1 | 0 | 1 = display of bitmap is on, 0 = off |
if (anz == 0) then the whole tag is omitted.
There follows the picture:
<code><Bild k3= dx_el= dy_el= dname= ></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
k3 | yes | KOORD3 | - | position (<a href="#k3">coordinates</a>) of north west corner, nz=0 |
dx_el | yes | 1..NETZBREITE | - | extent West-East |
dy_el | yes | 1..NETZHOEHE | - | extent North-South |
dname | yes | CHAR16[1..MAXPATH] | - | file name without path Win32-compatible, i.e. of valid characters |
All coordinates and extents given in BAHN coordinates.
The extents in pixels can be found in the header of the bitmap files.
<a name="logp"></a>Log points (Protocolling)
Options for single protocol points:
#define LOGPOPT_NICHTS 0x0000 /* nothing */ #define LOGPOPT_ERR 0x0001 /* Arriving (incoming) */ #define LOGPOPT_VERL 0x0002 /* Leaving */ #define LOGPOPT_ANK 0x0004 /* Arriving to stop */ #define LOGPOPT_ABF 0x0008 /* Leaving stop */ #define LOGPOPT_DISABLE 0x0010 /* out of service */ #define LOGPOPT_LL 0x0020 /* valid only for given routes */ #define LOGPOPT_NLL 0x0040 /* not valid for given routes */ #define LOGPOPT_STANDARD (LOGPOPT_ERR | LOGPOPT_VERL | LOGPOPT_ANK | LOGPOPT_ABF) #define LOGNAMEBZLEN 32 /* maximum length of name of a protocol point in characters */
<code><LogPkte anz= ></code>
Parameter: anz = count of log points ≥0
if (anz == 0) then the whole tag is omitted.
The log points follow, sorted by (ny, nx, -nz).
For each log point:
<code><O k3= name= ri= eig= ></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
k3 | yes | KOORD3 | - | position (<a href="#k3">coordinates</a>) |
name | yes | CHAR16[1..LOGNAMEBZLEN] | - | name (not needed to be unique) |
ri | yes | RICHTUNGBIT_nnn (hex) | - | directions of effect at least one bit, multiple can be set should make sense depending on the driving way element at this position these are the directions when leaving, i.e. the direction that may be changed on the element (e.g. at curves and turnouts) |
eig | no | LOGPOPT_xxx (hex) | LOGPOPT_STANDARD | properties, mask of LOGPOPT_xxxat least one bit must be set except LOGPOPT_DISABLE |
The properties LOGPOPT_LL and LOGPOPT_NLL are exclusive.
The <a href="#llist">route list</a> is stored only if (eig & ( LOGPOPT_LL | LOGPOPT_NLL )).
If it is empty, then none of these bits should be set.
<code><LL>..</LL></code>
<a name="prellb"></a>Bumpers / Line ends
#define PRELL_MAXZAHL 40000 maximum count of bumpers / line ends
Graphical versions (designs):
#define PRELL_FORM_MIN 0 #define PRELL_FORM_MAX 11 for each _n without platform, _BR platform left, _BL right, _B2 both sides #define PRELL_FORM_0 0 #define PRELL_FORM_0_BR 1 #define PRELL_FORM_0_BL 2 #define PRELL_FORM_0_B2 3 GlStr+bBk: red sign (German railways Sh2 sign) Bus: traffic sign + barrier H2O: white-red-white sign #define PRELL_FORM_1 4 #define PRELL_FORM_1_BR 5 #define PRELL_FORM_1_BL 6 #define PRELL_FORM_1_B2 7 GlStr+Bus: --- bBk: bumper (concrete) H2O: yellow buoy #define PRELL_FORM_2 8 #define PRELL_FORM_2_BR 9 #define PRELL_FORM_2_BL 10 #define PRELL_FORM_2_B2 11 GlStr+Bus: --- bBk: bumper black (steel) H2O: ---
<code><WendePkte anz= ></code>
Parameter: anz = count of bumpers = 0..PRELL_MAXZAHL
if (anz == 0) then the whole tag is omitted.
The bumpers follow, unsorted.
For each line terminator:
<code><B k3= t= bf= /></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
k3 | yes | KOORD3 | - | position (<a href="#k3">coordinates</a>) |
t | no | 0..MAXRGZEIT | 0 | time for turning, in sec |
bf | no | PRELL_FORM_MIN..PRELL_FORM_MAX | PRELL_FORM_0 | graphical version (design) |
<a name="infotext"></a>Local Information Texts
<code><InfoTexte anz= ></code>
Parameter: anz = count of info texts >0
if (anz == 0) then the whole tag is omitted.
The local info texts follow one after the other, usually sorted by ny, nx, -nz.
<a href="#textinfo">Info texts</a> belonging to objects (trains, routes, signal systems) have
the same structure but are stored at the respective object and do not have own coordinates.
For each info text:
<code><IT k3= >..</IT></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
k3 | yes | KOORD3 | - | position (<a href="#k3">coordinates</a>) |
The text is embraced by the tag and is a <a href="#textmz">multi-line text</a>.
The maximum length is MAXINFOTEXTSIZE-1.
<a name="soundp"></a>Sound Points
#define SOUNDP_MAXZAHL 40000 /* maximum count of sound points */
Properties, a valid combination of SOUNDPEIG_xxx:
#define SOUNDPEIG_NICHTS 0x0000 /* as return code only */ #define SOUNDPEIG_PFEIFEN1 0x0001 /* horn once */ #define SOUNDPEIG_PFEIFEN2 0x0002 /* horn twice (combine with _PFEIFEN1) */ #define SOUNDPEIG_LAEUTENA 0x0004 /* begin ringing */ #define SOUNDPEIG_LAEUTENE 0x0008 /* end ringing */ #define SOUNDPEIG_LAEUTEN1 0x0010 /* once ringing */ #define SOUNDPEIG_LIN 0x0080 /* only for given routes */ #define SOUNDPEIG_NLIN 0x0100 /* negation: only non-given routes */
Graphical versions (designs):
#define SOUNDP_FORM_MIN 0 #define SOUNDP_FORM_MAX 13 without platform: Bit0=0 with platform: Bit0=1 "Land"=GlStr+Bus+bBk, i.e. all except H2O #define SOUNDP_FORM_0 0 #define SOUNDP_FORM_0_B 1 Land: Rectangle sign, cream with violett horn (phantasy sign) H2O: the same #define SOUNDP_FORM_2 2 #define SOUNDP_FORM_2_B 3 Land: as 0, red crossed H2O: the same #define SOUNDP_FORM_4 4 #define SOUNDP_FORM_4_B 5 Land: white rectangle plate with black text ("L") H2O: white square plate with red border and black point (nearly identical to speed limit sign, "Attention Danger") #define SOUNDP_FORM_6 6 #define SOUNDP_FORM_6_B 7 Land: white rectangle plate with black text ("L") H2O: -- #define SOUNDP_FORM_8 8 #define SOUNDP_FORM_8_B 9 Land: 2 white rectangle plates with black text above ("PP") H2O: -- #define SOUNDP_FORM_10 10 #define SOUNDP_FORM_10_B 11 Land: 2 white rectangle plates with black text beneath ("PL") H2O: -- #define SOUNDP_FORM_12 12 #define SOUNDP_FORM_12_B 13 Land: white diamond-shaped plate with black text ("F") (NL: signal 312 of NS railway, "fluiten" = to horn) H2O: --
<code><SoundPkte anz= ></code>
Parameter: anz = count of sound points = 0..SOUNDP_MAXZAHL
if (anz == 0) then the whole tag is omitted.
The sound points follow, unsorted.
For each sound point:
<code><U k3= eig= ri= bf= ></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
k3 | yes | KOORD3 | - | position (<a href="#k3">coordinates</a>) |
eig | no | SOUNDPEIG_xxx (hex) | SOUNDPEIG_PFEIFEN1 | properties, mask of SOUNDPEIG_xxx |
ri | yes | RICHTUNGBIT_nnn (hex) | - | directions of effect must be set suitable to the driving way element, each allows 2 directions only, both can be set here |
bf | no | SOUNDP_FORM_MIN..SOUNDP_FORM_MAX | SOUNDP_FORM_0 | graphical version (design) |
The properties SOUNDPEIG_LIN and SOUNDPEIG_NLIN are exclusive.
The <a href="#llist">route list</a> is stored only if (eig & ( SOUNDPEIG_LIN | SOUNDPEIG_NLIN )).
If it is empty, then none of these bits should be set.
<code><LL>..</LL></code>
<a name="anhang"></a>Attached Additional Files
The whole tag follows only if stated in the <a href="#allg">general data</a> anhang=1.
<code> <Anhang>..</Anhang></code>
The tag embraces the entries for the individual files.
For each:
<code> <Dt name= ln= tg= zt= >..</Dt></code>
Parameters:
Name | Needed | Value | Default | Meaning |
---|---|---|---|---|
name | yes | CHAR16[1..MAXPATH] | - | file name without path Win32-compatible, i.e. of valid characters |
ln | yes | INT32 >0 | - | file length in bytes |
tg | yes | YYYY-MM-DD | - | date of the file, year-month(01..12)-day(01..31) |
zt | yes | <a href="#zeit">ZEITD</a> | - | time of the file, day of week = WTAG_KEIN |
The tag covers the complete file, binary copied, i.e. not XML-compatible.
The following files are attached, if existing:
Extension | Contents |
---|---|
.uz1, .uzg | Zoom1 user-defined scenery archive files |
.uz2, .uz4 | Zoom2+4 user-defined scenery archive files |
.bnm | user-defined animation control files |
.uz1, .uz2, .uz4 | Zoom1+2+4 user-defined signal/way archive files |
.gz1, .gz2, .gz4 | Zoom1+2+4 user-defined scenery/signal/way single files |
.nfz | Zoom1 user-defined vehicle archive files |
.ufg + .uzz | old Zoom1 user-defined vehicle archive files |
.fzz, .fz2, .fz4 | Zoom2+4 user-defined vehicle single files |
.bmp | background bitmap file |
<a name="appendix"></a>Appendix
<a name="elemweg"></a>Numbers/Coding of driving way elements
The general constants, data and coding are given in the <a href="#netz">Layout data</a> section.
The following list only gives the elements completely, that differ from the coding by RICHTUNG_xxx.
To get the correct driving way version, add the numbers to the respective mask MIN_GLEISxxx,
MIN_WASSERxxx or MIN_BUSxxx.
Abbreviations:
W West NW Northwest E East SW Southwest N North NE Northeast S South SE Southeast
Number | Function |
---|---|
0 | straight way, "horizontal" W-E |
1 | straight way, "vertical" N-S |
2 | straight way, 45° NW-SE |
3 | straight way, 45° SW-NE |
4..7 | not used |
8 | curve 90° S-W |
9 | curve 90° N-W |
10 | curve 90° N-E |
11 | curve 90° S-E |
12 | double slip turnout (English points) W-E, NW-SE |
13 | double slip turnout W-E, SW-NE |
14 | double slip turnout N-S, NW-SE |
15 | double slip turnout N-S, SW-NE |
16 | simple slip turnout N-S, NW-SE, curve S-NW |
17 | simple slip turnout N-S, NW-SE, curve N-SE |
18 | simple slip turnout N-S, SW-NE, curve S-NE |
19 | simple slip turnout N-S, SW-NE, curve N-SW |
20 | simple slip turnout W-E, NW-SE, curve W-SE |
21 | simple slip turnout W-E, NW-SE, curve E-NW |
22 | simple slip turnout W-E, SW-NE, curve E-SW |
23 | simple slip turnout W-E, SW-NE, curve W-NE |
24 | curve 45° NW-S |
25 | curve 45° SW-N |
26 | curve 45° N-SE |
27 | curve 45° S-NE |
28 | curve 45° W-SE |
29 | curve 45° W-NE |
30 | curve 45° NW-E |
31 | curve 45° SW-E |
32 | crossing of straight lines 90° W-E, N-S |
33 | crossing of straight lines 90° NW-SE, SW-NE |
34..38 | not used |
39 | crossing of straight lines 45° NW-SE, N-S |
40 | crossing of straight lines 45° SW-NE, N-S |
41 | crossing of straight lines 45° NW-SE, W-E |
42 | crossing of straight lines 45° SW-NE, W-E |
43 | crossing of 3 straight lines NW-SE, SW-NE, N-S |
44 | crossing of 3 straight lines NW-SE, SW-NE, W-E |
45 | crossing of 3 straight lines W-E, N-S, NW-SE |
46 | crossing of 3 straight lines W-E, N-S, SW-NE |
47 | crossing of 4 straight lines W-E, N-S, NW-SE, SW-NE |
48 | right turnout 45° W-E, W-SE |
49 | left turnout 45° W-E, W-NE |
50 | right turnout 45° E-W, E-NW |
51 | left turnout 45° E-W, E-SW |
52 | right turnout 45° S-N, S-NE |
53 | left turnout 45° S-N, S-NW |
54 | right turnout 45° N-S, N-SW |
55 | left turnout 45° N-S, N-SO |
56 | right turnout 45° SW-NE, SW-E |
57 | left turnout 45° SW-NE, SW-N |
58 | right turnout 45° NE-SW, NE-W |
59 | left turnout 45° NE-SW, NE-S |
60 | right turnout 45° SE-NW, SE-N |
61 | left turnout 45° SE-NW, SE-W |
62 | right turnout 45° NW-SE, NW-S |
63 | left turnout 45° NW-SE, NW-E |
64 | Y turnout 45° S-NW, S-NE |
65 | Y turnout 45° N-SW, N-SE |
66 | Y turnout 45° E-SW, E-NW |
67 | Y turnout 45° W-NE, W-SE |
68 | Y turnout 45° NW-E, NW-S |
69 | Y turnout 45° SE-W, SE-N |
70 | Y turnout 45° NE-W, NE-S |
71 | Y turnout 45° SW-E, SW-N |
72 | 3-way turnout 45° S-NW, S-NE, S-N |
73 | 3-way turnout 45° N-SW, N-SE, N-S |
74 | 3-way turnout 45° E-SW, E-NW, E-W |
75 | 3-way turnout 45° W-NE, W-SE, W-E |
76 | 3-way turnout 45° NW-E, NW-S, NW-SE |
77 | 3-way turnout 45° SE-W, SE-N, SE-NW |
78 | 3-way turnout 45° NE-W, NE-S, NE-SW |
79 | 3-way turnout 45° SW-E, SW-N, SW-NE |
80 | right turnout 90° W-E, W-S |
81 | left turnout 90° W-E, W-N |
82 | right turnout 90° E-W, E-N |
83 | left turnout 90° E-W, E-S |
84 | right turnout 90° S-N, S-E |
85 | left turnout 90° S-N, S-W |
86 | right turnout 90° N-S, N-W |
87 | left turnout 90° N-S, N-E |
88 | combined turnout 2×45° N-S, N-SW, S-NW |
89 | combined turnout 2×45° N-S, N-SE, S-NE |
90 | combined turnout 2×45° W-E, W-SE, E-SW |
91 | combined turnout 2×45° W-E, W-NE, E-NW |
92 | combined turnout 2×45° NW-SE, NW-E, SE-N |
93 | combined turnout 2×45° NW-SE, NW-S, SE-W |
94 | combined turnout 2×45° SW-NE, SW-E, NE-S |
95 | combined turnout 2×45° SW-NE, SW-N, NE-W |
96..127 | not used |
128..135 | sound points (all designs) |
136 | depot W-E (design 0: hall, old) |
137 | depot N-S (design 0) |
138 | depot NW-SE (design 0) |
139 | depot SW-NE (design 0) |
140..143 | depot (design 1: hall, more modern) |
144..147 | depot (design 2: works pit) |
148..151 | depot (design 3: "D" letter only) |
152..159 | timing points (all designs) |
160..167 | platforms one side |
168..175 | line ends / bumpers (all designs) |
176..183 | speed restriction signs (all designs) |
184..191 | ramps (travelling direction is upwards, to nz+1) |
192..199 | shunting points (all designs) |
200..207 | data change points (all designs) |
208 | bridge/tunnel entry from S, concrete, without piers, without railing |
209 | bridge/tunnel entry from S, concrete, without piers, with railing |
210 | bridge/tunnel entry from S, steel grid, without piers, with railing |
211..215 | not used |
216-223 | bridge/tunnel entry design 0 |
224-231 | bridge/tunnel entry design 1 (gray) |
232-239 | bridge/tunnel entry design 2 (black grid construction) |
240-247 | bridge/tunnel entry design 3 |
248-255 | bridge/tunnel entry design 4 |
256 | platform, 2 sides, W-E |
257 | platform, 2 sides, N-S with extension to (ny-1) position |
258 | platform, 2 sides, NW-SE |
259 | platform, 2 sides, SW-NE |
260 | way through station hall N-S |
261 | way through station hall N-S, platform right |
262 | way through station hall N-S, platform left |
263 | way through station hall N-S, platform at both sides |
264..271 | stopping points (all designs) |
272 | crossing straight with curve 45° W-E, NW-S |
273 | crossing straight with curve 45° W-E, NE-S |
274 | crossing straight with curve 45° W-E, N-SE |
275 | crossing straight with curve 45° W-E, N-SW |
276 | crossing straight with curve 45° N-S, SW-E |
277 | crossing straight with curve 45° N-S, NW-E |
278 | crossing straight with curve 45° N-S, W-NE |
279 | crossing straight with curve 45° N-S, W-SE |
280 | crossing straight with curve 45° NW-SE, NE-S |
281 | crossing straight with curve 45° NW-SE, NE-W |
282 | crossing straight with curve 45° NW-SE, SW-N |
283 | crossing straight with curve 45° NW-SE, SW-E |
284 | crossing straight with curve 45° SW-NE, W-SE |
285 | crossing straight with curve 45° SW-NE, N-SE |
286 | crossing straight with curve 45° SW-NE, NW-E |
287 | crossing straight with curve 45° SW-NE, NW-S |
288 | crossing from 2 curves 45° each (wide angle) W-NE, NW-S |
289 | crossing from 2 curves 45° each (wide angle) NW-E, NE-S |
290 | crossing from 2 curves 45° each (wide angle) SW-E, N-SE |
291 | crossing from 2 curves 45° each (wide angle) W-SE, N-SW |
292 | crossing from 2 curves 45° each (wide angle) NW-S, SW-E |
293 | crossing from 2 curves 45° each (wide angle) N-SW, NW-E |
294 | crossing from 2 curves 45° each (wide angle) N-SE, W-NE |
295 | crossing from 2 curves 45° each (wide angle) NE-S, W-SE |
296 | crossing from 2 curves 45° each (small angle) N-SW, S-NW |
297 | crossing from 2 curves 45° each (small angle) N-SE, S-NE |
298 | crossing from 2 curves 45° each (small angle) W-SE, E-SW |
299 | crossing from 2 curves 45° each (small angle) W-NE, E-NW |
300 | crossing from 2 curves 45° each (small angle) NW-E, SE-N |
301 | crossing from 2 curves 45° each (small angle) NW-S, SE-W |
302 | crossing from 2 curves 45° each (small angle) SW-E, NE-S |
303 | crossing from 2 curves 45° each (small angle) SW-N, NE-W |
304..391 | not used |
392..399 | switching contacts (all designs) |
400..407 | combined signals, clear (all designs) |
408..415 | combined signals, caution (all designs) |
416..423 | combined signals, danger (all designs) |
424..431 | distant signals, clear (all designs) |
432..439 | distant signals, caution (all designs) |
440..447 | stop signals, clear (all designs) |
448..455 | stop signals, danger (all designs) |
456..463 | grade crossing signals, clear (all designs) |
464..471 | grade crossing signals, danger (all designs) |
472..479 | 3-way-turnouts for separating driving way "road" from
driving way "track on road":
|
480..487 | 3-way-turnouts for separating driving way "road" from
driving way "track on road":
|
488..495 | 3-way-turnouts for separating driving way "road" from
driving way "track on road":
|
496..503 | curves 45° with platform on outer side, order/coding the same as simple curves 45° |
504..511 | curves 45° with platform on inner side, order/coding the same as simple curves 45° |
Let the trains run...
Jan Bochmann
</body> </html>