Class SerialPortEvent

    • 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.
      • 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

      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 the SerialPortEvent to be propagated.
      boolean getOldValue()
      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
    • Constructor Detail

      • 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 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 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.