Package com.pi4j.io.gpio.event
Class PinEvent
- java.lang.Object
-
- java.util.EventObject
-
- com.pi4j.io.gpio.event.PinEvent
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
PinAnalogValueChangeEvent
,PinDigitalStateChangeEvent
public class PinEvent extends EventObject
GPIO pin event.- Author:
- Robert Savage (http://www.savagehomeautomation.com)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Pin
pin
protected PinEventType
type
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description PinEvent(Object obj, Pin pin, PinEventType type)
Default event constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PinEventType
getEventType()
Pin
getPin()
Get the pin number that changed and raised this event.-
Methods inherited from class java.util.EventObject
getSource, toString
-
-
-
-
Field Detail
-
pin
protected final Pin pin
-
type
protected final PinEventType type
-
-
Constructor Detail
-
PinEvent
public PinEvent(Object obj, Pin pin, PinEventType type)
Default event constructor- Parameters:
obj
- Ignore this parameterpin
- GPIO pin number (not header pin number; not wiringPi pin number)
-
-
Method Detail
-
getPin
public Pin getPin()
Get the pin number that changed and raised this event.- Returns:
- GPIO pin number (not header pin number; not wiringPi pin number)
-
getEventType
public PinEventType getEventType()
-
-