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 Both sides next revision
usage:atlatc:api [2021-02-17 23:38]
orwell add api of commit 5232c22f
usage:atlatc:api [2021-03-02 20:15]
orwell commit 6135f8a2
Line 92: Line 92:
 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.
  
 +==== Remote ATC ====
 +
 +//since version 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.
 +
 +=== atc_send_to_train(train_id, command) ===
 +
 +Sends the specified [[usage:nodes:atc_controller#atc_command_syntax|ATC command]] to the train specified by its 6-digit train ID and returns ''true''. If there is no train with such an ID, returns ''false'' and does nothing.
 +
 +The ATC command is instantly applied to the train in question, regardless of where it is and what it is doing. It also cancels any active ATC command of the train.
 +
 +Calling this function from an ATC rail is independent of any train that stands on the rail and does not affect it (except of course when train_id happens to be the ID of the train on the rail).
  
 ==== Railway Time ==== ==== Railway Time ====
usage/atlatc/api.txt · Last modified: 2023-07-05 17:48 by maverick2797