Class BoardInfo

Direct Known Subclasses:
GenericLinuxArmBoardInfo, UnknownBoardInfo

public abstract class BoardInfo
extends BoardPinInfo
Information about the connected SBC. Note that the connected board instance might be a remote device, e.g. connected via serial, Bluetooth or TCP/IP. The BoardInfo instance for the connected device must be obtained by calling getBoardInfo() the on the NativeDeviceFactoryInterface instance returned from DeviceFactoryHelper.getNativeDeviceFactory().
  • Field Details

  • Constructor Details

    • BoardInfo

      public BoardInfo​(String make, String model, int memoryKb, String libraryPath)
    • BoardInfo

      public BoardInfo​(String make, String model, int memoryKb, float adcVRef, String libraryPath)
  • Method Details

    • populateBoardPinInfo

      public abstract void populateBoardPinInfo()
      Pin initialisation is done separately to the constructor since all known BoardInfo instances get instantiated on startup by the Java ServiceLoader.
    • getMake

      public String getMake()
      The make of the connected board, e.g. "Raspberry Pi"
      the make of the connected board
    • getModel

      public String getModel()
      The model of the connected board, e.g. "3B+"
      the model of the connected board
    • getMemoryKb

      public int getMemoryKb()
      Get the memory (in KB) of the connected board
      memory in KB
    • getLibraryPath

      public String getLibraryPath()
      Internal diozero method to get the library path prefix to be used when loading native libraries for this device.
      the library path prefix
    • getAdcVRef

      public float getAdcVRef()
      Get the Analog to Digital converter reference voltage to be used when taking ADC readings
      the reference voltage for this board
    • getName

      public String getName()
      Get the name of this board - usual a concatenation of make and model
      the name of this board
    • getLongName

      public String getLongName()
    • compareMakeAndModel

      public boolean compareMakeAndModel​(String make, String model)
      Compare make and model
      make - the make to compare
      model - the model to compare
      true if the make and model are the same
    • getPwmChip

      public int getPwmChip​(int pwmNum)
      Get the PWM chip for the specified PWM number. Only actually relevant for sysfs PWM control on the BeagleBone Black.
      pwmNum - The sysfs PWM channel number
      The PWM chip number for the requested PWM channel number, -1 if not found / not relevant
    • createMmapGpio

      public MmapGpioInterface createMmapGpio()
      Instantiate the memory mapped GPIO interface for this board. Not that the caller needs to call initialise prior to use.
      the MMAP GPIO interface implementation for this board, null if there isn't one
    • getI2CBusNumbers

      public Collection<Integer> getI2CBusNumbers()
      Detect the I2C bus controller numbers that are available on this board.
      collection of I2C bus controller numbers
    • getCpuTemperature

      public float getCpuTemperature()
      Utility method to get the CPU temperate of the attached board
      the CPU temperature
    • toString

      public String toString()
      toString in class Object