|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SerialPortInterface
An RS-232 serial communications port. SerialPort describes the low-level interface to a serial communications port made available by the underlying system. SerialPort defines the minimum required functionality for serial communications ports.
CommPort
,
CommPortIdentifier
Field Summary | |
---|---|
static int |
DATABITS_5
5 data bit format. |
static int |
DATABITS_6
6 data bit format. |
static int |
DATABITS_7
7 data bit format. |
static int |
DATABITS_8
8 data bit format. |
static int |
FLOWCONTROL_NONE
Flow control off. |
static int |
FLOWCONTROL_RTSCTS_IN
RTS/CTS flow control on input. |
static int |
FLOWCONTROL_RTSCTS_OUT
RTS/CTS flow control on output. |
static int |
FLOWCONTROL_XONXOFF_IN
XON/XOFF flow control on input. |
static int |
FLOWCONTROL_XONXOFF_OUT
XON/XOFF flow control on output. |
static int |
PARITY_EVEN
EVEN parity scheme. |
static int |
PARITY_MARK
|
static int |
PARITY_NONE
No parity bit. |
static int |
PARITY_ODD
ODD parity scheme. |
static int |
PARITY_SPACE
|
static int |
STOPBITS_1
Number of STOP bits - 1. |
static int |
STOPBITS_1_5
Number of STOP bits - 1-1/2. |
static int |
STOPBITS_2
Number of STOP bits - 2. |
Method Summary | |
---|---|
void |
addEventListener(SerialPortEventListener lsnr)
|
int |
getBaudBase()
|
int |
getBaudRate()
|
boolean |
getCallOutHangup()
|
int |
getDataBits()
|
int |
getDivisor()
|
byte |
getEndOfInputChar()
|
int |
getFlowControlMode()
|
boolean |
getLowLatency()
|
int |
getParity()
|
byte |
getParityErrorChar()
|
int |
getStopBits()
|
java.lang.String |
getUARTType()
|
boolean |
isCD()
|
boolean |
isCTS()
|
boolean |
isDSR()
|
boolean |
isDTR()
|
boolean |
isRI()
|
boolean |
isRTS()
|
void |
notifyOnBreakInterrupt(boolean enable)
|
void |
notifyOnCarrierDetect(boolean enable)
|
void |
notifyOnCTS(boolean enable)
|
void |
notifyOnDataAvailable(boolean enable)
|
void |
notifyOnDSR(boolean enable)
|
void |
notifyOnFramingError(boolean enable)
|
void |
notifyOnOutputEmpty(boolean enable)
|
void |
notifyOnOverrunError(boolean enable)
|
void |
notifyOnParityError(boolean enable)
|
void |
notifyOnRingIndicator(boolean enable)
|
void |
removeEventListener()
|
void |
sendBreak(int millis)
Sends a break of the specified duration. |
boolean |
setBaudBase(int BaudBase)
|
boolean |
setCallOutHangup(boolean NoHup)
|
boolean |
setDivisor(int Divisor)
|
void |
setDTR(boolean dtr)
Sets or clears the DTR bit in the UART. |
boolean |
setEndOfInputChar(byte b)
|
void |
setFlowControlMode(int flowcontrol)
Sets the flow control mode. |
boolean |
setLowLatency()
|
boolean |
setParityErrorChar(byte b)
|
void |
setRcvFifoTrigger(int trigger)
Deprecated. |
void |
setRTS(boolean rts)
Sets or clears the RTS bit in the UART. |
void |
setSerialPortParams(int baudRate,
int dataBits,
int stopBits,
int parity)
Sets the serial port parameters. |
boolean |
setUARTType(java.lang.String type,
boolean test)
|
Field Detail |
---|
static final int DATABITS_5
static final int DATABITS_6
static final int DATABITS_7
static final int DATABITS_8
static final int PARITY_NONE
static final int PARITY_ODD
static final int PARITY_EVEN
static final int PARITY_MARK
static final int PARITY_SPACE
static final int STOPBITS_1
static final int STOPBITS_2
static final int STOPBITS_1_5
static final int FLOWCONTROL_NONE
static final int FLOWCONTROL_RTSCTS_IN
static final int FLOWCONTROL_RTSCTS_OUT
static final int FLOWCONTROL_XONXOFF_IN
static final int FLOWCONTROL_XONXOFF_OUT
Method Detail |
---|
boolean isCTS()
setDTR(boolean)
boolean isDSR()
boolean isCD()
boolean isRI()
boolean isRTS()
setRTS(boolean)
void addEventListener(SerialPortEventListener lsnr) throws java.util.TooManyListenersException
java.util.TooManyListenersException
void removeEventListener()
void notifyOnDataAvailable(boolean enable)
void notifyOnOutputEmpty(boolean enable)
void notifyOnCTS(boolean enable)
void notifyOnDSR(boolean enable)
void notifyOnRingIndicator(boolean enable)
void notifyOnCarrierDetect(boolean enable)
void notifyOnOverrunError(boolean enable)
void notifyOnParityError(boolean enable)
void notifyOnFramingError(boolean enable)
void notifyOnBreakInterrupt(boolean enable)
byte getParityErrorChar() throws UnsupportedCommOperationException
UnsupportedCommOperationException
boolean setParityErrorChar(byte b) throws UnsupportedCommOperationException
UnsupportedCommOperationException
byte getEndOfInputChar() throws UnsupportedCommOperationException
UnsupportedCommOperationException
boolean setEndOfInputChar(byte b) throws UnsupportedCommOperationException
UnsupportedCommOperationException
boolean setUARTType(java.lang.String type, boolean test) throws UnsupportedCommOperationException
UnsupportedCommOperationException
java.lang.String getUARTType() throws UnsupportedCommOperationException
UnsupportedCommOperationException
boolean setBaudBase(int BaudBase) throws UnsupportedCommOperationException
UnsupportedCommOperationException
int getBaudBase() throws UnsupportedCommOperationException
UnsupportedCommOperationException
boolean setDivisor(int Divisor) throws UnsupportedCommOperationException
UnsupportedCommOperationException
int getDivisor() throws UnsupportedCommOperationException
UnsupportedCommOperationException
boolean setLowLatency() throws UnsupportedCommOperationException
UnsupportedCommOperationException
boolean getLowLatency() throws UnsupportedCommOperationException
UnsupportedCommOperationException
boolean setCallOutHangup(boolean NoHup) throws UnsupportedCommOperationException
UnsupportedCommOperationException
boolean getCallOutHangup() throws UnsupportedCommOperationException
UnsupportedCommOperationException
int getBaudRate()
int getDataBits()
int getStopBits()
int getParity()
void sendBreak(int millis)
millis
- the duration in millisecondsvoid setFlowControlMode(int flowcontrol)
flowcontrol
- a bitmask combination of FLOWCONTROL_NONE,
FLOWCONTROL_RTSCTS_IN, FLOWCONTROL_RTSCTS_OUT,
FLOWCONTROL_XONXOFF_IN, and/or FLOWCONTROL_XONXOFF_OUT.int getFlowControlMode()
void setRcvFifoTrigger(int trigger)
trigger
- the trigger levelvoid setSerialPortParams(int baudRate, int dataBits, int stopBits, int parity) throws UnsupportedCommOperationException
baudRate
- the baud ratedataBits
- the number of data bits: DATABITS_5,
DATABITS_6, DATABITS_7, or DATABITS_8stopBits
- the number of stop bits: STOPBITS_1,
STOPBITS_2, or STOPBITS_1_5parity
- the parity schema: PARITY_NONE, PARITY_ODD,
PARITY_EVEN, PARITY_MARK or PARITY_SPACE
UnsupportedCommOperationException
void setDTR(boolean dtr)
dtr
- the Data Terminal Ready bit valueisDTR()
boolean isDTR()
setDTR(boolean)
void setRTS(boolean rts)
rts
- the Request To Send bit value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |