jmri.jmrix
Interface SerialPortAdapter

Show UML class diagram
All Superinterfaces:
PortAdapter
All Known Implementing Classes:
AbstractSerialPortController, AcelaPortController, CanUsbDriverAdapter, Dcc4PcPortController, EasyDccPortController, EliteAdapter, GcPortController, GcSerialDriverAdapter, IEEE802154PortController, IntelliboxAdapter, InternalAdapter, LI100Adapter, LI100Adapter, LI101Adapter, LIUSBAdapter, LnHexFilePort, LnPortController, LocoBufferAdapter, LocoBufferIIAdapter, LocoBufferUsbAdapter, MrcPortController, MS100Adapter, Mx1Adapter, Mx1PortController, NcePortController, Port, PortController, PortController, PR2Adapter, PR3Adapter, QsiPortController, RfidPortController, SerialAdapter, SerialDriverAdapter, SerialDriverAdapter, SerialDriverAdapter, SerialDriverAdapter, SerialDriverAdapter, SerialDriverAdapter, SerialDriverAdapter, SerialDriverAdapter, SerialDriverAdapter, SerialDriverAdapter, SerialDriverAdapter, SerialDriverAdapter, SerialDriverAdapter, SerialDriverAdapter, SerialDriverAdapter, SerialDriverAdapter, SerialDriverAdapter, SerialDriverAdapter, SerialDriverAdapter, SerialDriverAdapter, SerialDriverAdapter, SerialDriverAdapter, SerialDriverAdapter, SerialDriverAdapter, SerialDriverAdapter, SerialPortController, SerialPortController, SerialPortController, SerialPortController, SerialPortController, SerialPortController, SerialPortController, SerialSensorAdapter, SimDriverAdapter, SimulatorAdapter, SimulatorAdapter, SpecificDriverAdapter, SpecificDriverAdapter, SpecificDriverAdapter, SpeedoPortController, SprogCSSerialDriverAdapter, SprogPortController, TamsPortController, UhlenbrockAdapter, UsbDriverAdapter, XBeeAdapter, XNetSerialPortController, XNetSimulatorAdapter, XNetSimulatorPortController, XpaPortController, ZTC640Adapter

public interface SerialPortAdapter
extends PortAdapter

Enables basic setup of a serial interface for a jmrix implementation.

See Also:
SerialConfigException

Method Summary
 void configure()
          Configure all of the other jmrix widgets needed to work with this adapter
 void configureBaudRate(String rate)
          Set the baud rate.
 void configureOption1(String value)
          Set the first port option.
 void configureOption2(String value)
          Set the second port option.
 void configureOption3(String value)
          Set the second port option.
 void configureOption4(String value)
          Set the second port option.
 String getCurrentBaudRate()
           
 String getCurrentPortName()
           
 String getManufacturer()
          Return the System Manufacturers Name
 Vector<String> getPortNames()
          Provide a vector of valid port names, each a String.
 String handlePortBusy(PortInUseException p, String portName, org.slf4j.Logger log)
          Error handling for busy port at open.
 String openPort(String portName, String appName)
          Open a specified port.
 void setManufacturer(String Manufacturer)
          Set the System Manufacturers Name
 void setPort(String s)
          Remember the associated port name
 boolean status()
          Query the status of this connection.
 String[] validBaudRates()
          Get an array of valid baud rates; used to display valid options.
 
Methods inherited from interface jmri.jmrix.PortAdapter
connect, dispose, getDisabled, getInputStream, getOption1Name, getOption2Name, getOption3Name, getOption4Name, getOptionChoices, getOptionDisplayName, getOptions, getOptionState, getOutputStream, getSystemConnectionMemo, isOptionAdvanced, recover, setDisabled, setOptionState
 

Method Detail

getPortNames

Vector<String> getPortNames()
Provide a vector of valid port names, each a String.


openPort

String openPort(String portName,
                String appName)
Open a specified port. The appname argument is to be provided to the underlying OS during startup so that it can show on status displays, etc


configure

void configure()
Configure all of the other jmrix widgets needed to work with this adapter

Specified by:
configure in interface PortAdapter

status

boolean status()
Query the status of this connection. If all OK, at least as far as is known, return true

Specified by:
status in interface PortAdapter

setPort

void setPort(String s)
Remember the associated port name

Parameters:
s -

getCurrentPortName

String getCurrentPortName()
Specified by:
getCurrentPortName in interface PortAdapter

validBaudRates

String[] validBaudRates()
Get an array of valid baud rates; used to display valid options.


configureBaudRate

void configureBaudRate(String rate)
Set the baud rate. Only to be used after construction, but before the openPort call.


getCurrentBaudRate

String getCurrentBaudRate()

configureOption1

void configureOption1(String value)
Set the first port option. Only to be used after construction, but before the openPort call

Specified by:
configureOption1 in interface PortAdapter

configureOption2

void configureOption2(String value)
Set the second port option. Only to be used after construction, but before the openPort call

Specified by:
configureOption2 in interface PortAdapter

configureOption3

void configureOption3(String value)
Set the second port option. Only to be used after construction, but before the openPort call

Specified by:
configureOption3 in interface PortAdapter

configureOption4

void configureOption4(String value)
Set the second port option. Only to be used after construction, but before the openPort call

Specified by:
configureOption4 in interface PortAdapter

handlePortBusy

String handlePortBusy(PortInUseException p,
                      String portName,
                      org.slf4j.Logger log)
Error handling for busy port at open.

See Also:
AbstractSerialPortController

getManufacturer

String getManufacturer()
Return the System Manufacturers Name

Specified by:
getManufacturer in interface PortAdapter

setManufacturer

void setManufacturer(String Manufacturer)
Set the System Manufacturers Name

Specified by:
setManufacturer in interface PortAdapter


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