|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.AbstractNamedBean
jmri.AbstractSignalHead
jmri.DefaultSignalHead
jmri.jmrix.loconet.SE8cSignalHead
public class SE8cSignalHead
Extend jmri.SignalHead for signals implemented by an SE8c
This implementation writes out to the physical signal when it's commanded to change appearance, and updates its internal state when it hears commands from other places.
To get a complete set of aspects, we assume that the SE8C board has been configured such that the 4th aspect is "dark". We then do flashing aspects by commanding the lit appearance to change.
The algorithms in this class are a collaborative effort of Digitrax, Inc and Bob Jacobsen.
Some of the message formats used in this class are Copyright Digitrax, Inc. and used with permission as part of the JMRI project. That permission does not extend to uses in other software products. If you wish to use this code, algorithm or these message formats outside of JMRI, please contact Digitrax Inc for separate permission.
| Field Summary |
|---|
| Fields inherited from class jmri.DefaultSignalHead |
|---|
mFlashOn |
| Fields inherited from class jmri.AbstractSignalHead |
|---|
mAppearance, mHeld, mLit |
| Fields inherited from interface jmri.SignalHead |
|---|
DARK, FLASHGREEN, FLASHRED, FLASHYELLOW, GREEN, RED, YELLOW |
| Fields inherited from interface jmri.NamedBean |
|---|
INCONSISTENT, UNKNOWN |
| Constructor Summary | |
|---|---|
SE8cSignalHead(int pNumber)
|
|
SE8cSignalHead(int pNumber,
String userName)
|
|
| Method Summary | |
|---|---|
void |
dispose()
Deactivate this object, so that it releases as many resources as possible and no longer effects others. |
int |
getNumber()
|
String |
getSystemName()
Get a system-specific name. |
void |
message(LocoNetMessage l)
Member function that will be invoked by a LocoNetInterface implementation to forward a LocoNet message from the layout. |
protected void |
updateOutput()
Type-specific routine to handle output to the layout hardware. |
| Methods inherited from class jmri.DefaultSignalHead |
|---|
setAppearance, setHeld, setLit, startFlash, stopFlash |
| Methods inherited from class jmri.AbstractSignalHead |
|---|
getAppearance, getHeld, getLit, getState, setState |
| Methods inherited from class jmri.AbstractNamedBean |
|---|
addPropertyChangeListener, firePropertyChange, getComment, getNumPropertyChangeListeners, getUserName, removePropertyChangeListener, setComment, setUserName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface jmri.NamedBean |
|---|
addPropertyChangeListener, getComment, getNumPropertyChangeListeners, getUserName, removePropertyChangeListener, setComment, setUserName |
| Constructor Detail |
|---|
public SE8cSignalHead(int pNumber,
String userName)
public SE8cSignalHead(int pNumber)
| Method Detail |
|---|
public int getNumber()
public String getSystemName()
NamedBean
getSystemName in interface NamedBeangetSystemName in class AbstractNamedBeanprotected void updateOutput()
DefaultSignalHead
updateOutput in class DefaultSignalHeadpublic void message(LocoNetMessage l)
LocoNetListener
message in interface LocoNetListenerl - The received LocoNet message. Note that this same object
may be presented to multiple users. It should not be
modified here.public void dispose()
NamedBeanFor example, if this object has listeners, after a call to this method it should no longer notify those listeners. Any native or system-wide resources it maintains should be released, including threads, files, etc.
It is an error to invoke any other methods on this object once dispose() has been called. Note, however, that there is no guarantee about behavior in that case.
Afterwards, references to this object may still exist elsewhere, preventing its garbage collection. But it's formally dead, and shouldn't be keeping any other objects alive. Therefore, this method should null out any references to other objects that this NamedBean contained.
dispose in interface NamedBeandispose in class AbstractNamedBean
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||