|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrit.automat.AbstractAutomaton
jmri.jmrit.automat.Siglet
public class Siglet
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.
You can't assume that Siglets run in their own thread; they should not use wait() in any of it's various forms.
Do not assume that Siglets will always inherit from AbstractAutomaton; that may be an implementation artifact.
Do not have any overlap between the items in the input and output lists; this will cause a recursive invocation when the output changes.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class jmri.jmrit.automat.AbstractAutomaton |
|---|
AbstractAutomaton.MsgFrame |
| Field Summary | |
|---|---|
NamedBean[] |
inputs
|
NamedBean[] |
outputs
|
| Fields inherited from class jmri.jmrit.automat.AbstractAutomaton |
|---|
promptOnWait |
| Constructor Summary | |
|---|---|
Siglet()
|
|
Siglet(String name)
|
|
| Method Summary | |
|---|---|
void |
defineIO()
User-provided routine to define the input and output objects to be handled. |
protected boolean |
handle()
Implements AbstractAutomaton method to wait for state changes and respond. |
protected void |
init()
Implements AbstractAutomaton method to initialise connections to the layout. |
void |
setInputs(NamedBean[] in)
|
void |
setOutput()
User-provided routine to compute new output state and apply it. |
| Methods inherited from class jmri.jmrit.automat.AbstractAutomaton |
|---|
getCount, getName, getThrottle, readServiceModeCV, run, setName, setTurnouts, start, stop, wait, waitChange, waitMsec, waitSensorActive, waitSensorActive, waitSensorChange, waitSensorChange, waitSensorInactive, waitSensorInactive, waitSensorState, waitSensorState, waitTurnoutConsistent, writeOpsModeCV, writeServiceModeCV |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public NamedBean[] inputs
public NamedBean[] outputs
| Constructor Detail |
|---|
public Siglet()
public Siglet(String name)
| Method Detail |
|---|
public void defineIO()
public void setOutput()
protected void init()
init in class AbstractAutomatonprotected boolean handle()
handle in class AbstractAutomatonpublic void setInputs(NamedBean[] in)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||