public class SysFsDigitalInputDevice extends AbstractInputDevice<DigitalInputEvent> implements GpioDigitalInputDeviceInterface, PollEventListener
Constructor and Description |
---|
SysFsDigitalInputDevice(SysFsDeviceFactory deviceFactory,
Path gpioDir,
String key,
int gpio,
GpioEventTrigger trigger) |
Modifier and Type | Method and Description |
---|---|
protected void |
closeDevice() |
void |
disableListener() |
void |
enableListener() |
int |
getGpio() |
boolean |
getValue() |
void |
notify(Object ref,
long epochTime,
char value) |
void |
setDebounceTimeMillis(int debounceTime) |
removeListener, setListener, valueChanged
close, getDeviceFactory, getKey, isOpen
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
removeListener, setListener
close, getKey, isOpen
public SysFsDigitalInputDevice(SysFsDeviceFactory deviceFactory, Path gpioDir, String key, int gpio, GpioEventTrigger trigger)
public int getGpio()
getGpio
in interface GpioDeviceInterface
public boolean getValue() throws RuntimeIOException
getValue
in interface GpioDigitalDeviceInterface
RuntimeIOException
public void setDebounceTimeMillis(int debounceTime)
setDebounceTimeMillis
in interface GpioDigitalInputDeviceInterface
public void enableListener()
enableListener
in class AbstractInputDevice<DigitalInputEvent>
public void disableListener()
disableListener
in class AbstractInputDevice<DigitalInputEvent>
protected void closeDevice() throws RuntimeIOException
closeDevice
in class AbstractDevice
RuntimeIOException
public void notify(Object ref, long epochTime, char value)
notify
in interface PollEventListener
Copyright © 2016–2017 mattjlewis. All rights reserved.