User Tools

Site Tools


userpages:hermannk:departdelaychange-en

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
userpages:hermannk:departdelaychange-en [2021/02/27 23:00] – [Depart Delay - Change] hermannkuserpages:hermannk:departdelaychange-en [2023/09/11 15:55] (current) – [The script (multiple blocks)] hermannk
Line 1: Line 1:
 ====== Depart Delay - Change ====== ====== Depart Delay - Change ======
-[[:userpages#hermannk|Userpages - hermannk]] \\ +[[:userpages#Hermann (hermannk)|Userpages - Hermann (hermannk)]] \\ 
- + \\
- +
 This XML-script solution was requested by a user who needed an extra amount of time for the build-in "Depart Delay" of a block. \\ This XML-script solution was requested by a user who needed an extra amount of time for the build-in "Depart Delay" of a block. \\
-|  Direct jump to the [[userpages:hermannk:departdelay-en#the_workspace|workspace]].  |+|  Direct jump to the [[userpages:hermannk:departdelaychange-en#the_workspace|workspace]] download (update 11.09.2023).  |
  
 ===== Introduction ===== ===== Introduction =====
-The properties of a block hold a "Depart Delay" value (in seconds). As the locomotive gets the "start" command the velocity command is delayed by the "Depart Delay" value (see [[:block-gen-en#depart_delay|Block - Depart Delay]]). \\+The "Depart Delay" value (in seconds) is part of the properties of a block. As the locomotive gets the "start" command the velocity command is delayed by the "Depart Delay" value (see [[:block-gen-en#depart_delay|Block - Depart Delay]]). \\
 Because of special reasons this value should be increased during runtime for certain locomotives. \\ Because of special reasons this value should be increased during runtime for certain locomotives. \\
  \\  \\
Line 23: Line 21:
   <if condition="@vr_ddS_class = DELAY"> \\   <if condition="@vr_ddS_class = DELAY"> \\
  
-|  Direct jump to the [[userpages:hermannk:departdelay-en#the_workspace|workspace]].  |+|  Direct jump to the [[userpages:hermannk:departdelaychange-en#the_workspace|workspace]] download.  |
  
 ===== Explaining the script ===== ===== Explaining the script =====
Line 61: Line 59:
 ==== Changing the Depart Delay value ==== ==== Changing the Depart Delay value ====
 It is still assumed that a locomotive of class "DELAY" is using this block. \\ It is still assumed that a locomotive of class "DELAY" is using this block. \\
-The **model** of the calling block (**%callerid%**) needs got be changed by the new value "#vr_ddS_newValue": +The data structure of the calling block (**%callerid%**) needs got be changed by the new value "#vr_ddS_newValue": 
-    <model cmd="change"+    <set vr="vr_ddS_newValue" table="bklist" id="%callerid%" set="departdelay" setint="true"/>
-      <bk id="%callerid%" departdelay="#vr_ddS_newValue"/+
-    </model>+
 As can be seen the value attribute ("#") is used with "#vr_ddS_newValue" - not the text attribute ("@"). \\ As can be seen the value attribute ("#") is used with "#vr_ddS_newValue" - not the text attribute ("@"). \\
  
Line 92: Line 88:
     </then>     </then>
     </if>     </if>
-    <model cmd="change"+     <set vr="vr_ddS_newValue" table="bklist" id="%callerid%" set="departdelay" setint="true"/>
-      <bk id="%callerid%" departdelay="#vr_ddS_newValue"/+
-    </model>+
   </then>   </then>
   </if>   </if>
Line 131: Line 125:
     </if>     </if>
      
-    <model cmd="change"+    <set vr="vr_ddS_%callerid%_newValue" table="bklist" id="%callerid%" set="departdelay" setint="true"/>
-      <bk id="%callerid%" departdelay="#vr_ddS_%callerid%_newValue"/+
-    </model>+
   </then>   </then>
   </if>   </if>
Line 139: Line 131:
  
 ===== Installation ===== ===== Installation =====
-The test plan looks like this. (direct jump to the [[userpages:hermannk:departdelay-en#the_workspace|workspace]] download) \\+The test plan looks like this. (direct jump to the [[userpages:hermannk:departdelaychange-en#the_workspace|workspace]] download) \\
 {{:userpages:hermannk:departdelay_plan.png?}} \\ {{:userpages:hermannk:departdelay_plan.png?}} \\
  
Line 173: Line 165:
 Have fun. \\ Have fun. \\
 ===== The workspace ===== ===== The workspace =====
-The {{ :userpages:hermannk:departdelay.zip|workspace}} to test the script. \\+Update: 11.09.2023 \\ 
 +XMLscript "ac_departdelaySet.xml" has been modified: \\ 
 +old: \\ 
 +    <model cmd="change"> 
 +      <bk id="%callerid%" departdelay="#vr_ddS_%callerid%_newValue"/> 
 +    </model> 
 +New: \\ 
 +    <set vr="vr_ddS_%callerid%_newValue" table="bklist" id="%callerid%" set="departdelay" setint="true"/> 
 + \\ 
 +The {{ :userpages:hermannk:departdelay_20230911.zip|workspace}} to test the script. \\
 {{:userpages:hermannk:departdelay_plan.png?}} \\ {{:userpages:hermannk:departdelay_plan.png?}} \\
  
  
userpages/hermannk/departdelaychange-en.1614463212.txt.gz · Last modified: 2021/02/27 23:00 by hermannk