Package jmri.jmrix.purejavacomm
Class SerialPortEvent
java.lang.Object
java.util.EventObject
jmri.jmrix.purejavacomm.SerialPortEvent
- All Implemented Interfaces:
Serializable
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intBreak interrupt.static final intCarrier detect.static final intClear to send.static final intData available at the serial port.static final intData set ready.static final intFraming error.static final intOverrun error.static final intOutput buffer is empty.static final intParity error.static final intRing indicator.Fields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionSerialPortEvent(SerialPort source, int eventType, boolean oldValue, boolean newValue) Constructs aSerialPortEventwith the specified serial port, event type, old and new values. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the type of this event.booleanReturns the new value of the state change that caused theSerialPortEventto be propagated.booleanReturns the old value of the state change that caused theSerialPortEventto be propagated.Methods inherited from class java.util.EventObject
getSource, toString
-
Field Details
-
DATA_AVAILABLE
Data available at the serial port.- See Also:
-
OUTPUT_BUFFER_EMPTY
Output buffer is empty.- See Also:
-
CTS
Clear to send.- See Also:
-
DSR
Data set ready.- See Also:
-
RI
Ring indicator.- See Also:
-
CD
Carrier detect.- See Also:
-
OE
Overrun error.- See Also:
-
PE
Parity error.- See Also:
-
FE
Framing error.- See Also:
-
BI
Break interrupt.- See Also:
-
-
Constructor Details
-
SerialPortEvent
Constructs aSerialPortEventwith the specified serial port, event type, old and new values. Application programs should not directly createSerialPortEventobjects.- Parameters:
source- the sourceeventType- the event typeoldValue- the old valuenewValue- the new value
-
-
Method Details
-
getEventType
Returns the type of this event.- Returns:
- The type of this event.
-
getNewValue
Returns the new value of the state change that caused theSerialPortEventto be propagated.- Returns:
- The new value of the state change.
-
getOldValue
Returns the old value of the state change that caused theSerialPortEventto be propagated.- Returns:
- The old value of the state change.
-