Package jmri.jmrix.loconet
Class LnLight
java.lang.Object
jmri.implementation.AbstractNamedBean
jmri.implementation.AbstractLight
jmri.jmrix.loconet.LnLight
- All Implemented Interfaces:
Comparable<NamedBean>,PropertyChangeProvider,DigitalIO,Light,NamedBean
Implementation of the Light Object for LocoNet
Based 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
FieldsModifier and TypeFieldDescription(package private) int(package private) LnLightManager(package private) LnTrafficControllerFields inherited from class jmri.implementation.AbstractLight
lightControlList, mActive, mCurrentIntensity, mEnabled, mMaxIntensity, mMinIntensity, mStateFields inherited from class jmri.implementation.AbstractNamedBean
listenerRefs, mSystemName, registerFields inherited from interface jmri.Light
FAST_CLOCK_CONTROL, INTERMEDIATE, NO_CONTROL, PROPERTY_TARGET_INTENSITY, SENSOR_CONTROL, TIMED_ON_CONTROL, TRANSITIONING, TRANSITIONINGHIGHER, TRANSITIONINGLOWER, TRANSITIONINGTOFULLOFF, TRANSITIONINGTOFULLON, TURNOUT_STATUS_CONTROL, TWO_SENSOR_CONTROLFields inherited from interface jmri.NamedBean
DISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_COMMENT, PROPERTY_ENABLED, PROPERTY_KNOWN_STATE, PROPERTY_STATE, PROPERTY_USERNAME, QUOTED_NAME_FORMAT, UNKNOWN -
Constructor Summary
ConstructorsConstructorDescriptionLnLight(String systemName, String userName, LnTrafficController tc, LnLightManager mgr) Create a Light object, with both system and user names.LnLight(String systemName, LnTrafficController tc, LnLightManager mgr) Create a Light object, with only system name. -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoNewState(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, setStateMethods 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, vetoableChangeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface jmri.Light
getCommandedState, getKnownState, isConsistentState, requestUpdateFromLayout, setCommandedStateMethods inherited from interface jmri.NamedBean
addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, compareTo, dispose, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListenersByReference, getPropertyKeys, getRecommendedToolTip, getSystemName, getUserName, removeProperty, setComment, setProperty, setUserName, toString, updateListenerRef, vetoableChangeMethods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Field Details
-
tc
-
mgr
-
mBit
int mBit
-
-
Constructor Details
-
LnLight
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
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 Details
-
doNewState
Set the current state of this Light This routine requests the hardware to change.- Overrides:
doNewStatein classAbstractLight- Parameters:
oldState- old statenewState- new state
-