EnergyPreferenceTrait.BalanceStruct

class EnergyPreferenceTrait.BalanceStruct


Represents a step along a scale of preferences.

Summary

Public constructors

Creates the BalanceStruct class.

Public properties

OptionalValue<String>

An optional string explaining which actions a device might take at the given step value.

UByte

The relative value, in percentage, along a scale of preferences.

Public constructors

BalanceStruct

BalanceStruct(
    step: UByte,
    label: OptionalValue<String> = OptionalValue.absent()
)

Creates the BalanceStruct class.

Public properties

label

val labelOptionalValue<String>

An optional string explaining which actions a device might take at the given step value.

step

val stepUByte

The relative value, in percentage, along a scale of preferences. Supported values:

  • 0: The device entirely favors the priority specified by the first element in the energyPriorities attribute.
  • 50: The device splits its energy consumption between the two priorities in the energyPriorities attribute.
  • 100: The device entirely favors the priority specified by the second element in the energyPriorities attribute.