xmlscripting:xmldb-de
Differences
This shows you the differences between two versions of the page.
— | xmlscripting:xmldb-de [2023/04/18 08:24] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== XML-Script-Beispiele ====== | ||
+ | [[: | ||
+ | [[: | ||
+ | * [[: | ||
+ | * **[[: | ||
+ | |||
+ | |||
+ | \\ | ||
+ | Befehls-Übersicht: | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | =====Befehls-Beispiele===== | ||
+ | | :!: Die Anführungszeichen auf dieser Seite können in XML __**nicht**__ verwendet werden. \\ Zu tun: Beispiele im Wiki-Quelltext mit doppelten % -Zeichen beginnen und beenden. \\ Falsch: <lc id=" | ||
+ | | Für Beispiele bis 26.08.2015 21:19 erledigt. < | ||
+ | \\ | ||
+ | |||
+ | ==== Lok-Befehle ==== | ||
+ | ^ Innerhalb < | ||
+ | | %%<lc cmd=" | ||
+ | | %%<lc cmd=" | ||
+ | | %%<lc cmd=" | ||
+ | | %%<lc cmd=" | ||
+ | | %%<lc cmd=" | ||
+ | | %%<lc cmd=" | ||
+ | | %%<lc cmd=" | ||
+ | | %%<lc cmd=" | ||
+ | | %%<lc cmd=" | ||
+ | | __//nicht verfügbar// | ||
+ | | __//nicht verfügbar// | ||
+ | | %%<fn fnchanged=" | ||
+ | |||
+ | Befehle: go, stop, velocity, velocity2, percent dispatch, swap, blockside, carcount, min, mid, cruise, max, consist, assigntrain, | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====Variable==== | ||
+ | ^ Innerhalb < | ||
+ | | %%<vr id=" | ||
+ | | %%<vr id=" | ||
+ | | %%<vr id=" | ||
+ | | %%<vr id=" | ||
+ | | %%<vr id=" | ||
+ | | %%<vr id=" | ||
+ | | %%<vr id=" | ||
+ | | %%<vr id=" | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====Klassen==== | ||
+ | ^ Innerhalb < | ||
+ | | %%<lc cmd=" | ||
+ | | %%<lc cmd=" | ||
+ | | %%<bk cmd=" | ||
+ | | %%<bk cmd=" | ||
+ | | %%<bk cmd=" | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | ====Blöcke==== | ||
+ | ^ Innerhalb < | ||
+ | | __//Nicht verfügbar// | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====Rückmelder==== | ||
+ | ^ Innerhalb < | ||
+ | | __// | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====Textfelder==== | ||
+ | ^ Innerhalb < | ||
+ | | __//nicht verfügbar// | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====Pausenbefehl (Sleep)==== | ||
+ | ^ Innerhalb < | ||
+ | | %%<sleep time=" | ||
+ | | %%<sleep time="# | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | =====Bedingungs-Beispiele===== | ||
+ | \\ | ||
+ | Beispiele zur Prüfung mehrerer Bedingungen: | ||
+ | < | ||
+ | <if condition=" | ||
+ | <if condition=" | ||
+ | <if condition=" | ||
+ | </ | ||
+ | \\ | ||
+ | Beispiel zur Prüfung mehrerer Bedingungen; | ||
+ | < | ||
+ | <if condition="# | ||
+ | </ | ||
+ | \\ | ||
+ | \\ | ||
+ | Beispiele zur Prüfung ganzer Tabellen: | ||
+ | < | ||
+ | <foreach table=" | ||
+ | <foreach table=" | ||
+ | <foreach table=" | ||
+ | </ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | =====Sub-Scripte und Script verlassen===== | ||
+ | \\ | ||
+ | Ein Sub-Script aufrufen oder das aktuelle Script verlassen: | ||
+ | \\ | ||
+ | ^ XML ^ Remarks ^ | ||
+ | | %%<sub file=" | ||
+ | | %%<exit cmt=" | ||
+ | cmt=“reason” kann für Tracing verwendet werden. | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | =====Schleife unterbrechen===== | ||
+ | \\ | ||
+ | Eine Schleife verlassen, wenn eine Bedingung passt: | ||
+ | \\ | ||
+ | ^ XML ^ Remarks ^ | ||
+ | | %%<break cmt=" | ||
+ | cmt=“reason” kann für Tracing verwendet werden. | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | =====Aktions-Steuerung===== | ||
+ | \\ | ||
+ | Eine existierende Aktion aufrufen, wenn eine Bedingung WAHR ist. | ||
+ | \\ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | Aktion " | ||
+ | Um eine existierende Aktion von Scripten mehrmals mit verschiedenen Bedingungen aufzurufen. | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | =====Fahrdienstleiter- und Wagen-Befehle===== | ||
+ | \\ | ||
+ | < | ||
+ | <car id=" | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | emptycar, loadcar, addcar, leavecar. Im Attribut Wagenkennungen (carids) muss eine kommaseparierte Liste von Wagen spezifiziert sein. | ||
+ | \\ | ||
+ | Wagen-Befehle: | ||
+ | \\ | ||
+ | Fahrdienstleiter-Befehle: | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | =====System-Befehle===== | ||
+ | \\ | ||
+ | < | ||
+ | <sys cmd=" | ||
+ | </ | ||
+ | Befehle: stoplocs, stop, go, shutdown, resume, on, off, ebreak, resetfx, time, v0locos, shortcut(short circuit) | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | =====Beispiel-Code===== | ||
+ | \\ | ||
+ | < | ||
+ | < | ||
+ | <sys cmd=" | ||
+ | <vr id=" | ||
+ | <tx id=" | ||
+ | <bk id=" | ||
+ | <vr id=" | ||
+ | <lc id=" | ||
+ | <car id=" | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | <if condition=" | ||
+ | < | ||
+ | <tx id=" | ||
+ | <lc id=" | ||
+ | <vr id=" | ||
+ | <tx id=" | ||
+ | <vr id=" | ||
+ | <vr id=" | ||
+ | </ | ||
+ | < | ||
+ | <sub file=" | ||
+ | <exit cmt=" | ||
+ | </ | ||
+ | </if> | ||
+ | <foreach table=" | ||
+ | <vr id=" | ||
+ | <break cmt=" | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | \\ | ||
+ | =====User Examples===== | ||
+ | //User examples are as is and are not officially supported.// | ||
+ | |||
+ | * [[: | ||
+ | * [[: | ||
+ | * [[: | ||
+ | * [[: | ||
+ | * [[: | ||
+ | * [[: | ||
+ | * [[: | ||
+ | * [[: | ||
+ | * [[wiki: | ||