Class SerialPortEvent

java.lang.Object
java.util.EventObject
jmri.jmrix.purejavacomm.SerialPortEvent
All Implemented Interfaces:
Serializable

public class SerialPortEvent extends EventObject
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Break interrupt.
    static final int
    Carrier detect.
    static final int
    Clear to send.
    static final int
    Data available at the serial port.
    static final int
    Data set ready.
    static final int
    Framing error.
    static final int
    Overrun error.
    static final int
    Output buffer is empty.
    static final int
    Parity error.
    static final int
    Ring indicator.

    Fields inherited from class java.util.EventObject

    source
  • Constructor Summary

    Constructors
    Constructor
    Description
    SerialPortEvent(SerialPort source, int eventType, boolean oldValue, boolean newValue)
    Constructs a SerialPortEvent with the specified serial port, event type, old and new values.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the type of this event.
    boolean
    Returns the new value of the state change that caused the SerialPortEvent to be propagated.
    boolean
    Returns the old value of the state change that caused the SerialPortEvent to be propagated.

    Methods inherited from class java.util.EventObject

    getSource, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • SerialPortEvent

      public SerialPortEvent(SerialPort source, int eventType, boolean oldValue, boolean newValue)
      Constructs a SerialPortEvent with the specified serial port, event type, old and new values. Application programs should not directly create SerialPortEvent objects.
      Parameters:
      source - the source
      eventType - the event type
      oldValue - the old value
      newValue - the new value
  • Method Details

    • 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 the SerialPortEvent 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 the SerialPortEvent to be propagated.
      Returns:
      The old value of the state change.