Package com.pi4j.jni

Class SerialInterruptEvent

    • Constructor Detail

      • SerialInterruptEvent

        public SerialInterruptEvent​(Object obj,
                                    int fileDescriptor,
                                    byte[] data)

        Default event constructor

        Parameters:
        obj - Ignore this parameter
        fileDescriptor - The serial file handle/descriptor in use
        data - data bytes received in this event from the serial receive buffer
    • Method Detail

      • getFileDescriptor

        public int getFileDescriptor()
        Get the serial port file descriptor/handle
        Returns:
        serial port file descriptor/handle
      • getLength

        public int getLength()
        Get the length of data bytes received in this event.
        Returns:
        length of data bytes received in this event
      • getData

        public byte[] getData()
        Get the data bytes received in this event.
        Returns:
        data bytes received in this event