Package jmri.jmrix
Class AbstractSerialPortController.SerialPort
- java.lang.Object
-
- jmri.jmrix.AbstractSerialPortController.SerialPort
-
- Enclosing class:
- AbstractSerialPortController
public static class AbstractSerialPortController.SerialPort extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
LISTENING_EVENT_DATA_AVAILABLE
static int
NO_PARITY
static int
ONE_STOP_BIT
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDataListener(AbstractSerialPortController.SerialPortDataListener listener)
void
clearBreak()
void
clearDTR()
void
clearRTS()
void
closePort()
int
getBaudRate()
boolean
getCTS()
boolean
getDCD()
java.lang.String
getDescriptivePortName()
boolean
getDSR()
boolean
getDTR()
java.io.InputStream
getInputStream()
java.io.OutputStream
getOutputStream()
boolean
getRI()
boolean
getRTS()
void
setBaudRate(int baudrate)
void
setBreak()
void
setDTR()
void
setFlowControl(AbstractSerialPortController.FlowControl flow)
Configure the flow control settings.void
setNumDataBits(int bits)
void
setNumStopBits(int bits)
void
setParity(AbstractSerialPortController.Parity parity)
void
setRTS()
java.lang.String
toString()
-
-
-
Field Detail
-
LISTENING_EVENT_DATA_AVAILABLE
public static final int LISTENING_EVENT_DATA_AVAILABLE
- See Also:
- Constant Field Values
-
ONE_STOP_BIT
public static final int ONE_STOP_BIT
- See Also:
- Constant Field Values
-
NO_PARITY
public static final int NO_PARITY
- See Also:
- Constant Field Values
-
-
Method Detail
-
addDataListener
public void addDataListener(AbstractSerialPortController.SerialPortDataListener listener)
-
getInputStream
public java.io.InputStream getInputStream()
-
getOutputStream
public java.io.OutputStream getOutputStream()
-
setRTS
public void setRTS()
-
clearRTS
public void clearRTS()
-
setBaudRate
public void setBaudRate(int baudrate)
-
getBaudRate
public int getBaudRate()
-
setNumDataBits
public void setNumDataBits(int bits)
-
setNumStopBits
public void setNumStopBits(int bits)
-
setParity
public void setParity(AbstractSerialPortController.Parity parity)
-
setDTR
public void setDTR()
-
clearDTR
public void clearDTR()
-
getDTR
public boolean getDTR()
-
getRTS
public boolean getRTS()
-
getDSR
public boolean getDSR()
-
getCTS
public boolean getCTS()
-
getDCD
public boolean getDCD()
-
getRI
public boolean getRI()
-
setFlowControl
public final void setFlowControl(AbstractSerialPortController.FlowControl flow)
Configure the flow control settings. Keep this in synch with the FlowControl enum.- Parameters:
flow
- set which kind of flow control to use
-
setBreak
public void setBreak()
-
clearBreak
public void clearBreak()
-
closePort
public void closePort()
-
getDescriptivePortName
public java.lang.String getDescriptivePortName()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-