public class GpioInterruptEvent extends EventObject
This class provides the event object for GPIO interrupt state changes.
Before using the Pi4J library, you need to ensure that the Java VM in configured with access to the following system libraries:
This library depends on the wiringPi native system library. (developed by Gordon Henderson @ http://wiringpi.com/)
source
Constructor and Description |
---|
GpioInterruptEvent(Object obj,
int pin,
boolean state)
Default event constructor
|
Modifier and Type | Method and Description |
---|---|
int |
getPin()
Get the pin number that changed and raised this event.
|
boolean |
getState()
Get the new pin state raised in this event.
|
int |
getStateValue()
Get the new pin state value raised in this event.
|
getSource, toString
public GpioInterruptEvent(Object obj, int pin, boolean state)
obj
- Ignore this parameterpin
- GPIO pin number (not header pin number; not wiringPi pin number)state
- New GPIO pin state.public int getPin()
public boolean getState()
public int getStateValue()
Copyright © 2012–2021 Pi4J. All rights reserved.