jmri.jmrix
Interface PortAdapter

Show UML class diagram
All Known Subinterfaces:
NetworkPortAdapter, SerialPortAdapter, XNetPortController
All Known Implementing Classes:
AbstractNetworkPortController, AbstractPortController, AbstractSerialPortController, AbstractStreamPortController, AcelaPortController, CanUsbDriverAdapter, Dcc4PcPortController, EasyDccNetworkPortController, EasyDccPortController, EcosPortController, EliteAdapter, GcPortController, GcSerialDriverAdapter, IEEE802154PortController, IntelliboxAdapter, InternalAdapter, JMRIClientPortController, LI100Adapter, LI100Adapter, LI101Adapter, LIUSBAdapter, LIUSBEthernetAdapter, LIUSBServerAdapter, LnHexFilePort, LnNetworkPortController, LnPortController, LnTcpDriverAdapter, LocoBufferAdapter, LocoBufferIIAdapter, LocoBufferUsbAdapter, MarklinPortController, MergNetworkDriverAdapter, MrcPortController, MS100Adapter, Mx1Adapter, Mx1PortController, NceNetworkPortController, NcePortController, NetworkDriverAdapter, NetworkDriverAdapter, NetworkDriverAdapter, NetworkDriverAdapter, NetworkDriverAdapter, NetworkDriverAdapter, NetworkDriverAdapter, 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, SRCPPortController, TamsPortController, UhlenbrockAdapter, UsbDriverAdapter, XBeeAdapter, XBeeIOStream, XNetNetworkPortController, XNetSerialPortController, XNetSimulatorAdapter, XNetSimulatorPortController, XNetStreamPortController, XnTcpAdapter, XpaPortController, ZTC640Adapter

public interface PortAdapter

Enables basic setup of a interface for a jmrix implementation.

This has no e.g. serial-specific information.

Since:
2.3.1
See Also:
SerialConfigException

Method Summary
 void configure()
          Configure all of the other jmrix widgets needed to work with this adapter
 void configureOption1(String value)
          Set the first port option.
 void configureOption2(String value)
          Set the second port option.
 void configureOption3(String value)
          Set the third port option.
 void configureOption4(String value)
          Set the fourth port option.
 void connect()
          Open the connection
 void dispose()
           
 String getCurrentPortName()
           
 boolean getDisabled()
          Return the disabled state of the adapter
 DataInputStream getInputStream()
           
 String getManufacturer()
          Return the System Manufacturers Name
 String getOption1Name()
           
 String getOption2Name()
           
 String getOption3Name()
           
 String getOption4Name()
           
 String[] getOptionChoices(String option)
           
 String getOptionDisplayName(String option)
           
 String[] getOptions()
           
 String getOptionState(String option)
           
 DataOutputStream getOutputStream()
           
 SystemConnectionMemo getSystemConnectionMemo()
           
 boolean isOptionAdvanced(String option)
           
 void recover()
           
 void setDisabled(boolean disabled)
          Sets whether the connection is disabled
 void setManufacturer(String Manufacturer)
          Set the System Manufacturers Name
 void setOptionState(String option, String value)
           
 boolean status()
          Query the status of this connection.
 

Method Detail

configure

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


status

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


connect

void connect()
             throws Exception
Open the connection

Throws:
Exception

getCurrentPortName

String getCurrentPortName()

getInputStream

DataInputStream getInputStream()

getOutputStream

DataOutputStream getOutputStream()

getOption1Name

String getOption1Name()

getOption2Name

String getOption2Name()

getOption3Name

String getOption3Name()

getOption4Name

String getOption4Name()

configureOption1

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


configureOption2

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


configureOption3

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


configureOption4

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


getOptions

String[] getOptions()

isOptionAdvanced

boolean isOptionAdvanced(String option)

getOptionDisplayName

String getOptionDisplayName(String option)

setOptionState

void setOptionState(String option,
                    String value)

getOptionState

String getOptionState(String option)

getOptionChoices

String[] getOptionChoices(String option)

getManufacturer

String getManufacturer()
Return the System Manufacturers Name


setManufacturer

void setManufacturer(String Manufacturer)
Set the System Manufacturers Name


getDisabled

boolean getDisabled()
Return the disabled state of the adapter


setDisabled

void setDisabled(boolean disabled)
Sets whether the connection is disabled


getSystemConnectionMemo

SystemConnectionMemo getSystemConnectionMemo()

dispose

void dispose()

recover

void recover()


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