Class DigitalInputConfiguration

java.lang.Object
com.opensourcewithslu.utilities.DigitalInputConfiguration

@Prototype @EachProperty("pi4j.digital-input") public class DigitalInputConfiguration extends Object
This class handles the configuration of a digital input component.
  • Constructor Details

    • DigitalInputConfiguration

      public DigitalInputConfiguration(@Parameter String id)
      Constructor for the DigitalInputConfiguration.
      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.
    • getDebounce

      public Long getDebounce()
      Gets the current debounce value for the component.
      Returns:
      Long type representing debounce of the component.
    • setDebounce

      public void setDebounce(Long debounce)
      Sets debounce of the component. Replaces existing debounce.
      Parameters:
      debounce - New debounce of type Long,
    • getPull

      public com.pi4j.io.gpio.digital.PullResistance getPull()
      Gets the pull resistance for the component.
      Returns:
      The PullResistance enumeration.
    • setPull

      public void setPull(com.pi4j.io.gpio.digital.PullResistance pull)
      Sets the pull resistance for the component.
      Parameters:
      pull - The PullResistance enum that will become the new pull resistance for the component.
    • getAddress

      public int getAddress()
      Gets the pin address for the component.
      Returns:
      An array of the pin addresses.
    • setAddress

      public void setAddress(int address)
      Sets the pin address.
      Parameters:
      address - Integer representing the new pin address.
    • getProvider

      public String getProvider()
      Gets the provider for the component.
      Returns:
      A String representation of the provider.
    • setProvider

      public void setProvider(String provider)
      Sets the provider.
      Parameters:
      provider - The new provider for the component.