Package jmri.jmrix.purejavacomm
Class SerialPortEvent
- java.lang.Object
-
- java.util.EventObject
-
- jmri.jmrix.purejavacomm.SerialPortEvent
-
- All Implemented Interfaces:
java.io.Serializable
public class SerialPortEvent extends java.util.EventObject
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field 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.
-
Constructor Summary
Constructors Constructor Description SerialPortEvent(SerialPort source, int eventType, boolean oldValue, boolean newValue)
Constructs aSerialPortEvent
with the specified serial port, event type, old and new values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getEventType()
Returns the type of this event.boolean
getNewValue()
Returns the new value of the state change that caused theSerialPortEvent
to be propagated.boolean
getOldValue()
Returns the old value of the state change that caused theSerialPortEvent
to be propagated.
-
-
-
Field Detail
-
DATA_AVAILABLE
public static final int DATA_AVAILABLE
Data available at the serial port.- See Also:
- Constant Field Values
-
OUTPUT_BUFFER_EMPTY
public static final int OUTPUT_BUFFER_EMPTY
Output buffer is empty.- See Also:
- Constant Field Values
-
CTS
public static final int CTS
Clear to send.- See Also:
- Constant Field Values
-
DSR
public static final int DSR
Data set ready.- See Also:
- Constant Field Values
-
RI
public static final int RI
Ring indicator.- See Also:
- Constant Field Values
-
CD
public static final int CD
Carrier detect.- See Also:
- Constant Field Values
-
OE
public static final int OE
Overrun error.- See Also:
- Constant Field Values
-
PE
public static final int PE
Parity error.- See Also:
- Constant Field Values
-
FE
public static final int FE
Framing error.- See Also:
- Constant Field Values
-
BI
public static final int BI
Break interrupt.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SerialPortEvent
public SerialPortEvent(SerialPort source, int eventType, boolean oldValue, boolean newValue)
Constructs aSerialPortEvent
with the specified serial port, event type, old and new values. Application programs should not directly createSerialPortEvent
objects.- Parameters:
source
- the sourceeventType
- the event typeoldValue
- the old valuenewValue
- the new value
-
-
Method Detail
-
getEventType
public int getEventType()
Returns the type of this event.- Returns:
- The type of this event.
-
getNewValue
public boolean getNewValue()
Returns the new value of the state change that caused theSerialPortEvent
to be propagated.- Returns:
- The new value of the state change.
-
getOldValue
public boolean getOldValue()
Returns the old value of the state change that caused theSerialPortEvent
to be propagated.- Returns:
- The old value of the state change.
-
-