User Tools

Site Tools


usage:atlatc:api

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
usage:atlatc:api [2021-03-02 20:18]
orwell commit 6135f8a2 part 2
usage:atlatc:api [2021-05-26 22:12]
ywang
Line 78: Line 78:
 === interrupt_safe(time, message) === === interrupt_safe(time, message) ===
  
-//since version 3.0//+//since version 2.3.0//
  
 Like ''interrupt()'', but does not add an interrupt and returns false when an interrupt (of any type) is already present for this component. Returns true when interrupt was successfully added. Like ''interrupt()'', but does not add an interrupt and returns false when an interrupt (of any type) is already present for this component. Returns true when interrupt was successfully added.
Line 88: Line 88:
 === clear_interrupts() === === clear_interrupts() ===
  
-//since version 3.0//+//since version 2.3.0//
  
 Removes any pending interrupts (both of type 'int' and 'ext_int') set on this node. Removes any pending interrupts (both of type 'int' and 'ext_int') set on this node.
Line 94: Line 94:
 ==== Remote ATC ==== ==== Remote ATC ====
  
-//since version 3.0//+//since version 2.3.0//
  
 In addition to ''atc_send()'' described below, LuaATC provides the possibility to send ATC commands to any train in the world knowing its train ID, by means of the following function. In addition to ''atc_send()'' described below, LuaATC provides the possibility to send ATC commands to any train in the world knowing its train ID, by means of the following function.
Line 253: Line 253:
  
 If there is no train, same behavior as [[#get_line()]] applies. If there is no train, same behavior as [[#get_line()]] applies.
 +
 +=== train_length() === 
 +Returns the number of wagons in a train.
  
 === set_shunt() === === set_shunt() ===
Line 262: Line 265:
  
 === atc_set_ars_disable(value) === === atc_set_ars_disable(value) ===
 +
 +//since version 2.3.0//
 +
 Enables (''value == false'') or disables (''value == true'') interlocking for this train. The train will not trigger automatic route setting on signals based on ARS. Enables (''value == false'') or disables (''value == true'') interlocking for this train. The train will not trigger automatic route setting on signals based on ARS.
  
 This function has essentially the same effect as the ATC command ''[[usage:nodes:atc_controller#a_enable_ARS|A<enable_ARS>]]''. This function has essentially the same effect as the ATC command ''[[usage:nodes:atc_controller#a_enable_ARS|A<enable_ARS>]]''.
- 
-**This function is experimental and currently available only in the ''[[http://git.bananach.space/advtrains.git/tree/?h=luaatc-extensions|luaatc-extensions]]'' branch of Advtrains.** 
  
 === atc_set_lzb_tsr(speed) === === atc_set_lzb_tsr(speed) ===
 +
 +//since version 2.3.0//
  
 Adds a Temporary Speed Restriction at the current rail, so that the train is passing the rail at the specified ''speed'', or at a lower speed. Adds a Temporary Speed Restriction at the current rail, so that the train is passing the rail at the specified ''speed'', or at a lower speed.
Line 276: Line 282:
   * This function is available only when the [[wiki:todo|approach callback mechanism]] is enabled.   * This function is available only when the [[wiki:todo|approach callback mechanism]] is enabled.
   * This function is only accessible during ''approach'' events   * This function is only accessible during ''approach'' events
- 
-**This function is experimental and currently available only in the ''[[http://git.bananach.space/advtrains.git/tree/?h=luaatc-extensions|luaatc-extensions]]'' branch of Advtrains.** 
  
 ==== Fields ==== ==== Fields ====
usage/atlatc/api.txt · Last modified: 2023-07-05 17:48 by maverick2797