Package jmri.jmrit.automat
Class Siglet
java.lang.Object
jmri.jmrit.automat.Siglet
- Direct Known Subclasses:
BlockBossLogic
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.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voiddefineIO()User-provided routine to define the input and output objects to be handled.final StringgetName()booleanvoidSet inputs to the items in in.final voidabstract voidUser-provided routine to compute new output state and apply it.voidstart()voidstop()Stop execution of the logic.
-
Field Details
-
inputs
-
outputs
-
pq
-
thread
-
-
Constructor Details
-
Siglet
public Siglet() -
Siglet
-
-
Method Details
-
defineIO
User-provided routine to define the input and output objects to be handled. Invoked during the Sigletstart()call. -
setOutput
User-provided routine to compute new output state and apply it. -
getName
-
setName
-
start
-
stop
Stop execution of the logic. -
isRunning
-
setInputs
Set inputs to the items in in.- Parameters:
in- the inputs to set
-