Class SE8cSignalHead
- All Implemented Interfaces:
VetoableChangeListener,Comparable<NamedBean>,EventListener,PropertyChangeProvider,LocoNetListener,NamedBean,Signal,SignalHead
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.
This is a grandfathered implementation that is specific to LocoNet systems. A
more general implementation, which can work with any system(s), is available
in SE8cSignalHead. This package is maintained so
that existing XML files can continue to be read. In particular, it only works
with the first LocoNet connection (names LHnnn, not L2Hnnn etc).
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface jmri.NamedBean
NamedBean.BadNameException, NamedBean.BadSystemNameException, NamedBean.BadUserNameException, NamedBean.DisplayOptions, NamedBean.DuplicateSystemNameException -
Field Summary
FieldsFields inherited from class jmri.implementation.DefaultSignalHead
delay, masterDelay, mFlashOnFields inherited from class jmri.implementation.AbstractSignalHead
mAppearance, mHeld, mLitFields inherited from class jmri.implementation.AbstractNamedBean
listenerRefs, mSystemName, registerFields inherited from interface jmri.NamedBean
DISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_COMMENT, PROPERTY_ENABLED, PROPERTY_KNOWN_STATE, PROPERTY_STATE, PROPERTY_USERNAME, QUOTED_NAME_FORMAT, UNKNOWNFields inherited from interface jmri.Signal
PROPERTY_HELD, PROPERTY_LITFields inherited from interface jmri.SignalHead
DARK, FLASHGREEN, FLASHLUNAR, FLASHRED, FLASHYELLOW, GREEN, HELD, LUNAR, PROPERTY_APPEARANCE, RED, YELLOW -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Deactivate this object, so that it releases as many resources as possible and no longer effects others.int(package private) voidinit(int pNumber) voidMember function that will be invoked by a LocoNetInterface implementation to forward a LocoNet message from the layout.protected voidType-specific routine to handle output to the layout hardware.Methods inherited from class jmri.implementation.DefaultSignalHead
appearanceSetsFlashTimer, getUsageReport, getValidStateKeys, getValidStateNames, getValidStates, isTurnoutUsed, setAppearance, setHeld, setLit, startFlash, stopFlashMethods inherited from class jmri.implementation.AbstractSignalHead
describeState, getAppearance, getAppearanceKey, getAppearanceKey, getAppearanceName, getAppearanceName, getBeanType, getDefaultStateName, getDefaultValidStateNames, getDefaultValidStates, getHeld, getLit, getState, isAtStop, isCleared, isShowingRestricting, setState, vetoableChangeMethods inherited from class jmri.implementation.AbstractNamedBean
addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, equals, firePropertyChange, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeListenersByReference, getPropertyKeys, getSystemName, getUserName, hashCode, removeProperty, removePropertyChangeListener, removePropertyChangeListener, setComment, setProperty, setUserName, toString, toStringSuffix, updateListenerRefMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface jmri.NamedBean
addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, compareTo, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListenersByReference, getPropertyKeys, getRecommendedToolTip, getSystemName, getUserName, removeProperty, setComment, setProperty, setUserName, toString, updateListenerRefMethods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Field Details
-
tc
-
mNumber
int mNumber
-
-
Constructor Details
-
SE8cSignalHead
-
SE8cSignalHead
-
-
Method Details
-
init
-
getNumber
-
updateOutput
Description copied from class:DefaultSignalHeadType-specific routine to handle output to the layout hardware.Does not notify listeners of changes; that's done elsewhere. Should use the following variables to determine what to send:
- mAppearance
- mLit
- mFlashOn
- Specified by:
updateOutputin classDefaultSignalHead
-
message
Description copied from interface:LocoNetListenerMember function that will be invoked by a LocoNetInterface implementation to forward a LocoNet message from the layout.- Specified by:
messagein interfaceLocoNetListener- Parameters:
l- The received LocoNet message. Note that this same object may be presented to multiple users. It should not be modified here.
-
dispose
Description copied from class:AbstractNamedBeanDeactivate this object, so that it releases as many resources as possible and no longer effects others.For 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.
- Specified by:
disposein interfaceNamedBean- Overrides:
disposein classAbstractNamedBean
-