Package jmri.implementation
Class LsDecSignalHead
- java.lang.Object
-
- jmri.implementation.AbstractNamedBean
-
- jmri.implementation.AbstractSignalHead
-
- jmri.implementation.DefaultSignalHead
-
- jmri.implementation.LsDecSignalHead
-
- All Implemented Interfaces:
java.beans.VetoableChangeListener
,java.lang.Comparable<NamedBean>
,java.util.EventListener
,PropertyChangeProvider
,NamedBean
,Signal
,SignalHead
public class LsDecSignalHead extends DefaultSignalHead
Implement SignalHead for Littfinski Daten Technik (LDT) signals.These decoders can display up to 8 aspects. One position of a turnout is associated with one signal aspect. The class assigns turnout positions to all 7 JMRI signal aspects.
For more info on the signals, see http://www.ldt-infocenter.com.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jmri.NamedBean
NamedBean.BadNameException, NamedBean.BadSystemNameException, NamedBean.BadUserNameException, NamedBean.DisplayOptions, NamedBean.DuplicateSystemNameException
-
-
Field Summary
Fields Modifier and Type Field Description (package private) NamedBeanHandle<Turnout>
mDark
(package private) int
mDarkState
(package private) NamedBeanHandle<Turnout>
mFlashGreen
(package private) int
mFlashGreenState
(package private) NamedBeanHandle<Turnout>
mFlashRed
(package private) int
mFlashRedState
(package private) NamedBeanHandle<Turnout>
mFlashYellow
(package private) int
mFlashYellowState
(package private) NamedBeanHandle<Turnout>
mGreen
(package private) int
mGreenState
(package private) NamedBeanHandle<Turnout>
mRed
(package private) int
mRedState
(package private) NamedBeanHandle<Turnout>
mYellow
(package private) int
mYellowState
-
Fields inherited from class jmri.implementation.DefaultSignalHead
delay, masterDelay, mFlashOn, timer
-
Fields inherited from class jmri.implementation.AbstractSignalHead
mAppearance, mHeld, mLit
-
Fields inherited from class jmri.implementation.AbstractNamedBean
listenerRefs, mSystemName, register
-
Fields inherited from interface jmri.NamedBean
DISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_STATE, QUOTED_NAME_FORMAT, UNKNOWN
-
Fields inherited from interface jmri.SignalHead
DARK, FLASHGREEN, FLASHLUNAR, FLASHRED, FLASHYELLOW, GREEN, HELD, LUNAR, RED, YELLOW
-
-
Constructor Summary
Constructors Constructor Description LsDecSignalHead(java.lang.String sys, java.lang.String user, NamedBeanHandle<Turnout> t1, int s1, NamedBeanHandle<Turnout> t2, int s2, NamedBeanHandle<Turnout> t3, int s3, NamedBeanHandle<Turnout> t4, int s4, NamedBeanHandle<Turnout> t5, int s5, NamedBeanHandle<Turnout> t6, int s6, NamedBeanHandle<Turnout> t7, int s7)
LsDecSignalHead(java.lang.String sys, NamedBeanHandle<Turnout> t1, int s1, NamedBeanHandle<Turnout> t2, int s2, NamedBeanHandle<Turnout> t3, int s3, NamedBeanHandle<Turnout> t4, int s4, NamedBeanHandle<Turnout> t5, int s5, NamedBeanHandle<Turnout> t6, int s6, NamedBeanHandle<Turnout> t7, int s7)
-
Method Summary
-
Methods inherited from class jmri.implementation.DefaultSignalHead
appearanceSetsFlashTimer, getUsageReport, getValidStateKeys, getValidStateNames, getValidStates, setHeld, startFlash, stopFlash
-
Methods inherited from class jmri.implementation.AbstractSignalHead
getAppearance, getAppearanceKey, getAppearanceKey, getAppearanceName, getAppearanceName, getBeanType, getDefaultStateName, getDefaultValidStateNames, getDefaultValidStates, getHeld, getLit, getState, isAtStop, isCleared, isShowingRestricting, setState, vetoableChange
-
Methods inherited from class jmri.implementation.AbstractNamedBean
addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, describeState, equals, firePropertyChange, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeListenersByReference, getPropertyKeys, getSystemName, getUserName, hashCode, removeProperty, removePropertyChangeListener, removePropertyChangeListener, setComment, setProperty, setUserName, toString, toStringSuffix, updateListenerRef
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jmri.NamedBean
addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, compareTo, describeState, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListenersByReference, getPropertyKeys, getRecommendedToolTip, getSystemName, getUserName, removeProperty, setComment, setProperty, setUserName, toString, updateListenerRef
-
Methods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
-
-
-
Field Detail
-
mRed
NamedBeanHandle<Turnout> mRed
-
mYellow
NamedBeanHandle<Turnout> mYellow
-
mGreen
NamedBeanHandle<Turnout> mGreen
-
mFlashRed
NamedBeanHandle<Turnout> mFlashRed
-
mFlashYellow
NamedBeanHandle<Turnout> mFlashYellow
-
mFlashGreen
NamedBeanHandle<Turnout> mFlashGreen
-
mDark
NamedBeanHandle<Turnout> mDark
-
mRedState
int mRedState
-
mYellowState
int mYellowState
-
mGreenState
int mGreenState
-
mFlashRedState
int mFlashRedState
-
mFlashYellowState
int mFlashYellowState
-
mFlashGreenState
int mFlashGreenState
-
mDarkState
int mDarkState
-
-
Constructor Detail
-
LsDecSignalHead
public LsDecSignalHead(java.lang.String sys, java.lang.String user, NamedBeanHandle<Turnout> t1, int s1, NamedBeanHandle<Turnout> t2, int s2, NamedBeanHandle<Turnout> t3, int s3, NamedBeanHandle<Turnout> t4, int s4, NamedBeanHandle<Turnout> t5, int s5, NamedBeanHandle<Turnout> t6, int s6, NamedBeanHandle<Turnout> t7, int s7)
-
LsDecSignalHead
public LsDecSignalHead(java.lang.String sys, NamedBeanHandle<Turnout> t1, int s1, NamedBeanHandle<Turnout> t2, int s2, NamedBeanHandle<Turnout> t3, int s3, NamedBeanHandle<Turnout> t4, int s4, NamedBeanHandle<Turnout> t5, int s5, NamedBeanHandle<Turnout> t6, int s6, NamedBeanHandle<Turnout> t7, int s7)
-
-
Method Detail
-
setAppearance
public void setAppearance(int newAppearance)
Description copied from interface:SignalHead
Set the Signal Head Appearance.- Specified by:
setAppearance
in interfaceSignalHead
- Overrides:
setAppearance
in classDefaultSignalHead
- Parameters:
newAppearance
- integer representing a valid Appearance for this head
-
setLit
public void setLit(boolean newLit)
Description copied from interface:SignalHead
- Specified by:
setLit
in interfaceSignal
- Specified by:
setLit
in interfaceSignalHead
- Overrides:
setLit
in classDefaultSignalHead
-
updateOutput
protected void updateOutput()
Description copied from class:DefaultSignalHead
Type-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:
updateOutput
in classDefaultSignalHead
-
dispose
public void dispose()
Remove references to and from this object, so that it can eventually be garbage-collected.- Specified by:
dispose
in interfaceNamedBean
- Overrides:
dispose
in classAbstractNamedBean
-
getRed
public NamedBeanHandle<Turnout> getRed()
-
getYellow
public NamedBeanHandle<Turnout> getYellow()
-
getGreen
public NamedBeanHandle<Turnout> getGreen()
-
getFlashRed
public NamedBeanHandle<Turnout> getFlashRed()
-
getFlashYellow
public NamedBeanHandle<Turnout> getFlashYellow()
-
getFlashGreen
public NamedBeanHandle<Turnout> getFlashGreen()
-
getDark
public NamedBeanHandle<Turnout> getDark()
-
getRedState
public int getRedState()
-
getYellowState
public int getYellowState()
-
getGreenState
public int getGreenState()
-
getFlashRedState
public int getFlashRedState()
-
getFlashYellowState
public int getFlashYellowState()
-
getFlashGreenState
public int getFlashGreenState()
-
getDarkState
public int getDarkState()
-
setRed
public void setRed(NamedBeanHandle<Turnout> t)
-
setYellow
public void setYellow(NamedBeanHandle<Turnout> t)
-
setGreen
public void setGreen(NamedBeanHandle<Turnout> t)
-
setFlashRed
public void setFlashRed(NamedBeanHandle<Turnout> t)
-
setFlashYellow
public void setFlashYellow(NamedBeanHandle<Turnout> t)
-
setFlashGreen
public void setFlashGreen(NamedBeanHandle<Turnout> t)
-
setDark
public void setDark(NamedBeanHandle<Turnout> t)
-
setRedState
public void setRedState(int i)
-
setYellowState
public void setYellowState(int i)
-
setGreenState
public void setGreenState(int i)
-
setFlashRedState
public void setFlashRedState(int i)
-
setFlashYellowState
public void setFlashYellowState(int i)
-
setFlashGreenState
public void setFlashGreenState(int i)
-
setDarkState
public void setDarkState(int i)
-
isTurnoutUsed
public boolean isTurnoutUsed(Turnout t)
Description copied from class:AbstractSignalHead
Check if a given turnout is used on this head.- Overrides:
isTurnoutUsed
in classDefaultSignalHead
- Parameters:
t
- Turnout object to check- Returns:
- true if turnout is configured as output or driver of head
-
-