Class DigitalOutputConfiguration

java.lang.Object
com.opensourcewithslu.utilities.DigitalOutputConfiguration

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

    • DigitalOutputConfiguration

      public DigitalOutputConfiguration(@Parameter String id)
      The DigitalOutputConfiguration 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 String name of the component.
    • setName

      public void setName(String name)
      Sets the name of the component.
      Parameters:
      name - The String that the name will be set as.
    • getInitial

      public com.pi4j.io.gpio.digital.DigitalState getInitial()
      Gets the initial state of the component.
      Returns:
      The initial state of the component.
    • setInitial

      public void setInitial(com.pi4j.io.gpio.digital.DigitalState initial)
      Sets the initial state for the component.
      Parameters:
      initial - The Digital state that the component will start was.
    • getShutdown

      public com.pi4j.io.gpio.digital.DigitalState getShutdown()
      Gets the shutdown state of the component.
      Returns:
      The digital state of the component.
    • setShutdown

      public void setShutdown(com.pi4j.io.gpio.digital.DigitalState shutdown)
      Sets the shutdown state for the component.
      Parameters:
      shutdown - DigitalState enum.
    • 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.