Package com.blukii.sdk.config.datatype
Class EnergySaveSettings
java.lang.Object
com.blukii.sdk.config.datatype.EnergySaveSettings
This class represents data type
SmartBeaconSettings
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
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
isState()
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.toString()
int
validate()
Validates the values contained in this object.
-
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.- It only takes affect if interval is not 0.
- The duration must not be 0 if interval is not 0.
- The advertising is done with the interval defined by
Blukii.readInitialAdvertisingInterval(ResponseListener)
. - The energy save advertising (frames and values) is equal to the primary advertising
settings defined by
SmartBeacon.readSettings(ResponseListener)
.
- Returns:
- the energy saving advertising duration
-
setDuration
public void setDuration(int duration) Sets the advertising duration in seconds after energy saving interval.- It only takes affect if interval is not 0.
- The duration must not be 0 if interval is not 0.
- The advertising is done with the interval defined by
Blukii.readInitialAdvertisingInterval(ResponseListener)
. - The energy save advertising (frames and values) is equal to the primary advertising
settings defined by
SmartBeacon.readSettings(ResponseListener)
.
- 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
-
equals
-
toString
-