Class RemoteDeviceFactory
java.lang.Object
com.diozero.internal.provider.AbstractDeviceFactory
com.diozero.internal.provider.BaseNativeDeviceFactory
com.diozero.internal.provider.remote.devicefactory.RemoteDeviceFactory
- All Implemented Interfaces:
AnalogInputDeviceFactoryInterface,AnalogOutputDeviceFactoryInterface,DeviceFactoryInterface,GpioDeviceFactoryInterface,I2CDeviceFactoryInterface,NativeDeviceFactoryInterface,PwmOutputDeviceFactoryInterface,SpiDeviceFactoryInterface,java.io.Closeable,java.lang.AutoCloseable
public class RemoteDeviceFactory extends BaseNativeDeviceFactory
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEVICE_NAMEFields inherited from class com.diozero.internal.provider.AbstractDeviceFactory
closed, deviceStatesFields inherited from interface com.diozero.internal.provider.SpiDeviceFactoryInterface
DEFAULT_SPI_BUFFER_SIZE, SPI_PREFIX -
Constructor Summary
Constructors Constructor Description RemoteDeviceFactory() -
Method Summary
Methods inherited from class com.diozero.internal.provider.BaseNativeDeviceFactory
getBoardInfo, getBoardPinInfo, getVRef, registerDeviceFactoryMethods inherited from class com.diozero.internal.provider.AbstractDeviceFactory
createI2CKey, createPinKey, createSpiKey, deviceClosed, deviceOpened, getDevice, getDevice, isClosed, isDeviceOpenedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.diozero.internal.provider.AnalogInputDeviceFactoryInterface
provisionAnalogInputDeviceMethods inherited from interface com.diozero.internal.provider.AnalogOutputDeviceFactoryInterface
provisionAnalogOutputDeviceMethods inherited from interface com.diozero.internal.provider.DeviceFactoryInterface
createI2CKey, createPinKey, createSpiKey, deviceClosed, deviceOpened, getDevice, getDevice, isClosed, isDeviceOpenedMethods inherited from interface com.diozero.internal.provider.GpioDeviceFactoryInterface
provisionDigitalInputDevice, provisionDigitalInputOutputDevice, provisionDigitalOutputDeviceMethods inherited from interface com.diozero.internal.provider.I2CDeviceFactoryInterface
provisionI2CDeviceMethods inherited from interface com.diozero.internal.provider.PwmOutputDeviceFactoryInterface
provisionPwmOutputDeviceMethods inherited from interface com.diozero.internal.provider.SpiDeviceFactoryInterface
provisionSpiDevice
-
Field Details
-
DEVICE_NAME
public static final java.lang.String DEVICE_NAME- See Also:
- Constant Field Values
-
-
Constructor Details
-
RemoteDeviceFactory
public RemoteDeviceFactory()
-
-
Method Details
-
close
public void close()- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfaceDeviceFactoryInterface- Overrides:
closein classBaseNativeDeviceFactory
-
getName
public java.lang.String getName() -
initialiseBoardInfo
- Overrides:
initialiseBoardInfoin classBaseNativeDeviceFactory
-
getBoardPwmFrequency
public int getBoardPwmFrequency() -
setBoardPwmFrequency
public void setBoardPwmFrequency(int frequency) -
getSpiBufferSize
public int getSpiBufferSize() -
createDigitalInputDevice
public GpioDigitalInputDeviceInterface createDigitalInputDevice(java.lang.String key, PinInfo pinInfo, GpioPullUpDown pud, GpioEventTrigger trigger) -
createDigitalOutputDevice
public GpioDigitalOutputDeviceInterface createDigitalOutputDevice(java.lang.String key, PinInfo pinInfo, boolean initialValue) -
createDigitalInputOutputDevice
public GpioDigitalInputOutputDeviceInterface createDigitalInputOutputDevice(java.lang.String key, PinInfo pinInfo, DeviceMode mode) -
createPwmOutputDevice
public PwmOutputDeviceInterface createPwmOutputDevice(java.lang.String key, PinInfo pinInfo, int pwmFrequency, float initialValue) -
createAnalogInputDevice
-
createAnalogOutputDevice
-
createI2CDevice
public I2CDeviceInterface createI2CDevice(java.lang.String key, int controller, int address, int addressSize, int clockFrequency) throws RuntimeIOException- Throws:
RuntimeIOException
-
createSpiDevice
public SpiDeviceInterface createSpiDevice(java.lang.String key, int controller, int chipSelect, int frequency, SpiClockMode spiClockMode, boolean lsbFirst) throws RuntimeIOException- Throws:
RuntimeIOException
-
valueChanged
-
valueChanged
-