Class RemoteDeviceFactory
java.lang.Object
com.diozero.internal.spi.AbstractDeviceFactory
com.diozero.internal.spi.BaseNativeDeviceFactory
com.diozero.internal.provider.remote.devicefactory.RemoteDeviceFactory
- All Implemented Interfaces:
AnalogInputDeviceFactoryInterface,AnalogOutputDeviceFactoryInterface,DeviceFactoryInterface,GpioDeviceFactoryInterface,I2CDeviceFactoryInterface,NativeDeviceFactoryInterface,PwmOutputDeviceFactoryInterface,SerialDeviceFactoryInterface,SpiDeviceFactoryInterface,AutoCloseable
public class RemoteDeviceFactory extends BaseNativeDeviceFactory
-
Field Summary
Fields Modifier and Type Field Description static StringDEVICE_NAMEFields inherited from class com.diozero.internal.spi.AbstractDeviceFactory
closed, deviceStatesFields inherited from interface com.diozero.internal.spi.I2CDeviceFactoryInterface
I2C_PREFIXFields inherited from interface com.diozero.internal.spi.SerialDeviceFactoryInterface
SERIAL_PREFIXFields inherited from interface com.diozero.internal.spi.SpiDeviceFactoryInterface
DEFAULT_SPI_BUFFER_SIZE, SPI_PREFIX -
Constructor Summary
Constructors Constructor Description RemoteDeviceFactory() -
Method Summary
Methods inherited from class com.diozero.internal.spi.BaseNativeDeviceFactory
close, getBoardInfo, getBoardPinInfo, getVRef, registerDeviceFactoryMethods inherited from class com.diozero.internal.spi.AbstractDeviceFactory
createI2CKey, createPinKey, createSerialKey, createSpiKey, deviceClosed, deviceOpened, getDevice, isClosed, isDeviceOpened, reopenMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.diozero.internal.spi.AnalogInputDeviceFactoryInterface
provisionAnalogInputDeviceMethods inherited from interface com.diozero.internal.spi.AnalogOutputDeviceFactoryInterface
provisionAnalogOutputDeviceMethods inherited from interface com.diozero.internal.spi.DeviceFactoryInterface
createI2CKey, createPinKey, createSerialKey, createSpiKey, deviceClosed, deviceOpened, getDevice, isClosed, isDeviceOpened, reopenMethods inherited from interface com.diozero.internal.spi.GpioDeviceFactoryInterface
provisionDigitalInputDevice, provisionDigitalInputOutputDevice, provisionDigitalOutputDeviceMethods inherited from interface com.diozero.internal.spi.I2CDeviceFactoryInterface
provisionI2CDeviceMethods inherited from interface com.diozero.internal.spi.PwmOutputDeviceFactoryInterface
provisionPwmOutputDeviceMethods inherited from interface com.diozero.internal.spi.SerialDeviceFactoryInterface
provisionSerialDeviceMethods inherited from interface com.diozero.internal.spi.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
-
lookupBoardInfo
- Overrides:
lookupBoardInfoin 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 InternalI2CDeviceInterface createI2CDevice(String key, int controller, int address, I2CConstants.AddressSize addressSize) throws RuntimeIOException- Throws:
RuntimeIOException
-
createSpiDevice
public InternalSpiDeviceInterface createSpiDevice(String key, int controller, int chipSelect, int frequency, SpiClockMode spiClockMode, boolean lsbFirst) throws RuntimeIOException- Throws:
RuntimeIOException
-
createSerialDevice
public InternalSerialDeviceInterface 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
-
accept
-
accept
-