jmri.jmrix.lenz
Class XNetSerialPortController

java.lang.Object
  extended by jmri.jmrix.AbstractPortController
      extended by jmri.jmrix.AbstractSerialPortController
          extended by jmri.jmrix.lenz.XNetSerialPortController
All Implemented Interfaces:
XNetPortController, PortAdapter, SerialPortAdapter
Direct Known Subclasses:
EliteAdapter, LI100Adapter, LI100Adapter, LI101Adapter, LIUSBAdapter, ZTC640Adapter

public abstract class XNetSerialPortController
extends AbstractSerialPortController
implements XNetPortController

Abstract base for classes representing a XNet communications port

Author:
Bob Jacobsen Copyright (C) 2001, 2008, Paul Bender Copyright (C) 2004,2010

Field Summary
protected  XNetSystemConnectionMemo adaptermemo
           
protected  boolean checkBuffer
           
protected  String[] validOption2
           
 
Fields inherited from class jmri.jmrix.AbstractSerialPortController
mBaudRate, mPort
 
Fields inherited from class jmri.jmrix.AbstractPortController
mDisabled, mManufacturer, mOpt1, mOpt2, opened
 
Constructor Summary
XNetSerialPortController()
           
 
Method Summary
 void dispose()
           
 String getCurrentOption2Setting()
          Get current option 2 value
abstract  DataInputStream getInputStream()
           
abstract  DataOutputStream getOutputStream()
           
 SystemConnectionMemo getSystemConnectionMemo()
           
abstract  boolean okToSend()
          Can the port accept additional characters?
abstract  void setOutputBufferEmpty(boolean s)
          We need a way to say if the output buffer is empty or not
abstract  boolean status()
          Check that this object is ready to operate.
 
Methods inherited from class jmri.jmrix.AbstractSerialPortController
configureBaudRate, currentBaudNumber, getCurrentBaudRate, getCurrentPortName, getPortNames, handlePortBusy, handlePortNotFound, setDisabled, setPort, validBaudNumber
 
Methods inherited from class jmri.jmrix.AbstractPortController
configureOption1, configureOption2, getCurrentOption1Setting, getDisabled, getManufacturer, option1Name, option2Name, setManufacturer, validOption1, validOption2
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jmri.jmrix.PortAdapter
configure, configureOption1, configureOption2, getCurrentOption1Setting, getCurrentPortName, getDisabled, getManufacturer, option1Name, option2Name, setDisabled, setManufacturer, validOption1, validOption2
 
Methods inherited from interface jmri.jmrix.SerialPortAdapter
configure, configureOption1, configureOption2, getCurrentOption1Setting, getManufacturer, openPort, option1Name, option2Name, setManufacturer, validBaudRates, validOption1, validOption2
 

Field Detail

validOption2

protected String[] validOption2

checkBuffer

protected boolean checkBuffer

adaptermemo

protected XNetSystemConnectionMemo adaptermemo
Constructor Detail

XNetSerialPortController

public XNetSerialPortController()
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 XNetPortController
Specified by:
status in interface PortAdapter
Specified by:
status in interface SerialPortAdapter
Overrides:
status in class AbstractPortController

okToSend

public abstract 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.

Specified by:
okToSend in interface XNetPortController

setOutputBufferEmpty

public abstract void setOutputBufferEmpty(boolean s)
We need a way to say if the output buffer is empty or not

Specified by:
setOutputBufferEmpty in interface XNetPortController

getCurrentOption2Setting

public String getCurrentOption2Setting()
Description copied from interface: PortAdapter
Get current option 2 value

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

getSystemConnectionMemo

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

dispose

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


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