jmri.jmrix.lenz
Class XNetPortController

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

public abstract class XNetPortController
extends AbstractPortController

Abstract base for classes representing a XNet communications port

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

Field Summary
protected  String[] validOption2
           
 
Fields inherited from class jmri.jmrix.AbstractPortController
log, mBaudRate, mOpt1, mOpt2, mPort
 
Constructor Summary
XNetPortController()
           
 
Method Summary
abstract  DataInputStream getInputStream()
           
abstract  DataOutputStream getOutputStream()
           
abstract  boolean okToSend()
          Can the port accept additional characters?
 String option2Name()
          Option 2 controls if the buffer status will be checked when sending data
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.
 String[] validOption2()
          Get an array of valid values for "option 2"; used to display valid options.
 
Methods inherited from class jmri.jmrix.AbstractPortController
configureBaudRate, configureOption1, configureOption2, currentBaudNumber, getCurrentBaudRate, getCurrentOption1Setting, getCurrentOption2Setting, getCurrentPortName, getPortNames, handlePortBusy, handlePortNotFound, option1Name, reloadDriver, setPort, validBaudNumber, validOption1
 
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, openPort, validBaudRates
 

Field Detail

validOption2

protected String[] validOption2
Constructor Detail

XNetPortController

public XNetPortController()
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
Specified by:
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.


setOutputBufferEmpty

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


option2Name

public String option2Name()
Option 2 controls if the buffer status will be checked when sending data

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

validOption2

public String[] validOption2()
Description copied from class: AbstractPortController
Get an array of valid values for "option 2"; used to display valid options. May not be null, but may have zero entries

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


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