Class i2cConfiguration

java.lang.Object
com.opensourcewithslu.utilities.i2cConfiguration

@Prototype @EachProperty("pi4j.i2c") public class i2cConfiguration extends Object
This class handles the configuration of an I2C components.
  • Constructor Details

    • i2cConfiguration

      public i2cConfiguration(@Parameter String id)
      The i2cConfiguration constructor.
      Parameters:
      id - The configuration id as defined in the application.yml
  • Method Details

    • getId

      public String getId()
      Gets the id of the component.
      Returns:
      The id of the component.
    • getName

      public String getName()
      Gets the name of the component.
      Returns:
      The name of the component.
    • setName

      public void setName(String name)
      Sets the name of the component.
      Parameters:
      name - The string name to replace the existing name.
    • getBus

      public int getBus()
      Gets the bus pin for the component.
      Returns:
      integer representing the bus.
    • setBus

      public void setBus(int bus)
      Sets the bus pin
      Parameters:
      bus - integer representing the bus pin.
    • getDevice

      public int getDevice()
      Gets the device
      Returns:
      the device represented by an integer.
    • setDevice

      public void setDevice(int device)
      Sets the device
      Parameters:
      device - The device as an integer.