jmri.jmrix.lenz
Class XNetLight

java.lang.Object
  extended by jmri.AbstractNamedBean
      extended by jmri.AbstractLight
          extended by jmri.jmrix.lenz.XNetLight
All Implemented Interfaces:
Serializable, EventListener, AbstractMRListener, XNetListener, Light, NamedBean

public class XNetLight
extends AbstractLight
implements XNetListener

XNetLight.java Implementation of the Light Object for XPressNet NOTE: This is a simplification of the XNetTurnout class.

Based in part on SerialLight.java

Author:
Paul Bender Copyright (C) 2008
See Also:
Serialized Form

Field Summary
protected  int mState
           
 
Fields inherited from class jmri.AbstractLight
mActive, mClock, mControlSensor, mControlSensorName, mControlSensorSense, mControlTurnout, mControlTurnoutName, mControlType, mCurrentIntensity, mEnabled, mFastClockOffHour, mFastClockOffMin, mFastClockOnHour, mFastClockOnMin, mLightOnTimerActive, mMaxIntensity, mMinIntensity, mSensorListener, mTimebaseListener, mTimedActive, mTimedControlListener, mTimedControlSensor, mTimedControlTimer, mTimedSensorListener, mTimedSensorName, mTimeOff, mTimeOn, mTimeOnDuration, mTurnoutListener, mTurnoutState
 
Fields inherited from interface jmri.Light
FAST_CLOCK_CONTROL, INTERMEDIATE, NO_CONTROL, OFF, ON, SENSOR_CONTROL, TIMED_ON_CONTROL, TRANSITIONING, TRANSITIONINGHIGHER, TRANSITIONINGLOWER, TRANSITIONINGTOFULLOFF, TRANSITIONINGTOFULLON, TURNOUT_STATUS_CONTROL
 
Fields inherited from interface jmri.NamedBean
INCONSISTENT, UNKNOWN
 
Constructor Summary
XNetLight(String systemName)
          Create a Light object, with only system name.
XNetLight(String systemName, String userName)
          Create a Light object, with both system and user names.
 
Method Summary
 int getState()
          Return the current state of this Light
 void message(XNetMessage l)
          Member function that will be invoked by a XNetInterface implementation to forward a XNet message sent to the layout.
 void message(XNetReply l)
          Member function that will be invoked by a XNetInterface implementation to forward a XNet message from the layout.
 void setState(int newState)
          Set the current state of this Light This routine requests the hardware to change.
 
Methods inherited from class jmri.AbstractLight
activateLight, deactivateLight, doNewState, getControlSensorName, getControlSensorSense, getControlTimedOnSensorName, getControlTurnoutName, getControlTurnoutState, getControlType, getCurrentIntensity, getEnabled, getFastClockOffHour, getFastClockOffMin, getFastClockOnHour, getFastClockOnMin, getMaxIntensity, getMinIntensity, getTargetIntensity, getTimedOnDuration, getTransitionTime, isIntensityVariable, isTransitionAvailable, isTransitioning, notifyStateChange, notifyTargetIntensityChange, setControlSensor, setControlSensorSense, setControlTimedOnSensor, setControlTurnout, setControlTurnoutState, setControlType, setEnabled, setFastClockControlSchedule, setMaxIntensity, setMinIntensity, setTargetIntensity, setTimedOnDuration, setTransitionTime, updateClockControlLight, updateIntensityHigh, updateIntensityIntermediate, updateIntensityLow
 
Methods inherited from class jmri.AbstractNamedBean
addPropertyChangeListener, dispose, firePropertyChange, getComment, getNumPropertyChangeListeners, getSystemName, getUserName, removePropertyChangeListener, setComment, setUserName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jmri.NamedBean
addPropertyChangeListener, dispose, getComment, getNumPropertyChangeListeners, getSystemName, getUserName, removePropertyChangeListener, setComment, setUserName
 

Field Detail

mState

protected int mState
Constructor Detail

XNetLight

public XNetLight(String systemName)
Create a Light object, with only system name.

'systemName' was previously validated in LnLightManager


XNetLight

public XNetLight(String systemName,
                 String userName)
Create a Light object, with both system and user names.

'systemName' was previously validated in XNetLightManager

Method Detail

getState

public int getState()
Return the current state of this Light

Specified by:
getState in interface Light
Specified by:
getState in interface NamedBean
Overrides:
getState in class AbstractLight

setState

public void setState(int newState)
Set the current state of this Light This routine requests the hardware to change.

Specified by:
setState in interface Light
Specified by:
setState in interface NamedBean
Overrides:
setState in class AbstractLight

message

public void message(XNetReply l)
Description copied from interface: XNetListener
Member function that will be invoked by a XNetInterface implementation to forward a XNet message from the layout.

Specified by:
message in interface XNetListener
Parameters:
l - The received XNet message. Note that this same object may be presented to multiple users. It should not be modified here.

message

public void message(XNetMessage l)
Description copied from interface: XNetListener
Member function that will be invoked by a XNetInterface implementation to forward a XNet message sent to the layout. Normally, this function will do nothing.

Specified by:
message in interface XNetListener
Parameters:
l - The received XNet message. Note that this same object may be presented to multiple users. It should not be modified here.


Copyright © 1997 - 2008 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: SourceForge_Logo