public class SerialPortEvent
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
BREAK |
static int |
CTS |
static int |
DSR |
static int |
ERR |
static int |
RING |
static int |
RLSD |
static int |
RXCHAR |
static int |
RXFLAG |
static int |
TXEMPTY |
Constructor and Description |
---|
SerialPortEvent(java.lang.String portName,
int eventType,
int eventValue) |
Modifier and Type | Method and Description |
---|---|
int |
getEventType()
Getting event type
|
int |
getEventValue()
Getting event value
Event values depending on their types: RXCHAR - bytes count in input buffer RXFLAG - bytes count in input buffer (Not supported in Linux) TXEMPTY - bytes count in output buffer CTS - state of CTS line (0 - OFF, 1 - ON) DSR - state of DSR line (0 - OFF, 1 - ON) RLSD - state of RLSD line (0 - OFF, 1 - ON) BREAK - 0 RING - state of RING line (0 - OFF, 1 - ON) ERR - mask of errors |
java.lang.String |
getPortName()
Getting port name which sent the event
|
boolean |
isBREAK()
Method returns true if event of type "BREAK" is received and otherwise false
|
boolean |
isCTS()
Method returns true if event of type "CTS" is received and otherwise false
|
boolean |
isDSR()
Method returns true if event of type "DSR" is received and otherwise false
|
boolean |
isERR()
Method returns true if event of type "ERR" is received and otherwise false
|
boolean |
isRING()
Method returns true if event of type "RING" is received and otherwise false
|
boolean |
isRLSD()
Method returns true if event of type "RLSD" is received and otherwise false
|
boolean |
isRXCHAR()
Method returns true if event of type "RXCHAR" is received and otherwise false
|
boolean |
isRXFLAG()
Method returns true if event of type "RXFLAG" is received and otherwise false
|
boolean |
isTXEMPTY()
Method returns true if event of type "TXEMPTY" is received and otherwise false
|
public static final int RXCHAR
public static final int RXFLAG
public static final int TXEMPTY
public static final int CTS
public static final int DSR
public static final int RLSD
public static final int BREAK
public static final int ERR
public static final int RING
public SerialPortEvent(java.lang.String portName, int eventType, int eventValue)
public java.lang.String getPortName()
public int getEventType()
public int getEventValue()
public boolean isRXCHAR()
public boolean isRXFLAG()
public boolean isTXEMPTY()
public boolean isCTS()
public boolean isDSR()
public boolean isRLSD()
public boolean isBREAK()
public boolean isERR()
public boolean isRING()