Package jmri.jmrix.jmriclient
Class JMRIClientLight
- java.lang.Object
-
- jmri.implementation.AbstractNamedBean
-
- jmri.implementation.AbstractLight
-
- jmri.jmrix.jmriclient.JMRIClientLight
-
- All Implemented Interfaces:
java.lang.Comparable<NamedBean>
,java.util.EventListener
,PropertyChangeProvider
,DigitalIO
,AbstractMRListener
,JMRIClientListener
,Light
,NamedBean
public class JMRIClientLight extends AbstractLight implements JMRIClientListener
JMRIClient implementation of the Light interface.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jmri.NamedBean
NamedBean.BadNameException, NamedBean.BadSystemNameException, NamedBean.BadUserNameException, NamedBean.DisplayOptions, NamedBean.DuplicateSystemNameException
-
-
Field Summary
-
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 JMRIClientLight(int number, JMRIClientSystemConnectionMemo memo)
JMRIClient lights use the light number on the remote host.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doNewState(int oldState, int s)
Implement the specific change of state needed by hardware.int
getNumber()
void
message(JMRIClientMessage m)
void
reply(JMRIClientReply m)
void
requestUpdateFromLayout()
Request an update from the layout soft/hardware.protected void
sendMessage(boolean on)
-
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, 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
-
-
-
-
Constructor Detail
-
JMRIClientLight
public JMRIClientLight(int number, JMRIClientSystemConnectionMemo memo)
JMRIClient lights use the light number on the remote host.- Parameters:
number
- light number.memo
- system connection.
-
-
Method Detail
-
getNumber
public int getNumber()
-
requestUpdateFromLayout
public void requestUpdateFromLayout()
Description copied from interface:Light
Request an update from the layout soft/hardware. May not even happen, and if it does it will happen later; listen for the result.- Specified by:
requestUpdateFromLayout
in interfaceDigitalIO
- Specified by:
requestUpdateFromLayout
in interfaceLight
-
doNewState
public void doNewState(int oldState, int s)
Description copied from class:AbstractLight
Implement the specific change of state needed by hardware.- Overrides:
doNewState
in classAbstractLight
- Parameters:
oldState
- old states
- new state
-
sendMessage
protected void sendMessage(boolean on)
-
reply
public void reply(JMRIClientReply m)
- Specified by:
reply
in interfaceJMRIClientListener
-
message
public void message(JMRIClientMessage m)
- Specified by:
message
in interfaceJMRIClientListener
-
-