Package jmri.jmrix.mrc
Class MrcTurnout
- java.lang.Object
-
- jmri.implementation.AbstractNamedBean
-
- jmri.implementation.AbstractTurnout
-
- jmri.jmrix.mrc.MrcTurnout
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener
,java.lang.Comparable<NamedBean>
,java.util.EventListener
,PropertyChangeProvider
,DigitalIO
,MrcTrafficListener
,NamedBean
,Turnout
,VariableControlSpanBean
public class MrcTurnout extends AbstractTurnout implements MrcTrafficListener
New MRC implementation of the Turnout interface From Xpa+Modem implementation of the Turnout 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 Modifier and Type Field Description (package private) int
_number
(package private) java.lang.String
prefix
(package private) MrcTrafficController
tc
-
Fields inherited from class jmri.implementation.AbstractTurnout
_activeFeedbackType, _cabLockout, _decoderName, _enableCabLockout, _enablePushButtonLockout, _inverted, _pushButtonLockout, _reportLocked, _validDecoderNames, _validFeedbackModes, _validFeedbackNames, _validFeedbackTypes, binaryOutput, DELAYED_FEEDBACK_INTERVAL, inhibitOperation, myOperator, myTurnoutOperation, r, thr
-
Fields inherited from class jmri.implementation.AbstractNamedBean
listenerRefs, mSystemName, register
-
Fields inherited from interface jmri.NamedBean
DISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_STATE, QUOTED_NAME_FORMAT, UNKNOWN
-
Fields inherited from interface jmri.Turnout
CABLOCKOUT, CLOSED, DELAYED, DIRECT, EXACT, INDIRECT, LNALTERNATE, LOCKED, MONITORING, ONESENSOR, PUSHBUTTONLOCKOUT, SIGNAL, THROWN, TWOSENSOR, UNLOCKED
-
-
Constructor Summary
Constructors Constructor Description MrcTurnout(int number, MrcTrafficController tc, java.lang.String p)
Mrc turnouts use any address allowed as an accessory decoder address on the particular command station.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canInvert()
MRC turnouts can be invertedprotected void
forwardCommandChangeToLayout(int newState)
Handle a request to change state, typically by sending a message to the layout in some child class.(package private) void
forwardToCommandStation(boolean state)
int
getNumber()
void
notifyFailedXmit(java.util.Date timestamp, MrcMessage m)
void
notifyRcv(java.util.Date timestamp, MrcMessage m)
void
notifyXmit(java.util.Date timestamp, MrcMessage m)
protected void
turnoutPushbuttonLockout(boolean pushButtonLockout)
-
Methods inherited from class jmri.implementation.AbstractTurnout
canLock, describeState, dispose, enableLockOperation, forwardCommandChangeToLayout, getBeanType, getCommandedState, getControlType, getCurrentOperator, getDecoderName, getDivergingLimit, getDivergingSpeed, getFeedbackMode, getFeedbackModeForOperation, getFeedbackModeName, getFirstNamedSensor, getFirstSensor, getInhibitOperation, getInverted, getKnownState, getLeadingTurnout, getLocked, getNumberControlBits, getPossibleLockModes, getReportLocked, getSecondNamedSensor, getSecondSensor, getState, getStraightLimit, getStraightSpeed, getTurnoutOperation, getTurnoutOperator, getUsageReport, getValidDecoderNames, getValidFeedbackModes, getValidFeedbackNames, getValidFeedbackTypes, isCanFollow, isConsistentState, isFollowingCommandedState, leadingTurnoutPropertyChange, newCommandedState, newKnownState, operationPropertyChange, propertyChange, provideFirstFeedbackNamedSensor, provideFirstFeedbackSensor, provideSecondFeedbackNamedSensor, provideSecondFeedbackSensor, requestUpdateFromLayout, sensorPropertyChange, setBinaryOutput, setCommandedState, setCommandedStateAtInterval, setControlType, setDecoderName, setDivergingSpeed, setFeedbackMode, setFeedbackMode, setFollowingCommandedState, setInhibitOperation, setInitialKnownStateFromFeedback, setInverted, setLeadingTurnout, setLeadingTurnout, setLocked, setNumberControlBits, setReportLocked, setState, setStraightSpeed, setTurnoutOperation, stateChangeCheck, statesOk, turnoutPushbuttonLockout, vetoableChange
-
Methods inherited from class jmri.implementation.AbstractNamedBean
addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, 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
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jmri.NamedBean
addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, compareTo, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListenersByReference, getPropertyKeys, getRecommendedToolTip, getSystemName, getUserName, removeProperty, setComment, setProperty, setUserName, toString, updateListenerRef
-
Methods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Methods inherited from interface jmri.Turnout
provideFeedbackSensor
-
-
-
-
Constructor Detail
-
MrcTurnout
public MrcTurnout(int number, MrcTrafficController tc, java.lang.String p)
Mrc turnouts use any address allowed as an accessory decoder address on the particular command station.- Parameters:
number
- turnout address valuetc
- traffic controller for connectionp
- system prefix for connection
-
-
Method Detail
-
getNumber
public int getNumber()
-
canInvert
public boolean canInvert()
MRC turnouts can be inverted- Specified by:
canInvert
in interfaceTurnout
- Overrides:
canInvert
in classAbstractTurnout
- Returns:
- invert supported
-
forwardCommandChangeToLayout
protected void forwardCommandChangeToLayout(int newState)
Handle a request to change state, typically by sending a message to the layout in some child class. Public version (used by TurnoutOperator) sends the current commanded state without changing it. Implementing classes will typically check the value of s and send a system specific sendMessage command.- Specified by:
forwardCommandChangeToLayout
in classAbstractTurnout
- Parameters:
newState
- new state value
-
forwardToCommandStation
void forwardToCommandStation(boolean state)
-
notifyRcv
public void notifyRcv(java.util.Date timestamp, MrcMessage m)
- Specified by:
notifyRcv
in interfaceMrcTrafficListener
-
notifyXmit
public void notifyXmit(java.util.Date timestamp, MrcMessage m)
- Specified by:
notifyXmit
in interfaceMrcTrafficListener
-
notifyFailedXmit
public void notifyFailedXmit(java.util.Date timestamp, MrcMessage m)
- Specified by:
notifyFailedXmit
in interfaceMrcTrafficListener
-
turnoutPushbuttonLockout
protected void turnoutPushbuttonLockout(boolean pushButtonLockout)
- Specified by:
turnoutPushbuttonLockout
in classAbstractTurnout
-
-