jmri.jmrix.loconet
Class LnPortController

Show UML class diagram
java.lang.Object
  extended by jmri.jmrix.AbstractPortController
      extended by jmri.jmrix.AbstractSerialPortController
          extended by jmri.jmrix.loconet.LnPortController
All Implemented Interfaces:
PortAdapter, SerialPortAdapter
Direct Known Subclasses:
LnHexFilePort, LocoBufferAdapter, MS100Adapter

public abstract class LnPortController
extends AbstractSerialPortController

Base for classes representing a LocoNet communications port


Nested Class Summary
 
Nested classes/interfaces inherited from class jmri.jmrix.AbstractPortController
AbstractPortController.Option
 
Field Summary
protected  LocoNetSystemConnectionMemo adaptermemo
           
protected  String commandStationName
           
protected  String[] commandStationNames
           
(package private) static org.slf4j.Logger log
           
protected  boolean mCanRead
           
protected  boolean mProgPowersOff
           
protected  boolean mTurnoutExtraSpace
           
protected  boolean mTurnoutNoRetry
           
 
Fields inherited from class jmri.jmrix.AbstractSerialPortController
mBaudRate, mPort
 
Fields inherited from class jmri.jmrix.AbstractPortController
allowConnectionRecovery, mDisabled, mManufacturer, opened, option1Name, option2Name, option3Name, option4Name, options, reconnectinterval, retryAttempts
 
Constructor Summary
LnPortController()
           
 
Method Summary
abstract  DataInputStream getInputStream()
           
abstract  DataOutputStream getOutputStream()
           
 boolean okToSend()
          Can the port accept additional characters?
 void setCommandStationType(String value)
          Set config info from the command station type name.
 void setDisabled(boolean disabled)
          Sets whether the connection is disabled
 void setTurnoutHandling(String value)
           
abstract  boolean status()
          Check that this object is ready to operate.
 
Methods inherited from class jmri.jmrix.AbstractSerialPortController
closeConnection, configureBaudRate, connect, currentBaudNumber, dispose, getCurrentBaudRate, getCurrentPortName, getPortNames, getSystemConnectionMemo, handlePortBusy, handlePortNotFound, reconnect, recover, resetupConnection, setPort, validBaudNumber
 
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
configure, configureOption1, configureOption2, configureOption3, configureOption4, getManufacturer, openPort, setManufacturer, validBaudRates
 
Methods inherited from interface jmri.jmrix.PortAdapter
getDisabled, getOption1Name, getOption2Name, getOption3Name, getOption4Name, getOptionChoices, getOptionDisplayName, getOptions, getOptionState, isOptionAdvanced, setOptionState
 

Field Detail

adaptermemo

protected LocoNetSystemConnectionMemo adaptermemo

mCanRead

protected boolean mCanRead

mProgPowersOff

protected boolean mProgPowersOff

commandStationName

protected String commandStationName

mTurnoutNoRetry

protected boolean mTurnoutNoRetry

mTurnoutExtraSpace

protected boolean mTurnoutExtraSpace

commandStationNames

protected String[] commandStationNames

log

static org.slf4j.Logger log
Constructor Detail

LnPortController

public LnPortController()
Method Detail

getInputStream

public abstract DataInputStream getInputStream()
Specified by:
getInputStream in interface PortAdapter
Specified by:
getInputStream in class AbstractPortController

getOutputStream

public abstract DataOutputStream getOutputStream()
Specified by:
getOutputStream in interface PortAdapter
Specified by:
getOutputStream in class AbstractPortController

status

public abstract boolean status()
Check that this object is ready to operate. This is a question of configuration, not transient hardware status.

Specified by:
status in interface PortAdapter
Specified by:
status in interface SerialPortAdapter
Overrides:
status in class AbstractPortController

okToSend

public boolean okToSend()
Can the port accept additional characters? This might go false for short intervals, but it might also stick off if something goes wrong.

Provide a default implementation for the MS100, etc, in which this is _always_ true, as we rely on the queueing in the port itself.


setCommandStationType

public void setCommandStationType(String value)
Set config info from the command station type name.


setTurnoutHandling

public void setTurnoutHandling(String value)

setDisabled

public void setDisabled(boolean disabled)
Description copied from interface: PortAdapter
Sets whether the connection is disabled

Specified by:
setDisabled in interface PortAdapter
Overrides:
setDisabled in class AbstractSerialPortController


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