Package dev.digiried.wattpilot.dto
Enum Class ChargingMode
- All Implemented Interfaces:
Serializable,Comparable<ChargingMode>,Constable
Enum for the charging mode configuration.
- Author:
- Florian Hotze - Initial contribution
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDefault charging mode, i.e. charge with the configured current.Eco charging mode, i.e. charge with solar power surplus or if the dynamic electricity tariff is under the configured threshold.Similar toECO, but additionally ensures the car is charged with a specified amount of energy by a set time by using grid power if necessary. -
Method Summary
Modifier and TypeMethodDescriptioninttoValue()Get the API value of the charging mode.static ChargingModeReturns the enum constant of this class with the specified name.static ChargingMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
Default charging mode, i.e. charge with the configured current. -
ECO
Eco charging mode, i.e. charge with solar power surplus or if the dynamic electricity tariff is under the configured threshold. -
NEXT_TRIP
Similar toECO, but additionally ensures the car is charged with a specified amount of energy by a set time by using grid power if necessary.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
toValue
public int toValue()Get the API value of the charging mode.- Returns:
- the API value
-