Package jmri.jmrix.loconet
Class LnLight
- java.lang.Object
-
- jmri.implementation.AbstractNamedBean
-
- jmri.implementation.AbstractLight
-
- jmri.jmrix.loconet.LnLight
-
- All Implemented Interfaces:
java.lang.Comparable<NamedBean>
,PropertyChangeProvider
,DigitalIO
,Light
,NamedBean
public class LnLight extends AbstractLight
Implementation of the Light Object for LocoNetBased in part on SerialLight.java
-
-
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) int
mBit
(package private) LnLightManager
mgr
(package private) LnTrafficController
tc
-
Fields inherited from class jmri.implementation.AbstractLight
lightControlList, mActive, mCurrentIntensity, mEnabled, mMaxIntensity, mMinIntensity, mState
-
Fields inherited from class jmri.implementation.AbstractNamedBean
listenerRefs, mSystemName, register
-
Fields inherited from interface jmri.Light
FAST_CLOCK_CONTROL, INTERMEDIATE, NO_CONTROL, SENSOR_CONTROL, TIMED_ON_CONTROL, TRANSITIONING, TRANSITIONINGHIGHER, TRANSITIONINGLOWER, TRANSITIONINGTOFULLOFF, TRANSITIONINGTOFULLON, TURNOUT_STATUS_CONTROL, TWO_SENSOR_CONTROL
-
Fields inherited from interface jmri.NamedBean
DISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_STATE, QUOTED_NAME_FORMAT, UNKNOWN
-
-
Constructor Summary
Constructors Constructor Description LnLight(java.lang.String systemName, java.lang.String userName, LnTrafficController tc, LnLightManager mgr)
Create a Light object, with both system and user names.LnLight(java.lang.String systemName, LnTrafficController tc, LnLightManager mgr)
Create a Light object, with only system name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doNewState(int oldState, int newState)
Set the current state of this Light This routine requests the hardware to change.-
Methods inherited from class jmri.implementation.AbstractLight
activateLight, addLightControl, clearLightControls, deactivateLight, describeState, getBeanType, getEnabled, getLightControlList, getState, getUsageReport, notifyStateChange, notifyTargetIntensityChange, setEnabled, setState
-
Methods inherited from class jmri.implementation.AbstractNamedBean
addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, dispose, 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, vetoableChange
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jmri.Light
getCommandedState, getKnownState, isConsistentState, requestUpdateFromLayout, setCommandedState
-
Methods inherited from interface jmri.NamedBean
addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, compareTo, dispose, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListenersByReference, getPropertyKeys, getSystemName, getUserName, removeProperty, setComment, setProperty, setUserName, toString, updateListenerRef, vetoableChange
-
Methods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
-
-
-
Field Detail
-
mgr
LnLightManager mgr
-
mBit
int mBit
-
-
Constructor Detail
-
LnLight
public LnLight(java.lang.String systemName, LnTrafficController tc, LnLightManager mgr)
Create a Light object, with only system name.'systemName' was previously validated in LnLightManager
- Parameters:
systemName
- for the new beantc
- the LnTrafficController which handles the messagingmgr
- the LnLightManager which manages this type of object bean
-
LnLight
public LnLight(java.lang.String systemName, java.lang.String userName, LnTrafficController tc, LnLightManager mgr)
Create a Light object, with both system and user names.'systemName' was previously validated in LnLightManager
- Parameters:
systemName
- for the new beanuserName
- for the new beantc
- the LnTrafficController which handles the messagingmgr
- the LnLightManager which manages this type of object bean
-
-
Method Detail
-
doNewState
protected void doNewState(int oldState, int newState)
Set the current state of this Light This routine requests the hardware to change.- Overrides:
doNewState
in classAbstractLight
- Parameters:
oldState
- old statenewState
- new state
-
-