Module diozero.provider.remote
Class GrpcClientDigitalInputDevice
java.lang.Object
com.diozero.internal.spi.AbstractDevice
com.diozero.internal.spi.AbstractInputDevice<DigitalInputEvent>
com.diozero.internal.provider.remote.grpc.GrpcClientDigitalInputDevice
- All Implemented Interfaces:
DeviceInterface,GpioDeviceInterface,GpioDigitalDeviceInterface,GpioDigitalInputDeviceInterface,InternalDeviceInterface,AutoCloseable
public class GrpcClientDigitalInputDevice
extends AbstractInputDevice<DigitalInputEvent>
implements GpioDigitalInputDeviceInterface
-
Constructor Summary
ConstructorsConstructorDescriptionGrpcClientDigitalInputDevice(GrpcClientDeviceFactory deviceFactory, String key, PinInfo pinInfo, GpioPullUpDown pud, GpioEventTrigger trigger) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidprotected voidintgetGpio()booleangetValue()voidsetDebounceTimeMillis(int debounceTime) Methods inherited from class com.diozero.internal.spi.AbstractInputDevice
accept, generatesEvents, isListenerEnabled, removeListener, setListenerMethods inherited from class com.diozero.internal.spi.AbstractDevice
close, getDeviceFactory, getKey, isChild, isOpen, setChildMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.diozero.api.DeviceInterface
closeMethods inherited from interface com.diozero.internal.spi.GpioDigitalInputDeviceInterface
getMode, removeListener, setListenerMethods inherited from interface com.diozero.internal.spi.InternalDeviceInterface
getKey, isChild, isOpen, setChild
-
Constructor Details
-
GrpcClientDigitalInputDevice
public GrpcClientDigitalInputDevice(GrpcClientDeviceFactory deviceFactory, String key, PinInfo pinInfo, GpioPullUpDown pud, GpioEventTrigger trigger)
-
-
Method Details
-
getValue
- Specified by:
getValuein interfaceGpioDigitalDeviceInterface- Throws:
RuntimeIOException
-
getGpio
public int getGpio()- Specified by:
getGpioin interfaceGpioDeviceInterface
-
setDebounceTimeMillis
public void setDebounceTimeMillis(int debounceTime) - Specified by:
setDebounceTimeMillisin interfaceGpioDigitalInputDeviceInterface
-
closeDevice
- Overrides:
closeDevicein classAbstractInputDevice<DigitalInputEvent>- Throws:
RuntimeIOException
-
enableListener
protected void enableListener()- Overrides:
enableListenerin classAbstractInputDevice<DigitalInputEvent>
-
disableListener
protected void disableListener()- Overrides:
disableListenerin classAbstractInputDevice<DigitalInputEvent>
-