Class DigitalInputMultiPinConfiguration

java.lang.Object
com.opensourcewithslu.utilities.MultiPinConfigs.DigitalInputMultiPinConfiguration

@Prototype @EachProperty("pi4j.multi-digital-input") public class DigitalInputMultiPinConfiguration extends Object
This class handles the configuration of a digital input component that has multiple pins.
  • Constructor Details

    • DigitalInputMultiPinConfiguration

      public DigitalInputMultiPinConfiguration(@Parameter String id)
      The DigitalInputMultiPinConfiguration 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.
    • getAddresses

      public int[] getAddresses()
      Gets the pin addresses for the component.
      Returns:
      An array of the pin addresses.
    • setAddresses

      public void setAddresses(String addresses)
      Sets the pin addresses for the component. All previously existing address are replaced.
      Parameters:
      addresses - Pin addresses separated by a comma.
    • getPulls

      public com.pi4j.io.gpio.digital.PullResistance[] getPulls()
      Gets the pull resistance for the component.
      Returns:
      The PullResistance enumerations.
    • setPulls

      public void setPulls(String all_pulls)
      Sets all the pull resistance for the components.
      Parameters:
      all_pulls - String of pull resistances separated by commas. Pull down resistance should be formatted as PULL_DOWN. Pull up as PULL_UP.
    • getDebounces

      public long[] getDebounces()
      Gets the current debounce values for the component.
      Returns:
      The array of debounce values of type long.
    • setDebounces

      public void setDebounces(String debounces)
      Sets the debounces for the component. Replaces all the existing debounces.
      Parameters:
      debounces - String representing the debounces for the component. Each debounce seperated by a comma.
    • 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.