Package com.diozero.internal.provider
Interface DeviceFactoryInterface
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Subinterfaces:
AnalogInputDeviceFactoryInterface
,AnalogOutputDeviceFactoryInterface
,GpioDeviceFactoryInterface
,I2CDeviceFactoryInterface
,NativeDeviceFactoryInterface
,PwmOutputDeviceFactoryInterface
,SerialDeviceFactoryInterface
,SpiDeviceFactoryInterface
- All Known Implementing Classes:
AbstractDeviceFactory
,BaseNativeDeviceFactory
,DefaultDeviceFactory
,MCP23008
,MCP23017
,MCP23S17
,MCP23x08
,MCP23x17
,MCP23xxx
,McpAdc
,PCA9685
,PCF8574
,PCF8591
,PiconZero
public interface DeviceFactoryInterface extends Closeable
-
Method Summary
Modifier and Type Method Description void
close()
String
createI2CKey(int controller, int address)
String
createPinKey(PinInfo pinInfo)
String
createSerialKey(String deviceFile)
String
createSpiKey(int controller, int chipSelect)
void
deviceClosed(DeviceInterface device)
void
deviceOpened(DeviceInterface device)
BoardPinInfo
getBoardPinInfo()
DeviceInterface
getDevice(String key)
<T extends DeviceInterface>
TgetDevice(String key, Class<T> deviceClass)
String
getName()
boolean
isClosed()
boolean
isDeviceOpened(String key)
default void
start()
-
Method Details
-
start
default void start() -
getName
String getName() -
isDeviceOpened
-
deviceOpened
-
deviceClosed
-
getBoardPinInfo
BoardPinInfo getBoardPinInfo() -
createPinKey
-
createI2CKey
-
createSpiKey
-
createSerialKey
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
RuntimeIOException
-
isClosed
boolean isClosed() -
getDevice
-
getDevice
-