public class SerialPortEvent extends EventObject
| Modifier and Type | Field and Description |
|---|---|
static int |
BI
Break interrupt.
|
static int |
CD
Carrier detect.
|
static int |
CTS
Clear to send.
|
static int |
DATA_AVAILABLE
Data available at the serial port.
|
static int |
DSR
Data set ready.
|
static int |
FE
Framing error.
|
static int |
OE
Overrun error.
|
static int |
OUTPUT_BUFFER_EMPTY
Output buffer is empty.
|
static int |
PE
Parity error.
|
static int |
RI
Ring indicator.
|
source| Constructor and Description |
|---|
SerialPortEvent(SerialPort source,
int eventType,
boolean oldValue,
boolean newValue)
Constructs a
SerialPortEvent with the specified serial port,
event type, old and new values. |
| Modifier and Type | Method and Description |
|---|---|
int |
getEventType()
Returns the type of this event.
|
boolean |
getNewValue()
Returns the new value of the state change that caused the
SerialPortEvent to be propagated. |
boolean |
getOldValue()
Returns the old value of the state change that caused the
SerialPortEvent to be propagated. |
getSource, toStringpublic static final int DATA_AVAILABLE
public static final int OUTPUT_BUFFER_EMPTY
public static final int CTS
public static final int DSR
public static final int RI
public static final int CD
public static final int OE
public static final int PE
public static final int FE
public static final int BI
public SerialPortEvent(SerialPort source, int eventType, boolean oldValue, boolean newValue)
SerialPortEvent with the specified serial port,
event type, old and new values. Application programs should not directly
create SerialPortEvent objects.source - the sourceeventType - the event typeoldValue - the old valuenewValue - the new valuepublic int getEventType()
public boolean getNewValue()
SerialPortEvent to be propagated.public boolean getOldValue()
SerialPortEvent to be propagated.Copyright © 2017. All rights reserved.