Class SampleAutomaton3

java.lang.Object
jmri.jmrit.automat.AbstractAutomaton
jmri.jmrit.automat.SampleAutomaton3
All Implemented Interfaces:
Runnable

public class SampleAutomaton3
extends AbstractAutomaton
This sample Automaton runs a locomotive back and forth on a piece of track by watching two sensors.

The sensors and locomotive are hardcoded, as this is an example of just the Automaton function. Adding a GUI to configure these would be straight-forward. The values could be passed via the constructor, or the constructor (which can run in any required thread) could invoke a dialog.

For test purposes, one of these objects can be created and invoked by a SampleAutomaton3Action.

For more information on JMRI support for automation classes, please see the JMRI Layout Automation in Java page.

See Also:
SampleAutomaton3Action