Class PwmConfiguration

java.lang.Object
com.opensourcewithslu.utilities.PwmConfiguration

@Prototype @EachProperty("pi4j.pwm") public class PwmConfiguration extends Object
The PwmConfiguration class handles the configuration of a pwm component.
  • Constructor Details

    • PwmConfiguration

      public PwmConfiguration(@Parameter String id)
      PwmConfiguration 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.
    • getAddress

      public int getAddress()
      Gets the pin address for the component.
      Returns:
      The address as an integer.
    • setAddress

      public void setAddress(int address)
      Sets a new pin address for the component.
      Parameters:
      address - An integer representing the new pin address.
    • getInitial

      public int getInitial()
      Gets the initial state that the component is in when first initialized.
      Returns:
      The state as an integer.
    • setInitial

      public void setInitial(int initial)
      Sets the initial state that the component will be in when first initialized.
      Parameters:
      initial - The startup state as an integer.
    • getShutdown

      public int getShutdown()
      Gets the shutdown state for the component.
      Returns:
      The shutdown state as an integer.
    • setShutdown

      public void setShutdown(int shutdown)
      Sets the shutdown state for the component.
      Parameters:
      shutdown - Integer representing the new shutdown state.
    • getPwmType

      public com.pi4j.io.pwm.PwmType getPwmType()
      Gets the pwm type of the component.
      Returns:
      A PwmType object.
    • setPwmType

      public void setPwmType(String pwmType)
      Sets the pwm type.
      Parameters:
      pwmType - A string representing the new pwm type. Either SOFTWARE or HARDWARE.
    • getProvider

      public String getProvider()
      Gets the provider for the component.
      Returns:
      The provider as a String.
    • setProvider

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