public abstract class Siglet extends Object
Subclasses must load the inputs and outputs arrays during the defineIO
method. When any of these change, the Siglet must then recompute and apply
the output signal settings via their implementation of the setOutput()
method.
Siglets may not run in their own thread; they should not use wait() in any of its various forms.
Siglet was separated from AbstractAutomaton in JMRI 4.9.2
Do not have any overlap between the items in the input and output lists; this will cause a recursive invocation when the output changes.
Modifier and Type | Method and Description |
---|---|
abstract void |
defineIO()
User-provided routine to define the input and output objects to be
handled.
|
String |
getName() |
boolean |
isRunning() |
void |
setInputs(NamedBean[] in)
Set inputs to the items in in.
|
void |
setName(String name) |
abstract void |
setOutput()
User-provided routine to compute new output state and apply it.
|
void |
start() |
void |
stop()
Stop execution of the logic.
|
public Siglet()
public Siglet(String name)
public abstract void defineIO()
start()
call.public abstract void setOutput()
public final String getName()
public final void setName(String name)
public void start()
public void stop()
public boolean isRunning()
public void setInputs(NamedBean[] in)
in
- the inputs to setCopyright © 1997-2019 JMRI Community.
JMRI®, DecoderPro®, PanelPro, SignalPro, SoundPro, DispatcherPro, TrainPro and associated logos are our trademarks.
Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: