Class RemoteAnalogInputDevice
- java.lang.Object
-
- com.diozero.internal.spi.AbstractDevice
-
- com.diozero.internal.spi.AbstractInputDevice<AnalogInputEvent>
-
- com.diozero.internal.provider.remote.devicefactory.RemoteAnalogInputDevice
-
- All Implemented Interfaces:
DeviceInterface,AnalogInputDeviceInterface,InternalDeviceInterface,AutoCloseable
public class RemoteAnalogInputDevice extends AbstractInputDevice<AnalogInputEvent> implements AnalogInputDeviceInterface
-
-
Constructor Summary
Constructors Constructor Description RemoteAnalogInputDevice(RemoteDeviceFactory deviceFactory, String key, PinInfo pinInfo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcloseDevice()booleangeneratesEvents()intgetAdcNumber()floatgetValue()-
Methods inherited from class com.diozero.internal.spi.AbstractInputDevice
accept, disableListener, enableListener, removeListener, setListener
-
Methods inherited from class com.diozero.internal.spi.AbstractDevice
close, getDeviceFactory, getKey, isOpen
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.diozero.internal.spi.AnalogInputDeviceInterface
getMode, removeListener, setListener
-
Methods inherited from interface com.diozero.api.DeviceInterface
close
-
Methods inherited from interface com.diozero.internal.spi.InternalDeviceInterface
getKey, isOpen
-
-
-
-
Constructor Detail
-
RemoteAnalogInputDevice
public RemoteAnalogInputDevice(RemoteDeviceFactory deviceFactory, String key, PinInfo pinInfo)
-
-
Method Detail
-
generatesEvents
public boolean generatesEvents()
- Specified by:
generatesEventsin interfaceAnalogInputDeviceInterface- Overrides:
generatesEventsin classAbstractInputDevice<AnalogInputEvent>
-
getValue
public float getValue() throws RuntimeIOException- Specified by:
getValuein interfaceAnalogInputDeviceInterface- Throws:
RuntimeIOException
-
getAdcNumber
public int getAdcNumber()
- Specified by:
getAdcNumberin interfaceAnalogInputDeviceInterface
-
closeDevice
protected void closeDevice() throws RuntimeIOException- Specified by:
closeDevicein classAbstractDevice- Throws:
RuntimeIOException
-
-