xmlscripting-en
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
xmlscripting-en [2020/10/03 15:02] – [Condition format] boris | xmlscripting-en [2021/07/24 22:24] – [Commands] boris | ||
---|---|---|---|
Line 8: | Line 8: | ||
* [[: | * [[: | ||
+ | \\ | ||
+ | ^ NOT FOR NOVICE USERS !!! ^ | ||
\\ | \\ | ||
{{: | {{: | ||
Line 18: | Line 20: | ||
- If uncertain: Do not use XMLScript, or ask for help in the __**[[https:// | - If uncertain: Do not use XMLScript, or ask for help in the __**[[https:// | ||
- Do not use the same variables in multiple XMLScripts, which will be set to new values, to avoid unexpected results including Server crashes. | - Do not use the same variables in multiple XMLScripts, which will be set to new values, to avoid unexpected results including Server crashes. | ||
+ | |||
+ | |||
__**[[start# | __**[[start# | ||
Line 23: | Line 27: | ||
\\ | \\ | ||
=====Introduction===== | =====Introduction===== | ||
+ | :!: Check basic Rocrail functionality before inventing the wheel again with XMLScript.\\ | ||
+ | |||
XMLScript can be used in combination with __**[[: | XMLScript can be used in combination with __**[[: | ||
Its primary goal is to simplify and to reduce the number of actions and conditions.\\ | Its primary goal is to simplify and to reduce the number of actions and conditions.\\ | ||
Line 250: | Line 256: | ||
</ | </ | ||
+ | // Multiple case values are deprecated, and are strongly discourage to use.//\\ | ||
A case may have multiple integer values in the following format:\\ | A case may have multiple integer values in the following format:\\ | ||
<code xml> | <code xml> | ||
Line 446: | Line 453: | ||
| ! | not equal number | | | ! | not equal number | | ||
| # | equal text | | | # | equal text | | ||
- | | ~ | contains text (@var_1 ~ @var_2 is true, when text of var_1 contains complete text of var_2) | | ||
| - | not equal text | | | - | not equal text | | ||
| > | greater than number | | | > | greater than number | | ||
| < | smaller than number | | | < | smaller than number | | ||
+ | | ~ | contains text (@var_1 ~ @var_2 is true, when text of var_1 contains complete text of var_2) - since version 2.1.1010| | ||
====alltrue==== | ====alltrue==== | ||
Line 485: | Line 492: | ||
| Sensor | fb | true, false, on, off | true = on, false = off | | | Sensor | fb | true, false, on, off | true = on, false = off | | ||
| Output | co | on, off, active | | | | Output | co | on, off, active | | | ||
+ | | Location | location | free | The ' | ||
| Block | bk | free, occupied, closed, open, reserved | | | | Block | bk | free, occupied, closed, open, reserved | | | ||
| Turntable | tt | free, occupied, closed, open, reserved, #, pending | The # represents the current bridge position. \\ If state pending is true the bridge is moving. | | | Turntable | tt | free, occupied, closed, open, reserved, #, pending | The # represents the current bridge position. \\ If state pending is true the bridge is moving. | | ||
Line 490: | Line 498: | ||
| System | sys | go, stop | | | | System | sys | go, stop | | | ||
| Automode | auto | on, off | | | | Automode | auto | on, off | | | ||
- | | Locomotive | lc | fwd, rev, +, -, min, mid, cruise, max, block, "// | + | | Locomotive | lc | fwd, rev, +, -, min, mid, cruise, max, block, "// |
| Car | car | empty, loaded, maintenance, | | Car | car | empty, loaded, maintenance, | ||
| Waybill | waybill | waiting, shipping, delivered, "// | | Waybill | waybill | waiting, shipping, delivered, "// | ||
Line 505: | Line 513: | ||
=====Commands===== | =====Commands===== | ||
Note: \\ | Note: \\ | ||
- | * With " | + | * With " |
* The special implemented action commands are listed separately. | * The special implemented action commands are listed separately. | ||
Line 511: | Line 519: | ||
\\ | \\ | ||
^ Object Name ^ Object type ^ Commands ^States ^ Remark ^ Example ^ | ^ Object Name ^ Object type ^ Commands ^States ^ Remark ^ Example ^ | ||
- | | Loco | lc | All https:// | + | | Loco | lc | All https://wiki.rocrail.net/ |
- | | Function | fn | All and fndesc, fncmd | | The fnchanged or the fndesc, function description, | + | | Function | fn | All and fndesc, fncmd, group 1..7 | | The fnchanged or the fndesc, function description, |
| Switch | sw | All | | | | Switch | sw | All | | | ||
| Signal | sg | All | | | | Signal | sg | All | | | ||
Line 536: | Line 544: | ||
| Weather | weather | setweather, weathertheme | | | | Weather | weather | setweather, weathertheme | | | ||
| Light | light | flip, enable, disable | Enable a light from LightControl. | | | Light | light | flip, enable, disable | Enable a light from LightControl. | | ||
+ | | LightControl | lightctrl | go, stop | Enable / disable LightControl. | %%< | ||
| Model | model | All https:// | | Model | model | All https:// | ||
xmlscripting-en.txt · Last modified: 2024/02/15 10:43 by rjversluis