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,SerialDeviceFactoryInterface,SpiDeviceFactoryInterface,Closeable,AutoCloseable
public class RemoteDeviceFactory extends BaseNativeDeviceFactory
-
Field Summary
Fields Modifier and Type Field Description static StringDEVICE_NAMEFields inherited from class com.diozero.internal.provider.AbstractDeviceFactory
closed, deviceStatesFields inherited from interface com.diozero.internal.provider.I2CDeviceFactoryInterface
I2C_PREFIXFields inherited from interface com.diozero.internal.provider.SerialDeviceFactoryInterface
SERIAL_PREFIXFields 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
close, getBoardInfo, getBoardPinInfo, getVRef, registerDeviceFactoryMethods inherited from class com.diozero.internal.provider.AbstractDeviceFactory
createI2CKey, createPinKey, createSerialKey, 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, createSerialKey, 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.SerialDeviceFactoryInterface
provisionSerialDeviceMethods inherited from interface com.diozero.internal.provider.SpiDeviceFactoryInterface
provisionSpiDevice
-
Field Details
-
DEVICE_NAME
- See Also:
- Constant Field Values
-
-
Constructor Details
-
RemoteDeviceFactory
public RemoteDeviceFactory()
-
-
Method Details
-
start
public void start() -
shutdown
public void shutdown()- Specified by:
shutdownin classBaseNativeDeviceFactory
-
getName
-
initialiseBoardInfo
- Overrides:
initialiseBoardInfoin classBaseNativeDeviceFactory
-
getBoardPwmFrequency
public int getBoardPwmFrequency() -
setBoardPwmFrequency
public void setBoardPwmFrequency(int frequency) -
getSpiBufferSize
public int getSpiBufferSize() -
createDigitalInputDevice
public GpioDigitalInputDeviceInterface createDigitalInputDevice(String key, PinInfo pinInfo, GpioPullUpDown pud, GpioEventTrigger trigger) -
createDigitalOutputDevice
public GpioDigitalOutputDeviceInterface createDigitalOutputDevice(String key, PinInfo pinInfo, boolean initialValue) -
createDigitalInputOutputDevice
public GpioDigitalInputOutputDeviceInterface createDigitalInputOutputDevice(String key, PinInfo pinInfo, DeviceMode mode) -
createPwmOutputDevice
public PwmOutputDeviceInterface createPwmOutputDevice(String key, PinInfo pinInfo, int pwmFrequency, float initialValue) -
createAnalogInputDevice
-
createAnalogOutputDevice
public AnalogOutputDeviceInterface createAnalogOutputDevice(String key, PinInfo pinInfo, float initialValue) -
createI2CDevice
public I2CDeviceInterface createI2CDevice(String key, int controller, int address, int addressSize) throws RuntimeIOException- Throws:
RuntimeIOException
-
createSpiDevice
public SpiDeviceInterface createSpiDevice(String key, int controller, int chipSelect, int frequency, SpiClockMode spiClockMode, boolean lsbFirst) throws RuntimeIOException- Throws:
RuntimeIOException
-
createSerialDevice
public SerialDeviceInterface createSerialDevice(String key, String deviceFile, int baud, SerialConstants.DataBits dataBits, SerialConstants.StopBits stopBits, SerialConstants.Parity parity, boolean readBlocking, int minReadChars, int readTimeoutMillis) throws RuntimeIOException- Throws:
RuntimeIOException
-
valueChanged
-
valueChanged
-