|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.implementation.AbstractNamedBean
jmri.implementation.AbstractTurnout
jmri.jmrix.lenz.XNetTurnout
public class XNetTurnout
| Field Summary | |
|---|---|
protected int |
_mClosed
|
protected int |
_mThrown
|
protected String |
_prefix
|
protected static int |
COMMANDSENT
|
protected static int |
IDLE
|
protected int |
internalState
|
protected int |
mNumber
|
protected static int |
OFFSENT
|
protected static int |
STATUSREQUESTSENT
|
protected XNetTrafficController |
tc
|
| Fields inherited from class jmri.implementation.AbstractTurnout |
|---|
_activeFeedbackType, _cabLockout, _decoderName, _enableCabLockout, _enablePushButtonLockout, _inverted, _pushButtonLockout, _reportLocked, _validDecoderNames, _validFeedbackModes, _validFeedbackNames, _validFeedbackTypes, binaryOutput, inhibitOperation, myOperator, myTurnoutOperation |
| Fields inherited from class jmri.implementation.AbstractNamedBean |
|---|
mSystemName, mUserName |
| Fields inherited from interface jmri.Turnout |
|---|
CABLOCKOUT, CLOSED, DIRECT, EXACT, INDIRECT, LOCKED, MONITORING, ONESENSOR, PUSHBUTTONLOCKOUT, SIGNAL, THROWN, TWOSENSOR, UNLOCKED |
| Fields inherited from interface jmri.NamedBean |
|---|
INCONSISTENT, UNKNOWN |
| Constructor Summary | |
|---|---|
XNetTurnout(String prefix,
int pNumber,
XNetTrafficController controller)
|
|
| Method Summary | |
|---|---|
boolean |
canInvert()
Determine if the turnouts can be inverted. |
void |
dispose()
Deactivate this object, so that it releases as many resources as possible and no longer effects others. |
protected void |
forwardCommandChangeToLayout(int s)
Handle a request to change state, typically by sending a message to the layout in some child class. |
int |
getNumber()
|
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 |
requestUpdateFromLayout()
request an update on status by sending an XPressNet message |
protected void |
sendOffMessage()
|
void |
setCommandedState(int s)
Public access to changing turnout state. |
void |
setInverted(boolean inverted)
Set turnout inverted If true commands are reversed to layout. |
protected void |
turnoutPushbuttonLockout(boolean _pushButtonLockout)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int OFFSENT
protected static final int COMMANDSENT
protected static final int STATUSREQUESTSENT
protected static final int IDLE
protected int internalState
protected int _mThrown
protected int _mClosed
protected String _prefix
protected XNetTrafficController tc
protected int mNumber
| Constructor Detail |
|---|
public XNetTurnout(String prefix,
int pNumber,
XNetTrafficController controller)
| Method Detail |
|---|
public int getNumber()
public void setCommandedState(int s)
AbstractTurnout
setCommandedState in interface TurnoutsetCommandedState in class AbstractTurnoutprotected void forwardCommandChangeToLayout(int s)
AbstractTurnout
forwardCommandChangeToLayout in class AbstractTurnouts - new state valueprotected void turnoutPushbuttonLockout(boolean _pushButtonLockout)
turnoutPushbuttonLockout in class AbstractTurnoutpublic void requestUpdateFromLayout()
public void setInverted(boolean inverted)
TurnoutIf true commands are reversed to layout.
Changing this changes the known state from CLOSED to THROWN and vice-versa, with notifications; UNKNOWN and INCONSISTENT are left unchanged, as is the commanded state.
setInverted in interface TurnoutsetInverted in class AbstractTurnoutpublic boolean canInvert()
AbstractTurnout
canInvert in interface TurnoutcanInvert in class AbstractTurnoutpublic 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 XNetListenerprotected void sendOffMessage()
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 AbstractTurnout
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||