Class PwmMultiPinConfiguration

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

@Prototype @EachProperty("pi4j.multi-pwm") public class PwmMultiPinConfiguration extends Object
This class handles the configuration of a PWM device that has multiple pins.
  • Constructor Details

    • PwmMultiPinConfiguration

      public PwmMultiPinConfiguration(@Parameter String id)
      The PwmMultiPinConfiguration 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 address 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.
    • getPwmTypes

      public com.pi4j.io.pwm.PwmType[] getPwmTypes()
      Gets the PWM types of the component.
      Returns:
      PWMType enum.
    • setPwmTypes

      public void setPwmTypes(String pwmTypes)
      Sets the PWM types for the component.
      Parameters:
      pwmTypes - String of PWM types separated by commas. Software should be formatted as SOFTWARE. Hardware as HARDWARE.
    • getInitials

      public int[] getInitials()
      Gets the initial states that the component is in when first initialized.
      Returns:
      Array of integers representing the initial state for each pin.
    • setInitials

      public void setInitials(String initials)
      Sets the initial states for the component.
      Parameters:
      initials - String of states separated by commas.
    • getShutdowns

      public int[] getShutdowns()
      Gets the shutdown states for the component.
      Returns:
      Array of integers representing the shutdowns.
    • setShutdowns

      public void setShutdowns(String shutdowns)
      Sets the shutdown states for the component. Existing shutdowns are replaced.
      Parameters:
      shutdowns - String of shutdowns separated by commas.
    • 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.