Class EnergySaveSettings

java.lang.Object
com.blukii.sdk.config.datatype.EnergySaveSettings

public final class EnergySaveSettings extends Object
This class represents data type SmartBeaconSettings
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    boolean
    equals(Object obj, boolean ignoreState)
     
    int
    Gets the advertising duration in seconds after energy saving interval.
    int
    Gets the energy saving interval in seconds.
    boolean
    Gets the button switch state.
    boolean
    Gets the energy save state.
    void
    setButtonSwitch(boolean buttonSwitch)
    Sets the button switch state.
    void
    setDuration(int duration)
    Sets the advertising duration in seconds after energy saving interval.
    void
    setInterval(int interval)
    Sets the energy saving interval in seconds.
    void
    setState(boolean state)
    Sets the energy save state.
     
    int
    Validates the values contained in this object.

    Methods inherited from class java.lang.Object

    getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • EnergySaveSettings

      public EnergySaveSettings()
  • Method Details

    • isState

      public boolean isState()
      Gets the energy save state.

      Values:

      • true: energy saving is active according interval and packets setting.
      • false: energy saving is not active.
      Returns:
      the energy save state
    • setState

      public void setState(boolean state)
      Sets the energy save state.

      Values:

      • true: energy saving is active according interval and packets setting.
      • false: energy saving is not active.
      Parameters:
      state - energy save state
    • isButtonSwitch

      public boolean isButtonSwitch()
      Gets the button switch state.

      Values:

      • true: energy saving state can be switched by blukii button.
      • false: energy saving settings can only be changed by configuration.
      Returns:
      the button switch state
    • setButtonSwitch

      public void setButtonSwitch(boolean buttonSwitch)
      Sets the button switch state.

      Values:

      • true: energy saving state can be switched by blukii button.
      • false: energy saving settings can only be changed by configuration.
      Parameters:
      buttonSwitch - the button switch state
    • getInterval

      public int getInterval()
      Gets the energy saving interval in seconds.
      • It defines the interval (in seconds) of energy saving wake ups.
      • If the interval is 0, blukii advertising is switched off. Otherwise the packets need to be defined.
      Returns:
      the energy saving interval
    • setInterval

      public void setInterval(int interval)
      Sets the energy saving interval in seconds.
      • It defines the interval (in seconds) of energy saving wake ups.
      • If the interval is 0, blukii advertising is switched off. Otherwise the packets need to be defined.
      Parameters:
      interval - the energy saving interval
    • getDuration

      public int getDuration()
      Gets the advertising duration in seconds after energy saving interval.
      Returns:
      the energy saving advertising duration
    • setDuration

      public void setDuration(int duration)
      Sets the advertising duration in seconds after energy saving interval.
      Parameters:
      duration - the energy saving advertising duration
    • validate

      public int validate()
      Validates the values contained in this object.

      This can be used when you create an object, to verify the values set.

      Returns:
      a state from Validation
    • equals

      public boolean equals(@Nullable Object obj)
      Overrides:
      equals in class Object
    • equals

      public boolean equals(@Nullable Object obj, boolean ignoreState)
    • toString

      @NonNull public String toString()
      Overrides:
      toString in class Object