Package com.pi4j.jni
Class SerialInterruptEvent
- java.lang.Object
-
- java.util.EventObject
-
- com.pi4j.jni.SerialInterruptEvent
-
- All Implemented Interfaces:
Serializable
public class SerialInterruptEvent extends EventObject
This class provides the event object for Serial interrupt data receive event.
- Author:
- Robert Savage (http://www.savagehomeautomation.com)
- See Also:
- https://pi4j.com/, Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description SerialInterruptEvent(Object obj, int fileDescriptor, byte[] data)
Default event constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getData()
Get the data bytes received in this event.int
getFileDescriptor()
Get the serial port file descriptor/handleint
getLength()
Get the length of data bytes received in this event.-
Methods inherited from class java.util.EventObject
getSource, toString
-
-
-
-
Constructor Detail
-
SerialInterruptEvent
public SerialInterruptEvent(Object obj, int fileDescriptor, byte[] data)
Default event constructor
- Parameters:
obj
- Ignore this parameterfileDescriptor
- The serial file handle/descriptor in usedata
- 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
-
-