|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrix.AbstractPortController
jmri.jmrix.nce.NcePortController
jmri.jmrix.nce.networkdriver.NetworkDriverAdapter
public class NetworkDriverAdapter
Implements SerialPortAdapter for the NCE system network connection.
This connects an NCE command station via a telnet connection. Normally controlled by the NetworkDriverFrame class.
| Field Summary | |
|---|---|
protected String |
mOpt2
|
| Fields inherited from class jmri.jmrix.AbstractPortController |
|---|
mBaudRate, mOpt1, mPort |
| Constructor Summary | |
|---|---|
NetworkDriverAdapter()
|
|
| Method Summary | |
|---|---|
void |
configure()
set up all of the other objects to operate with an NCE command station connected to this port |
void |
configureOption2(String value)
Set the binary vs ASCII command set option. |
void |
connect(String host,
int port)
|
String |
getCurrentOption2Setting()
* Get current option 2 value |
DataInputStream |
getInputStream()
|
DataOutputStream |
getOutputStream()
|
Vector<String> |
getPortNames()
Provide a vector of valid port names, each a String. |
static NetworkDriverAdapter |
instance()
|
String |
openPort(String portName,
String appName)
Open a specified port. |
String |
option2Name()
Get a String that says what Option 2 represents May be an empty string, but will not be null |
void |
setHostName(String hostName)
|
boolean |
status()
Query the status of this connection. |
String[] |
validBaudRates()
Get an array of valid baud rates; used to display valid options. |
String[] |
validOption2()
Option 2 is binary vs ASCII command set. |
| Methods inherited from class jmri.jmrix.AbstractPortController |
|---|
configureBaudRate, configureOption1, currentBaudNumber, getCurrentBaudRate, getCurrentOption1Setting, getCurrentPortName, 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 |
| Field Detail |
|---|
protected String mOpt2
| Constructor Detail |
|---|
public NetworkDriverAdapter()
| Method Detail |
|---|
public void configure()
public DataInputStream getInputStream()
getInputStream in interface PortAdaptergetInputStream in class AbstractPortController
public void connect(String host,
int port)
public DataOutputStream getOutputStream()
getOutputStream in interface PortAdaptergetOutputStream in class AbstractPortControllerpublic boolean status()
PortAdapter
status in interface PortAdapterstatus in interface SerialPortAdapterstatus in class AbstractPortControllerpublic String[] validOption2()
validOption2 in interface PortAdaptervalidOption2 in interface SerialPortAdaptervalidOption2 in class AbstractPortControllerpublic String option2Name()
option2Name in interface PortAdapteroption2Name in interface SerialPortAdapteroption2Name in class AbstractPortControllerpublic void configureOption2(String value)
configureOption2 in interface PortAdapterconfigureOption2 in interface SerialPortAdapterconfigureOption2 in class AbstractPortControllerpublic String getCurrentOption2Setting()
PortAdapter
getCurrentOption2Setting in interface PortAdaptergetCurrentOption2Setting in interface SerialPortAdaptergetCurrentOption2Setting in class AbstractPortControllerpublic static NetworkDriverAdapter instance()
public void setHostName(String hostName)
public Vector<String> getPortNames()
SerialPortAdapter
getPortNames in interface SerialPortAdaptergetPortNames in class AbstractPortController
public String openPort(String portName,
String appName)
SerialPortAdapter
public String[] validBaudRates()
SerialPortAdapter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||