|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrix.AbstractPortController
jmri.jmrix.lenz.XNetPortController
jmri.jmrix.lenz.xntcp.XnTcpAdapter
public class XnTcpAdapter
Provide access to XPressNet via a XnTcp interface attached on the Ethernet port.
| Nested Class Summary | |
|---|---|
class |
XnTcpAdapter.OutputTcpStream
|
| Field Summary | |
|---|---|
protected String |
outName
|
protected XnTcpAdapter.OutputTcpStream |
outTcpStream
|
| Fields inherited from class jmri.jmrix.lenz.XNetPortController |
|---|
validOption2 |
| Fields inherited from class jmri.jmrix.AbstractPortController |
|---|
mBaudRate, mOpt1, mOpt2, mPort |
| Constructor Summary | |
|---|---|
XnTcpAdapter()
|
|
| Method Summary | |
|---|---|
void |
configure()
set up all of the other objects to operate with a XnTcp interface |
String |
getCurrentBaudRate()
|
DataInputStream |
getInputStream()
|
DataOutputStream |
getOutputStream()
|
Vector<String> |
getPortNames()
Provide a vector of valid port names, each a String. |
static XnTcpAdapter |
instance()
|
boolean |
okToSend()
Can the port accept additional characters? |
String |
openPort(String portName,
String appName)
Open a specified port. |
String |
option1Name()
XnTcp comunication options (used only with manual configuration) Option 1 is used to specify the IP address |
String |
option2Name()
Option 2 is used to specify the port number |
void |
setOutputBufferEmpty(boolean s)
We need a way to say if the output buffer is empty or not |
boolean |
status()
Check that this object is ready to operate. |
String[] |
validBaudRates()
Local method to do specific configuration |
protected void |
XnTcpError()
If an error occurs, either in the input or output thread, the display of a message is queued in the SWING thread. |
protected void |
XnTcpSetPendingPackets(int s)
TCP/IP stack and the XnTcp interface provide enough buffering to avoid overrun. |
| Methods inherited from class jmri.jmrix.lenz.XNetPortController |
|---|
validOption2 |
| Methods inherited from class jmri.jmrix.AbstractPortController |
|---|
configureBaudRate, configureOption1, configureOption2, currentBaudNumber, getCurrentOption1Setting, getCurrentOption2Setting, getCurrentPortName, handlePortBusy, handlePortNotFound, 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 |
|---|
configureBaudRate, configureOption1, configureOption2, getCurrentOption1Setting, getCurrentOption2Setting, getCurrentPortName, handlePortBusy, setPort, validOption1, validOption2 |
| Field Detail |
|---|
protected XnTcpAdapter.OutputTcpStream outTcpStream
protected String outName
| Constructor Detail |
|---|
public XnTcpAdapter()
| Method Detail |
|---|
public Vector<String> getPortNames()
SerialPortAdapter
getPortNames in interface SerialPortAdaptergetPortNames in class AbstractPortController
public String openPort(String portName,
String appName)
SerialPortAdapter
openPort in interface SerialPortAdapterpublic void setOutputBufferEmpty(boolean s)
XNetPortController
setOutputBufferEmpty in class XNetPortControllerprotected void XnTcpSetPendingPackets(int s)
protected void XnTcpError()
public boolean okToSend()
okToSend in class XNetPortControllerpublic void configure()
configure in interface PortAdapterconfigure in interface SerialPortAdapterpublic DataInputStream getInputStream()
getInputStream in interface PortAdaptergetInputStream in class XNetPortControllerpublic DataOutputStream getOutputStream()
getOutputStream in interface PortAdaptergetOutputStream in class XNetPortControllerpublic boolean status()
XNetPortController
status in interface PortAdapterstatus in interface SerialPortAdapterstatus in class XNetPortControllerpublic String[] validBaudRates()
validBaudRates in interface SerialPortAdapterpublic String getCurrentBaudRate()
getCurrentBaudRate in interface SerialPortAdaptergetCurrentBaudRate in class AbstractPortControllerpublic String option1Name()
option1Name in interface PortAdapteroption1Name in interface SerialPortAdapteroption1Name in class AbstractPortControllerpublic String option2Name()
option2Name in interface PortAdapteroption2Name in interface SerialPortAdapteroption2Name in class XNetPortControllerpublic static XnTcpAdapter instance()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||