jmri.jmrix.acela
Class AcelaTurnout

java.lang.Object
  extended by jmri.implementation.AbstractNamedBean
      extended by jmri.implementation.AbstractTurnout
          extended by jmri.jmrix.acela.AcelaTurnout
All Implemented Interfaces:
PropertyChangeListener, Serializable, EventListener, NamedBean, Turnout

public class AcelaTurnout
extends AbstractTurnout

AcelaLight.java Implementation of the Light Object for Acela

Based in part on SerialTurnout.java

Author:
Dave Duchamp Copyright (C) 2004, Bob Coleman Copyright (C) 2007, 2008 Based on CMRI serial example, modified to establish Acela support.
See Also:
Serialized Form

Field Summary
protected  int mState
           
 
Fields inherited from class jmri.implementation.AbstractTurnout
_activeFeedbackType, _cabLockout, _decoderName, _enableCabLockout, _enablePushButtonLockout, _inverted, _pushButtonLockout, _reportLocked, _validDecoderNames, _validFeedbackModes, _validFeedbackNames, _validFeedbackTypes, inhibitOperation, myOperator, myTurnoutOperation
 
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
AcelaTurnout(String systemName)
          Create a Light object, with only system name.
AcelaTurnout(String systemName, String userName)
          Create a Light object, with both system and user names.
 
Method Summary
 boolean canInvert()
          Determine if the turnouts can be inverted.
protected  void forwardCommandChangeToLayout(int s)
          Set the current state of this Light This routine requests the hardware to change.
protected  void sendMessage(boolean closed)
           
protected  void turnoutPushbuttonLockout(boolean pushButtonLockout)
          Send a message to the layout to lock or unlock the turnout pushbuttons if true, pushbutton lockout enabled
 
Methods inherited from class jmri.implementation.AbstractTurnout
canLock, dispose, enableLockOperation, forwardCommandChangeToLayout, getCommandedState, getControlType, getCurrentOperator, getDecoderName, getFeedbackMode, getFeedbackModeForOperation, getFeedbackModeName, getFirstSensor, getInhibitOperation, getInverted, getKnownState, getLocked, getNumberOutputBits, getReportLocked, getSecondSensor, getState, getTurnoutOperation, getTurnoutOperator, getValidDecoderNames, getValidFeedbackNames, getValidFeedbackTypes, isConsistentState, newCommandedState, newKnownState, operationPropertyChange, propertyChange, provideFirstFeedbackSensor, provideSecondFeedbackSensor, sensorPropertyChange, setCommandedState, setControlType, setDecoderName, setFeedbackMode, setFeedbackMode, setInhibitOperation, setInitialKnownStateFromFeedback, setInverted, setLocked, setNumberOutputBits, setReportLocked, setState, setTurnoutOperation, turnoutPushbuttonLockout
 
Methods inherited from class jmri.implementation.AbstractNamedBean
addPropertyChangeListener, 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, getComment, getNumPropertyChangeListeners, getSystemName, getUserName, removePropertyChangeListener, setComment, setUserName
 

Field Detail

mState

protected int mState
Constructor Detail

AcelaTurnout

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

'systemName' was previously validated in AcelaLightManager


AcelaTurnout

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

'systemName' was previously validated in AcelaLightManager

Method Detail

forwardCommandChangeToLayout

protected void forwardCommandChangeToLayout(int s)
Set the current state of this Light This routine requests the hardware to change. If this is really a change in state of this bit (tested in AcelaNode), a Transmit packet will be sent before this Node is next polled.

Specified by:
forwardCommandChangeToLayout in class AbstractTurnout
Parameters:
s - new state value

turnoutPushbuttonLockout

protected void turnoutPushbuttonLockout(boolean pushButtonLockout)
Send a message to the layout to lock or unlock the turnout pushbuttons if true, pushbutton lockout enabled

Specified by:
turnoutPushbuttonLockout in class AbstractTurnout

canInvert

public boolean canInvert()
Description copied from class: AbstractTurnout
Determine if the turnouts can be inverted. If true inverted turnouts supported.

Specified by:
canInvert in interface Turnout
Overrides:
canInvert in class AbstractTurnout

sendMessage

protected void sendMessage(boolean closed)


Copyright © 1997 - 2009 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: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads