Interface DeviceInterface

All Superinterfaces:
AutoCloseable, Closeable
All Known Subinterfaces:
AnalogInputDeviceInterface, AnalogOutputDeviceInterface, GpioDeviceInterface, GpioDigitalDeviceInterface, GpioDigitalInputDeviceInterface, GpioDigitalInputOutputDeviceInterface, GpioDigitalOutputDeviceInterface, I2CDeviceInterface, PwmOutputDeviceInterface, SerialDeviceInterface, SpiDeviceInterface
All Known Implementing Classes:
AbstractDevice, AbstractInputDevice, DefaultNativeSerialDevice, DefaultNativeSpiDevice, I2CDevice, MCP23xxxDigitalInputDevice, MCP23xxxDigitalInputOutputDevice, MCP23xxxDigitalOutputDevice, NativeGpioInputDevice, NativeGpioInputOutputDevice, NativeGpioOutputDevice, NativeI2CDeviceJavaRaf, NativeI2CDeviceSMBus, OdroidC2SysFsPwmOutputDevice, PiconZero.PiconZeroAnalogInputDevice, PiconZero.PiconZeroAnalogOutputDevice, PiconZero.PiconZeroDigitalInputDevice, PiconZero.PiconZeroDigitalOutputDevice, PiconZero.PiconZeroPwmOutputDevice, SerialDevice, SoftwarePwmOutputDevice, SpiDevice, SysFsAnalogInputDevice, SysFsDigitalInputDevice, SysFsDigitalInputOutputDevice, SysFsDigitalOutputDevice, SysFsPwmOutputDevice

public interface DeviceInterface
extends Closeable
Fundamental interface for all low-level device types.
  • Method Summary

    Modifier and Type Method Description
    void close()
    Close this device
    String getKey()
    Get the unique device identifier for this device
    boolean isOpen()
    Check if this device is open or closed
  • Method Details

    • getKey

      String getKey()
      Get the unique device identifier for this device
      Returns:
      unique device identifier
    • isOpen

      boolean isOpen()
      Check if this device is open or closed
      Returns:
      true if this device is open
    • close

      void close()
      Close this device
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable