jmri.jmrix.loconet.pr3
Class PR3Adapter

Show UML class diagram
java.lang.Object
  extended by jmri.jmrix.AbstractPortController
      extended by jmri.jmrix.AbstractSerialPortController
          extended by jmri.jmrix.loconet.LnPortController
              extended by jmri.jmrix.loconet.locobuffer.LocoBufferAdapter
                  extended by jmri.jmrix.loconet.pr3.PR3Adapter
All Implemented Interfaces:
PortAdapter, SerialPortAdapter

public class PR3Adapter
extends LocoBufferAdapter

Update the code in jmri.jmrix.loconet.locobuffer so that it refers to the switch settings on the new Digitrax PR3


Nested Class Summary
 
Nested classes/interfaces inherited from class jmri.jmrix.AbstractPortController
AbstractPortController.Option
 
Field Summary
(package private) static org.slf4j.Logger log
           
 
Fields inherited from class jmri.jmrix.loconet.locobuffer.LocoBufferAdapter
validOption1, validSpeeds, validSpeedValues
 
Fields inherited from class jmri.jmrix.loconet.LnPortController
adaptermemo, commandStationName, commandStationNames, mCanRead, mProgPowersOff, mTurnoutExtraSpace, mTurnoutNoRetry
 
Fields inherited from class jmri.jmrix.AbstractSerialPortController
mBaudRate, mPort
 
Fields inherited from class jmri.jmrix.AbstractPortController
allowConnectionRecovery, mDisabled, mManufacturer, option1Name, option2Name, option3Name, option4Name, options, reconnectinterval, retryAttempts
 
Constructor Summary
PR3Adapter()
           
 
Method Summary
 String[] commandStationOptions()
          The PR3 can be used in numerous modes, so handle that
 void configure()
          Set up all of the other objects to operate with a PR3 connected to this port.
 void dispose()
           
 SystemConnectionMemo getSystemConnectionMemo()
           
protected  void setSerialPort(SerialPort activeSerialPort)
          Always use flow control, not considered a user-settable option
 int[] validBaudNumber()
          Get an array of valid baud rates as integers.
 String[] validBaudRates()
          Get an array of valid baud rates.
 
Methods inherited from class jmri.jmrix.loconet.locobuffer.LocoBufferAdapter
getInputStream, getOutputStream, getPortNames, okToSend, openPort, status
 
Methods inherited from class jmri.jmrix.loconet.LnPortController
setCommandStationType, setDisabled, setTurnoutHandling
 
Methods inherited from class jmri.jmrix.AbstractSerialPortController
closeConnection, configureBaudRate, connect, currentBaudNumber, getCurrentBaudRate, getCurrentPortName, handlePortBusy, handlePortNotFound, reconnect, recover, resetupConnection, setPort
 
Methods inherited from class jmri.jmrix.AbstractPortController
configureOption1, configureOption2, configureOption3, configureOption4, getDisabled, getManufacturer, getOption1Name, getOption2Name, getOption3Name, getOption4Name, getOptionChoices, getOptionDisplayName, getOptions, getOptionState, isOptionAdvanced, safeSleep, setClosed, setManufacturer, setOpened, setOptionState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jmri.jmrix.SerialPortAdapter
configureBaudRate, configureOption1, configureOption2, configureOption3, configureOption4, getCurrentBaudRate, getCurrentPortName, getManufacturer, handlePortBusy, setManufacturer, setPort
 
Methods inherited from interface jmri.jmrix.PortAdapter
connect, getDisabled, getOption1Name, getOption2Name, getOption3Name, getOption4Name, getOptionChoices, getOptionDisplayName, getOptions, getOptionState, isOptionAdvanced, recover, setDisabled, setOptionState
 

Field Detail

log

static org.slf4j.Logger log
Constructor Detail

PR3Adapter

public PR3Adapter()
Method Detail

setSerialPort

protected void setSerialPort(SerialPort activeSerialPort)
                      throws UnsupportedCommOperationException
Always use flow control, not considered a user-settable option

Overrides:
setSerialPort in class LocoBufferAdapter
Throws:
UnsupportedCommOperationException

configure

public void configure()
Set up all of the other objects to operate with a PR3 connected to this port. This overrides the version in loconet.locobuffer, but it has to duplicate much of the functionality there, so the code is basically copied.

Specified by:
configure in interface PortAdapter
Specified by:
configure in interface SerialPortAdapter
Overrides:
configure in class LocoBufferAdapter

validBaudRates

public String[] validBaudRates()
Get an array of valid baud rates.

Specified by:
validBaudRates in interface SerialPortAdapter
Overrides:
validBaudRates in class LocoBufferAdapter

validBaudNumber

public int[] validBaudNumber()
Get an array of valid baud rates as integers. This allows subclasses to change the arrays of speeds.

Overrides:
validBaudNumber in class LocoBufferAdapter

commandStationOptions

public String[] commandStationOptions()
The PR3 can be used in numerous modes, so handle that


getSystemConnectionMemo

public SystemConnectionMemo getSystemConnectionMemo()
Specified by:
getSystemConnectionMemo in interface PortAdapter
Overrides:
getSystemConnectionMemo in class LocoBufferAdapter

dispose

public void dispose()
Specified by:
dispose in interface PortAdapter
Overrides:
dispose in class LocoBufferAdapter


Copyright © 1997-2014 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