EX-CommandStation EXRAIL Documentation
EXRAIL Language
|
Go to the source code of this file.
Macros | |
#define | ACTIVATE(addr, subaddr) |
Send DCC Accessory Activate packet (gate on then off) | |
#define | ACTIVATEL(longaddr) |
Send DCC Accessory Activate packet (gate on then off) | |
#define | AFTER(sensor_id, timer...) |
Wait for sensor activated, then decativated for given time. | |
#define | AFTEROVERLOAD(track_id) |
Wait for overload to be resolved. | |
#define | ALIAS(name, value...) |
defines a named numeric value. | |
#define | AMBER(signal_id) |
Sets a signal to amber state. | |
#define | ANOUT(vpin, value, param1, param2) |
Writes to the HAL analog output interface of a device driver. Values and meanings of extra parameters depend on driver. | |
#define | AT(sensor_id) |
wait intil a sensor becomes active | |
#define | ASPECT(address, value) |
Sends a DCC aspect value to an accessory address. May also change status of a signal defined using this aspect. | |
#define | ATGTE(sensor_id, value) |
Wait for analog sensor to be greater than given value. | |
#define | ATLT(sensor_id, value) |
Wait for analog sensor value to be less than given value. | |
#define | ATTIMEOUT(sensor_id, timeout_ms) |
Wait for sensor active, with timeout. Use IFTIMEOUT to determine whether the AT was satisfied. | |
#define | AUTOMATION(id, description) |
Defies starting point of a sequence that will be shown as an Automation by the throttles. Automations are started by the throttle handing over a loco id to be driven. | |
#define | AUTOSTART |
A new task will be created starting from this point at Command Station startup | |
#define | BLINK(vpin, onDuty, offDuty) |
Starts a blinking process for a vpin (typically a LED) Stop blink with SET or RESET. | |
#define | BROADCAST(msg) |
Send raw message text to all throttles using the DCC-EX protocol. | |
#define | CALL(route) |
transfer control to another sequence with expectation to return | |
#define | CLEAR_STASH(id) |
Clears loco stash value | |
#define | CLEAR_ALL_STASH(id) |
??????????????????????????????????????? | |
#define | CLOSE(id) |
Close turnout by id. | |
#define | CONFIGURE_SERVO(vpin, pos1, pos2, profile) |
setup servo movement parameters for non-turnout | |
#define | DCC_SIGNAL(id, add, subaddr) |
Define a DCC accessory signal with short address. | |
#define | DCCX_SIGNAL(id, redAspect, amberAspect, greenAspect) |
DEfine advanced DCC accessory signal with aspects. | |
#define | DCC_TURNTABLE(id, home, description...) |
?????????????????????????????????? | |
#define | DEACTIVATE(addr, subaddr) |
Sends DCC Deactivate packet (gate on, gate off) to short address. | |
#define | DEACTIVATEL(addr) |
Sends DCC Deactivate packet (gate on, gate off) to long address. | |
#define | DELAY(mindelay) |
Waits for given milliseconds delay (This is not blocking) | |
#define | DELAYMINS(mindelay) |
Waits for given minutes delay (This is not blocking) | |
#define | DELAYRANDOM(mindelay, maxdelay) |
Waits for random delay between min and max milliseconds (This is not blocking) | |
#define | DONE |
Stops task loco (if any) and terminates current task. | |
#define | DRIVE(analogpin) |
RESERVED do not use. | |
#define | ELSE |
introduces alternate processing path after any kind of IF | |
#define | ENDEXRAIL |
Obsolete, has no effect. | |
#define | ENDIF |
determines end of IF(any type) block. IF something ENDIF, or IF something ELSE something ENDIF | |
#define | ENDTASK |
same as DONE | |
#define | ESTOP |
Performs emergency stop on current task loco. | |
#define | EXRAIL |
OBSOLETE ignored. | |
#define | EXTT_TURNTABLE(id, vpin, home, description...) |
?????????????????????? | |
#define | FADE(pin, value, ms) |
Modifies analog value slowly taking a given time. | |
#define | FOFF(func) |
Turns off loco function for current loco. | |
#define | FOLLOW(route) |
Task processing follows given route or sequence (Effectively a GoTo) | |
#define | FON(func) |
Turn on current loc finction. | |
#define | FORGET |
Removes current loco from task and DCC reminders table. | |
#define | FREE(blockid) |
Frees logical token for given block. | |
#define | FTOGGLE(func) |
Toggles function for current loco. | |
#define | FWD(speed) |
Instructs current loco to set DCC speed. | |
#define | GREEN(signal_id) |
Sets signal to green state. | |
#define | HAL(haltype, params...) |
Defines VPIN mapping for specific hardware drivers. | |
#define | HAL_IGNORE_DEFAULTS |
System will ignore default HAL settings. | |
#define | IF(sensor_id) |
Checks sensor state, If false jumps to matching nested ELSE or ENDIF. | |
#define | IFAMBER(signal_id) |
Checks if signal is in AMBER state. | |
#define | IFCLOSED(turnout_id) |
Checks if given turnout is in close state. | |
#define | IFGREEN(signal_id) |
Checks if given signal is in GREEN state. | |
#define | IFGTE(sensor_id, value) |
Checks if analog sensor >= value. | |
#define | IFLOCO(loco_id) |
Checks if current task loco = loco_id. | |
#define | IFLT(sensor_id, value) |
Checks if analog sensor < value. | |
#define | IFNOT(sensor_id) |
Inverse of IF. | |
#define | IFRANDOM(percent) |
randomly satisfield IF at given percent probability | |
#define | IFRED(signal_id) |
Checks if given signal is in RED state. | |
#define | IFTHROWN(turnout_id) |
Checks if given turnout is in THROWN state. | |
#define | IFRESERVE(block) |
Agttempts to reserve block token and if satisfiled the block remains reserved. | |
#define | IFTIMEOUT |
Checks TIMEOUT state after an AT/AFTER request with timeout value. | |
#define | IFTTPOSITION(turntable_id, position) |
Checks if GTurntable is in given position. | |
#define | IFRE(sensor_id, value) |
???????????????????????????????????????? | |
#define | INVERT_DIRECTION |
Marks current task so that FWD and REV commands are inverted. | |
#define | JMRI_SENSOR(vpin, count...) |
DEfines multiple JMRI | |
#define | JOIN |
Switches PROG track to receive MAIN track DCC packets. (Drive on PROG track) | |
#define | KILLALL |
Tertminates all running EXRAIL tasks. | |
#define | LATCH(sensor_id) |
Make all AT/AFTER/IF see sensor active without checking hardware. | |
#define | LCC(eventid) |
Issue event to LCC. | |
#define | LCCX(senderid, eventid) |
Issue LCC event while impersonating another sender. | |
#define | LCD(row, msg) |
Write message on row of default configured LCD/OLED. | |
#define | SCREEN(display, row, msg) |
Send message to external display hadlers. | |
#define | LCN(msg) |
?????? | |
#define | MESSAGE(msg) |
Send a human readable message to all throttle users. | |
#define | MOVETT(id, steps, activity) |
??????????????????? | |
#define | NEOPIXEL(id, r, g, b, count...) |
Set a NEOPIXEL vpin to a given red/green/blue colour. | |
#define | NEOPIXEL_SIGNAL(sigid, redcolour, ambercolour, greencolour) |
Define a signal that uses a single multi colour pixel. | |
#define | ACON(eventid) |
Send MERG CBUS ACON to Adapter. | |
#define | ACOF(eventid) |
Send MERG CBUS ACOF to Adapter. | |
#define | ONACON(eventid) |
Start task here when ACON for event receied from MERG CBUS. | |
#define | ONACOF(eventid) |
Start task here when ACOF for event receied from MERG CBUS. | |
#define | ONACTIVATE(addr, subaddr) |
Start task here when DCC Activate sent for short address. | |
#define | ONACTIVATEL(linear) |
Start task here when DCC Activate sent for long address. | |
#define | ONAMBER(signal_id) |
Start task here when signal set to AMBER state. | |
#define | ONTIME(value) |
Start task here when fastclock mins in day=value. | |
#define | ONCLOCKTIME(hours, mins) |
Start task here when fastclock matches time. | |
#define | ONCLOCKMINS(mins) |
Start task here hourly when fastclock minutes matches. | |
#define | ONOVERLOAD(track_id) |
Start task here when given track goes into overload. | |
#define | ONDEACTIVATE(addr, subaddr) |
Start task here when DCC deactivate packet sent. | |
#define | ONDEACTIVATEL(linear) |
Start task here when DCC deactivate sent to linear address. | |
#define | ONCLOSE(turnout_id) |
Start task here when turnout closed. | |
#define | ONLCC(sender, event) |
?????????????????? | |
#define | ONGREEN(signal_id) |
Start task here when signal set to GREEN state. | |
#define | ONRED(signal_id) |
Start task here when signal set to RED state. | |
#define | ONROTATE(turntable_id) |
Start task here when turntable is rotated. | |
#define | ONTHROW(turnout_id) |
Start task here when turnout is Thrown. | |
#define | ONCHANGE(sensor_id) |
??????????????????? | |
#define | ONSENSOR(sensor_id) |
Start task here when sensor changes state (debounced) | |
#define | ONBUTTON(sensor_id) |
Start task here when sensor changes HIGH to LOW. | |
#define | PAUSE |
Pauses all EXRAIL tasks except the curremnt one. Other tasks ESTOP their locos until RESUME issued. | |
#define | PIN_TURNOUT(id, pin, description...) |
Defines a tirnout which operates on a signle pin. | |
#define | PRINT(msg) |
prints diagnostic message on USB serial | |
#define | PARSE(msg) |
Executes <> command as if entered from serial. | |
#define | PICKUP_STASH(id) |
Loads stashed value into current task loco. | |
#define | POM(cv, value) |
Write value to cv on current tasks loco (Program on Main) | |
#define | POWEROFF |
Powers off all tracks. | |
#define | POWERON |
Powers ON all tracks. | |
#define | READ_LOCO |
Reads loco Id from prog traqck and sets currenmt task loco id. | |
#define | RED(signal_id) |
sets signal to RED state | |
#define | RESERVE(blockid) |
Waits for token for block. If not available immediately, current task loco is stopped. | |
#define | RESET(pin, count...) |
Sets output puin LOW. | |
#define | RESUME |
Resumes PAUSEd tasks. | |
#define | RETURN |
Returns to CALL. | |
#define | REV(speed) |
Issues DCC speed packet for current loco in reverse. | |
#define | ROTATE(turntable_id, position, activity) |
???? | |
#define | ROTATE_DCC(turntable_id, position) |
???? | |
#define | ROSTER(cab, name, funcmap...) |
Describes a loco roster entry visible to throttles. | |
#define | ROUTE(id, description) |
DEfines starting point of a sequence that will appear as a route on throttle buttons. | |
#define | ROUTE_ACTIVE(id) |
Tells throttle to display the route button as active. | |
#define | ROUTE_INACTIVE(id) |
Tells throttle to display the route button as inactive. | |
#define | ROUTE_HIDDEN(id) |
Tells throttle to hide the route button. | |
#define | ROUTE_DISABLED(id) |
Tells throttle to display the route button as disabled. | |
#define | ROUTE_CAPTION(id, caption) |
Tells throttle to change thr route button caption. | |
#define | SENDLOCO(cab, route) |
Start a new task to drive the loco. | |
#define | SEQUENCE(id) |
Provides a unique label than can be used to call, follow or start. | |
#define | SERIAL(msg) |
Write direct to Serial output. | |
#define | SERIAL1(msg) |
Write direct to Serial1 output. | |
#define | SERIAL2(msg) |
Write direct to Serial2 output. | |
#define | SERIAL3(msg) |
Write direct to Serial3 output. | |
#define | SERIAL4(msg) |
Write direct to Serial4 output. | |
#define | SERIAL5(msg) |
Write direct to Serial5 output. | |
#define | SERIAL6(msg) |
Write direct to Serial6 output. | |
#define | SERVO(id, position, profile) |
Move servo to given position. | |
#define | SERVO2(id, position, duration) |
Move servo to given position taking time. | |
#define | SERVO_SIGNAL(vpin, redpos, amberpos, greenpos) |
Dedfine a servo based signal with 3 servo positions. | |
#define | SERVO_TURNOUT(id, pin, activeAngle, inactiveAngle, profile, description...) |
Define a servo driven turnout. | |
#define | SET(pin, count...) |
Set VPIN HIGH | |
#define | SET_TRACK(track, mode) |
Set output track type. | |
#define | SET_POWER(track, onoff) |
Set track power mode. | |
#define | SETLOCO(loco) |
Sets the loco being handled by the current task. | |
#define | SETFREQ(freq) |
Sets the DC track PWM frequency. | |
#define | SIGNAL(redpin, amberpin, greenpin) |
Define a Signal with LOW=on leds (is that common annode???) | |
#define | SIGNALH(redpin, amberpin, greenpin) |
define a signal with HIGH=ON leds | |
#define | SPEED(speed) |
Changes current tasks loco speed without changing direction. | |
#define | START(route) |
Starts a new task at the given route/animation/sequence. | |
#define | STASH(id) |
saves cuttent tasks loco id in the stash array | |
#define | STEALTH(code...) |
Allows for embedding raw C++ code in context of current task. | |
#define | STEALTH_GLOBAL(code...) |
Allows for embedding raw c++ code out of context. | |
#define | STOP |
Same as SPEED(0) | |
#define | THROW(id) |
Throws given turnout. | |
#define | TOGGLE_TURNOUT(id) |
Toggles given turnout. | |
#define | TT_ADDPOSITION(turntable_id, position, value, angle, description...) |
Defines a turntable track position. | |
#define | TURNOUT(id, addr, subaddr, description...) |
Defines a DCC accessory turnout with legacy address. | |
#define | TURNOUTL(id, addr, description...) |
Defines a DCC accessory turnout with inear address. | |
#define | UNJOIN |
Disconnects PROG track from MAIN. | |
#define | UNLATCH(sensor_id) |
removes latched on flag | |
#define | VIRTUAL_SIGNAL(id) |
Defines a virtual (no hardware) signal. | |
#define | VIRTUAL_TURNOUT(id, description...) |
Defines a virtual (no hardware) turnout. | |
#define | WAITFOR(pin) |
??????????????????? | |
#define | WAITFORTT(turntable_id) |
#define | WITHROTTLE(msg) |
Broadcasts a string in Withrottle protocol format to all throttles using this protocol. | |
#define | XFOFF(cab, func) |
Turns function off for given loco. | |
#define | XFON(cab, func) |
Turns function ON for given loco. | |
#define | XFTOGGLE(cab, func) |
Toggles function state for given loco. | |
#define | XFWD(cab, speed) |
Sends DCC speed to loco in forward direction. | |
#define | XREV(cab, speed) |
Sends DCC speed to loco in reverse direction. | |
#define ACOF | ( | eventid | ) |
Send MERG CBUS ACOF to Adapter.
eventid |
#define ACON | ( | eventid | ) |
Send MERG CBUS ACON to Adapter.
eventid |
#define ACTIVATE | ( | addr, | |
subaddr | |||
) |
Send DCC Accessory Activate packet (gate on then off)
addr | |
subaddr |
#define ACTIVATEL | ( | longaddr | ) |
Send DCC Accessory Activate packet (gate on then off)
longaddr |
#define AFTER | ( | sensor_id, | |
timer... | |||
) |
Wait for sensor activated, then decativated for given time.
sensor_id | |
timer... | optional wait in mS, default 500 |
#define AFTEROVERLOAD | ( | track_id | ) |
Wait for overload to be resolved.
track_id | A..H |
#define ALIAS | ( | name, | |
value... | |||
) |
defines a named numeric value.
name | |
value... | if omitted, a large negative value is created automatically |
#define AMBER | ( | signal_id | ) |
Sets a signal to amber state.
signal_id |
#define ANOUT | ( | vpin, | |
value, | |||
param1, | |||
param2 | |||
) |
Writes to the HAL analog output interface of a device driver. Values and meanings of extra parameters depend on driver.
vpin | Virtual pin number of device |
value | basic analog value |
param1 | device dependent |
param2 | device dependent |
#define ASPECT | ( | address, | |
value | |||
) |
Sends a DCC aspect value to an accessory address. May also change status of a signal defined using this aspect.
address | |
value |
#define AT | ( | sensor_id | ) |
wait intil a sensor becomes active
sensor_id | Use negative value for sensors that are HIGH when activated |
#define ATGTE | ( | sensor_id, | |
value | |||
) |
Wait for analog sensor to be greater than given value.
sensor_id | |
value |
#define ATLT | ( | sensor_id, | |
value | |||
) |
Wait for analog sensor value to be less than given value.
sensor_id | |
value |
#define ATTIMEOUT | ( | sensor_id, | |
timeout_ms | |||
) |
Wait for sensor active, with timeout. Use IFTIMEOUT to determine whether the AT was satisfied.
sensor_id | |
timeout_ms |
#define AUTOMATION | ( | id, | |
description | |||
) |
Defies starting point of a sequence that will be shown as an Automation by the throttles. Automations are started by the throttle handing over a loco id to be driven.
id | Unique sequence/route/automation id |
description | (Quoted text) will be shown on throttle button |
#define AUTOSTART |
A new task will be created starting from this point at Command Station startup
#define BLINK | ( | vpin, | |
onDuty, | |||
offDuty | |||
) |
Starts a blinking process for a vpin (typically a LED) Stop blink with SET or RESET.
vpin | |
onDuty | Milliseconds with LED ON |
offDuty | Milliseconds with LED off |
#define BROADCAST | ( | msg | ) |
Send raw message text to all throttles using the DCC-EX protocol.
msg | Quoted message |
#define CALL | ( | route | ) |
transfer control to another sequence with expectation to return
route | Sequence id, sequence must terminate of RETURN |
#define CLEAR_ALL_STASH | ( | id | ) |
???????????????????????????????????????
id |
#define CLEAR_STASH | ( | id | ) |
Clears loco stash value
id | which stash to clear. |
#define CLOSE | ( | id | ) |
#define CONFIGURE_SERVO | ( | vpin, | |
pos1, | |||
pos2, | |||
profile | |||
) |
setup servo movement parameters for non-turnout
vpin | must refer to a servo capable pin |
pos1 | SET position of servo |
pos2 | RESET position of servo |
profile | Movement profile (????????) |
#define DCC_SIGNAL | ( | id, | |
add, | |||
subaddr | |||
) |
Define a DCC accessory signal with short address.
id | Signal id used for all signal manipulation commands |
add | DCC address |
subaddr | DCC subaddress |
#define DCC_TURNTABLE | ( | id, | |
home, | |||
description... | |||
) |
??????????????????????????????????
id | |
home | |
description... |
#define DCCX_SIGNAL | ( | id, | |
redAspect, | |||
amberAspect, | |||
greenAspect | |||
) |
DEfine advanced DCC accessory signal with aspects.
id | Signal id used for all signal manipulation commands |
redAspect | |
amberAspect | |
greenAspect |
#define DEACTIVATE | ( | addr, | |
subaddr | |||
) |
Sends DCC Deactivate packet (gate on, gate off) to short address.
addr | |
subaddr |
#define DEACTIVATEL | ( | addr | ) |
Sends DCC Deactivate packet (gate on, gate off) to long address.
addr |
#define DELAY | ( | mindelay | ) |
Waits for given milliseconds delay (This is not blocking)
mindelay | mS |
#define DELAYMINS | ( | mindelay | ) |
Waits for given minutes delay (This is not blocking)
mindelay |
#define DELAYRANDOM | ( | mindelay, | |
maxdelay | |||
) |
Waits for random delay between min and max milliseconds (This is not blocking)
mindelay | mS |
maxdelay | mS |
#define DONE |
Stops task loco (if any) and terminates current task.
#define DRIVE | ( | analogpin | ) |
RESERVED do not use.
analogpin |
#define ELSE |
introduces alternate processing path after any kind of IF
#define ENDEXRAIL |
Obsolete, has no effect.
#define ENDIF |
determines end of IF(any type) block. IF something ENDIF, or
IF something ELSE something ENDIF
#define ENDTASK |
same as DONE
#define ESTOP |
Performs emergency stop on current task loco.
#define EXRAIL |
OBSOLETE ignored.
#define EXTT_TURNTABLE | ( | id, | |
vpin, | |||
home, | |||
description... | |||
) |
??????????????????????
id | |
vpin | |
home | |
description... |
#define FADE | ( | pin, | |
value, | |||
ms | |||
) |
Modifies analog value slowly taking a given time.
pin | |
value | new target value |
ms | time to reach value |
#define FOFF | ( | func | ) |
#define FOLLOW | ( | route | ) |
Task processing follows given route or sequence (Effectively a GoTo)
route |
#define FON | ( | func | ) |
#define FORGET |
Removes current loco from task and DCC reminders table.
#define FREE | ( | blockid | ) |
#define FTOGGLE | ( | func | ) |
Toggles function for current loco.
func |
#define FWD | ( | speed | ) |
Instructs current loco to set DCC speed.
speed | 0..127 (1=ESTOP) |
#define GREEN | ( | signal_id | ) |
Sets signal to green state.
signal_id |
#define HAL | ( | haltype, | |
params... | |||
) |
Defines VPIN mapping for specific hardware drivers.
haltype | driver name, normally device type |
params... | depend on driver |
#define HAL_IGNORE_DEFAULTS |
System will ignore default HAL settings.
#define IF | ( | sensor_id | ) |
Checks sensor state, If false jumps to matching nested ELSE or ENDIF.
sensor_id | VPIN of sensor. Negative VPIM will invert sensor state. |
#define IFAMBER | ( | signal_id | ) |
#define IFCLOSED | ( | turnout_id | ) |
#define IFGREEN | ( | signal_id | ) |
#define IFGTE | ( | sensor_id, | |
value | |||
) |
#define IFLOCO | ( | loco_id | ) |
#define IFLT | ( | sensor_id, | |
value | |||
) |
#define IFNOT | ( | sensor_id | ) |
#define IFRANDOM | ( | percent | ) |
#define IFRE | ( | sensor_id, | |
value | |||
) |
????????????????????????????????????????
sensor_id | |
value |
#define IFRED | ( | signal_id | ) |
#define IFRESERVE | ( | block | ) |
Agttempts to reserve block token and if satisfiled the block remains reserved.
block |
#define IFTHROWN | ( | turnout_id | ) |
#define IFTIMEOUT |
Checks TIMEOUT state after an AT/AFTER request with timeout value.
#define IFTTPOSITION | ( | turntable_id, | |
position | |||
) |
#define INVERT_DIRECTION |
Marks current task so that FWD and REV commands are inverted.
#define JMRI_SENSOR | ( | vpin, | |
count... | |||
) |
DEfines multiple JMRI type sensor feedback definitions each with id matching vpin.
vpin | |
count... | Number of consecutine VPINS for which to create JMRI sensor feedbacks. Default 1. |
#define JOIN |
Switches PROG track to receive MAIN track DCC packets. (Drive on PROG track)
#define KILLALL |
Tertminates all running EXRAIL tasks.
#define LATCH | ( | sensor_id | ) |
Make all AT/AFTER/IF see sensor active without checking hardware.
sensor_id | Must only be for VPINS 0..255 |
#define LCC | ( | eventid | ) |
Issue event to LCC.
eventid |
#define LCCX | ( | senderid, | |
eventid | |||
) |
Issue LCC event while impersonating another sender.
senderid | |
eventid |
#define LCD | ( | row, | |
msg | |||
) |
#define LCN | ( | msg | ) |
??????
msg |
#define MESSAGE | ( | msg | ) |
Send a human readable message to all throttle users.
msg | Quoted text |
#define MOVETT | ( | id, | |
steps, | |||
activity | |||
) |
???????????????????
id | |
steps | |
activity |
#define NEOPIXEL | ( | id, | |
r, | |||
g, | |||
b, | |||
count... | |||
) |
Set a NEOPIXEL vpin to a given red/green/blue colour.
id | VPIN of a pixel |
r | red component 0-255 |
g | green component 0-255 |
b | blue component 0-255 |
count... | Number of consecutive pixels to set, Default 1. |
#define NEOPIXEL_SIGNAL | ( | sigid, | |
redcolour, | |||
ambercolour, | |||
greencolour | |||
) |
Define a signal that uses a single multi colour pixel.
sigid | unique signal id |
redcolour | RGB colour |
ambercolour | |
greencolour | Use NeoRGB(red,green,blue) to create values for redcolour etc above. |
#define ONACOF | ( | eventid | ) |
Start task here when ACOF for event receied from MERG CBUS.
eventid |
#define ONACON | ( | eventid | ) |
Start task here when ACON for event receied from MERG CBUS.
eventid |
#define ONACTIVATE | ( | addr, | |
subaddr | |||
) |
Start task here when DCC Activate sent for short address.
addr | |
subaddr |
#define ONACTIVATEL | ( | linear | ) |
Start task here when DCC Activate sent for long address.
linear |
#define ONAMBER | ( | signal_id | ) |
Start task here when signal set to AMBER state.
signal_id |
#define ONBUTTON | ( | sensor_id | ) |
Start task here when sensor changes HIGH to LOW.
sensor_id |
#define ONCHANGE | ( | sensor_id | ) |
???????????????????
sensor_id |
#define ONCLOCKMINS | ( | mins | ) |
Start task here hourly when fastclock minutes matches.
mins |
#define ONCLOCKTIME | ( | hours, | |
mins | |||
) |
Start task here when fastclock matches time.
hours | |
mins |
#define ONCLOSE | ( | turnout_id | ) |
Start task here when turnout closed.
turnout_id |
#define ONDEACTIVATE | ( | addr, | |
subaddr | |||
) |
Start task here when DCC deactivate packet sent.
addr | |
subaddr |
#define ONDEACTIVATEL | ( | linear | ) |
Start task here when DCC deactivate sent to linear address.
linear |
#define ONGREEN | ( | signal_id | ) |
Start task here when signal set to GREEN state.
signal_id |
#define ONLCC | ( | sender, | |
event | |||
) |
??????????????????
sender | |
event |
#define ONOVERLOAD | ( | track_id | ) |
Start task here when given track goes into overload.
track_id | A..H |
#define ONRED | ( | signal_id | ) |
Start task here when signal set to RED state.
signal_id |
#define ONROTATE | ( | turntable_id | ) |
Start task here when turntable is rotated.
turntable_id |
#define ONSENSOR | ( | sensor_id | ) |
Start task here when sensor changes state (debounced)
sensor_id |
#define ONTHROW | ( | turnout_id | ) |
Start task here when turnout is Thrown.
turnout_id |
#define ONTIME | ( | value | ) |
Start task here when fastclock mins in day=value.
value |
#define PARSE | ( | msg | ) |
Executes <> command as if entered from serial.
msg | Quoted text, preferably including <> |
#define PAUSE |
Pauses all EXRAIL tasks except the curremnt one. Other tasks ESTOP their locos until RESUME issued.
#define PICKUP_STASH | ( | id | ) |
Loads stashed value into current task loco.
id | position in stash where a loco id was previously saved. |
#define PIN_TURNOUT | ( | id, | |
pin, | |||
description... | |||
) |
Defines a tirnout which operates on a signle pin.
id | |
pin | |
description... | Quoted text (shown to throttles) or HIDDEN |
#define POM | ( | cv, | |
value | |||
) |
Write value to cv on current tasks loco (Program on Main)
cv | |
value |
#define POWEROFF |
Powers off all tracks.
#define POWERON |
Powers ON all tracks.
#define PRINT | ( | msg | ) |
prints diagnostic message on USB serial
msg | Quoted text |
#define READ_LOCO |
Reads loco Id from prog traqck and sets currenmt task loco id.
#define RED | ( | signal_id | ) |
sets signal to RED state
signal_id |
#define RESERVE | ( | blockid | ) |
Waits for token for block. If not available immediately, current task loco is stopped.
blockid |
#define RESET | ( | pin, | |
count... | |||
) |
Sets output puin LOW.
pin | |
count... | Number of consecutive pins, default 1 |
#define RESUME |
Resumes PAUSEd tasks.
#define RETURN |
Returns to CALL.
#define REV | ( | speed | ) |
#define ROSTER | ( | cab, | |
name, | |||
funcmap... | |||
) |
Describes a loco roster entry visible to throttles.
cab | loco DCC address or 0 for default entry |
name | Quoted text |
funcmap... | Quoted text, optional list of function names separated by / character with momentary fuinctin names prefixed with an *. |
#define ROTATE | ( | turntable_id, | |
position, | |||
activity | |||
) |
????
turntable_id | |
position | |
activity |
#define ROTATE_DCC | ( | turntable_id, | |
position | |||
) |
????
turntable_id | |
position |
#define ROUTE | ( | id, | |
description | |||
) |
DEfines starting point of a sequence that will appear as a route on throttle buttons.
id | |
description | Quoted text, throttle button capotion. |
#define ROUTE_ACTIVE | ( | id | ) |
Tells throttle to display the route button as active.
id |
#define ROUTE_CAPTION | ( | id, | |
caption | |||
) |
Tells throttle to change thr route button caption.
id | |
caption |
#define ROUTE_DISABLED | ( | id | ) |
Tells throttle to display the route button as disabled.
id |
#define ROUTE_HIDDEN | ( | id | ) |
Tells throttle to hide the route button.
id |
#define ROUTE_INACTIVE | ( | id | ) |
Tells throttle to display the route button as inactive.
id |
#define SCREEN | ( | display, | |
row, | |||
msg | |||
) |
Send message to external display hadlers.
display | number, 0=local display, others are handled by external displays which may have different display numbers on different devices. |
row | |
msg | Quoted text |
#define SENDLOCO | ( | cab, | |
route | |||
) |
Start a new task to drive the loco.
cab | loco to be driven |
route | id of route/automation or sequence to drive |
#define SEQUENCE | ( | id | ) |
#define SERIAL | ( | msg | ) |
Write direct to Serial output.
msg | Quoted text |
#define SERIAL1 | ( | msg | ) |
Write direct to Serial1 output.
msg | Quoted text |
#define SERIAL2 | ( | msg | ) |
Write direct to Serial2 output.
msg | Quoted text |
#define SERIAL3 | ( | msg | ) |
Write direct to Serial3 output.
msg | Quoted text |
#define SERIAL4 | ( | msg | ) |
Write direct to Serial4 output.
msg | Quoted text |
#define SERIAL5 | ( | msg | ) |
Write direct to Serial5 output.
msg | Quoted text |
#define SERIAL6 | ( | msg | ) |
Write direct to Serial6 output.
msg | Quoted text |
#define SERVO | ( | id, | |
position, | |||
profile | |||
) |
Move servo to given position.
id | VPIN of servo |
position | |
profile | ?????????? names ??????????? |
#define SERVO2 | ( | id, | |
position, | |||
duration | |||
) |
Move servo to given position taking time.
id | |
position | |
duration | mS |
#define SERVO_SIGNAL | ( | vpin, | |
redpos, | |||
amberpos, | |||
greenpos | |||
) |
Dedfine a servo based signal with 3 servo positions.
vpin | |
redpos | |
amberpos | |
greenpos |
#define SERVO_TURNOUT | ( | id, | |
pin, | |||
activeAngle, | |||
inactiveAngle, | |||
profile, | |||
description... | |||
) |
Define a servo driven turnout.
id | used by THROW/CLOSE |
pin | VPIN for servo |
activeAngle | |
inactiveAngle | |
profile | ?????? |
description... | Quoted text shown to throttles or HIDDEN keyword to hide turnout button |
#define SET | ( | pin, | |
count... | |||
) |
Set VPIN HIGH
pin | |
count... | Number of sequential vpins to set. Default 1. |
#define SET_POWER | ( | track, | |
onoff | |||
) |
Set track power mode.
track | A..H |
onoff | ??? values ??? |
#define SET_TRACK | ( | track, | |
mode | |||
) |
Set output track type.
track | A..H |
mode | ???names??? |
#define SETFREQ | ( | freq | ) |
Sets the DC track PWM frequency.
freq | ??????????? values ?????? |
#define SETLOCO | ( | loco | ) |
Sets the loco being handled by the current task.
loco |
#define SIGNAL | ( | redpin, | |
amberpin, | |||
greenpin | |||
) |
Define a Signal with LOW=on leds (is that common annode???)
redpin | |
amberpin | |
greenpin |
#define SIGNALH | ( | redpin, | |
amberpin, | |||
greenpin | |||
) |
define a signal with HIGH=ON leds
redpin | |
amberpin | |
greenpin |
#define SPEED | ( | speed | ) |
Changes current tasks loco speed without changing direction.
speed | 0..127 (1=ESTOP) |
#define START | ( | route | ) |
Starts a new task at the given route/animation/sequence.
route |
#define STASH | ( | id | ) |
saves cuttent tasks loco id in the stash array
id |
#define STEALTH | ( | code... | ) |
Allows for embedding raw C++ code in context of current task.
code... |
#define STEALTH_GLOBAL | ( | code... | ) |
Allows for embedding raw c++ code out of context.
code... |
#define STOP |
Same as SPEED(0)
#define THROW | ( | id | ) |
Throws given turnout.
id |
#define TOGGLE_TURNOUT | ( | id | ) |
Toggles given turnout.
id |
#define TT_ADDPOSITION | ( | turntable_id, | |
position, | |||
value, | |||
angle, | |||
description... | |||
) |
Defines a turntable track position.
turntable_id | |
position | ?????????? |
value | |
angle | |
description... |
#define TURNOUT | ( | id, | |
addr, | |||
subaddr, | |||
description... | |||
) |
Defines a DCC accessory turnout with legacy address.
id | |
addr | |
subaddr | |
description... | Quoted text or HIDDEN, appears on throttle buttons |
#define TURNOUTL | ( | id, | |
addr, | |||
description... | |||
) |
Defines a DCC accessory turnout with inear address.
param id
addr | |
description... |
#define UNJOIN |
Disconnects PROG track from MAIN.
#define UNLATCH | ( | sensor_id | ) |
#define VIRTUAL_SIGNAL | ( | id | ) |
Defines a virtual (no hardware) signal.
id |
#define VIRTUAL_TURNOUT | ( | id, | |
description... | |||
) |
Defines a virtual (no hardware) turnout.
id | |
description... |
#define WAITFOR | ( | pin | ) |
???????????????????
pin |
#define WAITFORTT | ( | turntable_id | ) |
turntable_id |
#define WITHROTTLE | ( | msg | ) |
Broadcasts a string in Withrottle protocol format to all throttles using this protocol.
msg |
#define XFOFF | ( | cab, | |
func | |||
) |
Turns function off for given loco.
cab | |
func |
#define XFON | ( | cab, | |
func | |||
) |
Turns function ON for given loco.
cab | |
func |
#define XFTOGGLE | ( | cab, | |
func | |||
) |
Toggles function state for given loco.
cab | |
func |
#define XFWD | ( | cab, | |
speed | |||
) |
Sends DCC speed to loco in forward direction.
cab | |
speed | (0..127, 1=ESTOP) |
#define XREV | ( | cab, | |
speed | |||
) |
Sends DCC speed to loco in reverse direction.
cab | |
speed | (0..127, 1=ESTOP) |