|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.implementation.AbstractNamedBean
jmri.implementation.AbstractLight
jmri.jmrix.lenz.XNetLight
public class XNetLight
XNetLight.java Implementation of the Light Object for XPressNet NOTE: This is a simplification of the XNetTurnout class.
Based in part on SerialLight.java
| Field Summary |
|---|
| Fields inherited from class jmri.implementation.AbstractLight |
|---|
lightControlList, mActive, mCurrentIntensity, mEnabled, mMaxIntensity, mMinIntensity, mState |
| Fields inherited from class jmri.implementation.AbstractNamedBean |
|---|
mUserName |
| 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, TWO_SENSOR_CONTROL |
| Fields inherited from interface jmri.NamedBean |
|---|
INCONSISTENT, UNKNOWN |
| Constructor Summary | |
|---|---|
XNetLight(XNetTrafficController tc,
XNetLightManager lm,
String systemName)
Create a Light object, with only system name. |
|
XNetLight(XNetTrafficController tc,
XNetLightManager lm,
String systemName,
String userName)
Create a Light object, with both system and user names. |
|
| Method Summary | |
|---|---|
void |
dispose()
Deactivate this object, so that it releases as many resources as possible and no longer effects others. |
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 |
notifyTimeout(XNetMessage msg)
Member function invoked by an XNetInterface implementation to notify * a sender that an outgoing message timed out and was dropped from the * queue. |
void |
setState(int newState)
Set the current state of this Light This routine requests the hardware to change. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XNetLight(XNetTrafficController tc,
XNetLightManager lm,
String systemName)
'systemName' was previously validated in LnLightManager
public XNetLight(XNetTrafficController tc,
XNetLightManager lm,
String systemName,
String userName)
'systemName' was previously validated in XNetLightManager
| Method Detail |
|---|
public void dispose()
NamedBeanFor example, if this object has listeners, after a call to this method it should no longer notify those listeners. Any native or system-wide resources it maintains should be released, including threads, files, etc.
It is an error to invoke any other methods on this object once dispose() has been called. Note, however, that there is no guarantee about behavior in that case.
Afterwards, references to this object may still exist elsewhere, preventing its garbage collection. But it's formally dead, and shouldn't be keeping any other objects alive. Therefore, this method should null out any references to other objects that this NamedBean contained.
dispose in interface NamedBeandispose in class AbstractNamedBeanpublic int getState()
getState in interface LightgetState in interface NamedBeangetState in class AbstractLightpublic void setState(int newState)
setState in interface LightsetState in interface NamedBeansetState in class AbstractLightpublic void message(XNetReply l)
XNetListener
message in interface XNetListenerl - The received XNet message. Note that this same object
may be presented to multiple users. It should not be
modified here.public void message(XNetMessage l)
XNetListener
message in interface XNetListenerl - The received XNet message. Note that this same object
may be presented to multiple users. It should not be
modified here.public void notifyTimeout(XNetMessage msg)
XNetListener
notifyTimeout in interface XNetListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||