Package com.diozero.api
Class WaitableDigitalInputDevice
java.lang.Object
com.diozero.api.GpioDevice
com.diozero.api.GpioInputDevice<DigitalInputEvent>
com.diozero.api.AbstractDigitalInputDevice
com.diozero.api.DigitalInputDevice
com.diozero.api.WaitableDigitalInputDevice
- All Implemented Interfaces:
DeviceInterface
,DigitalInputDeviceInterface
,DeviceEventConsumer<DigitalInputEvent>
,AutoCloseable
,Consumer<DigitalInputEvent>
@Deprecated public class WaitableDigitalInputDevice extends DigitalInputDevice
Deprecated.
Functionality has moved up to AbstractDigitalInputDevice
Represents a digital input device with distinct waitable states (active /
inactive).
-
Nested Class Summary
Nested classes/interfaces inherited from class com.diozero.api.DigitalInputDevice
DigitalInputDevice.Builder
-
Field Summary
Fields inherited from class com.diozero.api.AbstractDigitalInputDevice
activeHigh
Fields inherited from class com.diozero.api.GpioDevice
pinInfo
-
Constructor Summary
Constructors Constructor Description WaitableDigitalInputDevice(int gpio)
Deprecated.WaitableDigitalInputDevice(int gpio, GpioPullUpDown pud, GpioEventTrigger trigger)
Deprecated.WaitableDigitalInputDevice(GpioDeviceFactoryInterface deviceFactory, int gpio, GpioPullUpDown pud, GpioEventTrigger trigger)
Deprecated. -
Method Summary
Modifier and Type Method Description protected void
disableDeviceListener()
Deprecated.Methods inherited from class com.diozero.api.DigitalInputDevice
builder, builder, close, getPullUpDown, getTrigger, getValue, isActive, removeListener, setListener
Methods inherited from class com.diozero.api.AbstractDigitalInputDevice
accept, enableDeviceListener, isActiveHigh, waitForActive, waitForActive, waitForInactive, waitForInactive, waitForValue, whenActivated, whenDeactivated
Methods inherited from class com.diozero.api.GpioInputDevice
addListener, removeAllListeners, removeListener
Methods inherited from class com.diozero.api.GpioDevice
getGpio
-
Constructor Details
-
WaitableDigitalInputDevice
Deprecated.- Parameters:
gpio
- GPIO to which the device is connected.- Throws:
RuntimeIOException
- If an I/O error occurred.
-
WaitableDigitalInputDevice
public WaitableDigitalInputDevice(int gpio, GpioPullUpDown pud, GpioEventTrigger trigger) throws RuntimeIOExceptionDeprecated.- Parameters:
gpio
- GPIO to which the device is connected.pud
- Pull up/down configuration, values: NONE, PULL_UP, PULL_DOWN.trigger
- Event trigger configuration, values: NONE, RISING, FALLING, BOTH.- Throws:
RuntimeIOException
- If an I/O error occurred.
-
WaitableDigitalInputDevice
public WaitableDigitalInputDevice(GpioDeviceFactoryInterface deviceFactory, int gpio, GpioPullUpDown pud, GpioEventTrigger trigger) throws RuntimeIOExceptionDeprecated.- Parameters:
deviceFactory
- Device factory to use to construct the device.gpio
- GPIO to which the device is connected.pud
- Pull up/down configuration, values: NONE, PULL_UP, PULL_DOWN.trigger
- Event trigger configuration, values: NONE, RISING, FALLING, BOTH.- Throws:
RuntimeIOException
- If an I/O error occurred.
-
-
Method Details
-
disableDeviceListener
protected void disableDeviceListener()Deprecated.- Overrides:
disableDeviceListener
in classAbstractDigitalInputDevice
-