Package jmri.jmrit.automat
Class Siglet
- java.lang.Object
-
- jmri.jmrit.automat.Siglet
-
- Direct Known Subclasses:
BlockBossLogic
public abstract class Siglet extends java.lang.Object
A Siglet is a "an embedded signal automation", like an "applet" an embedded application.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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
defineIO()
User-provided routine to define the input and output objects to be handled.java.lang.String
getName()
boolean
isRunning()
void
setInputs(NamedBean[] in)
Set inputs to the items in in.void
setName(java.lang.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.
-
-
-
Method Detail
-
defineIO
public abstract void defineIO()
User-provided routine to define the input and output objects to be handled. Invoked during the Sigletstart()
call.
-
setOutput
public abstract void setOutput()
User-provided routine to compute new output state and apply it.
-
getName
public final java.lang.String getName()
-
setName
public final void setName(java.lang.String name)
-
start
public void start()
-
stop
public void stop()
Stop execution of the logic.
-
isRunning
public boolean isRunning()
-
-