Package io.openems.edge.common.startstop
Enum StartStopConfig
- java.lang.Object
-
- java.lang.Enum<StartStopConfig>
-
- io.openems.edge.common.startstop.StartStopConfig
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<StartStopConfig>
public enum StartStopConfig extends java.lang.Enum<StartStopConfig>
Every OpenEMS Component that implementsStartStoppable
is required to have a configuration property "startStop" of this type that overrides the logic of theStartStoppable.setStartStop(StartStop)
method:.@AttributeDefinition(name = "Start/stop behaviour?", description = "Should this Component be forced to start or stop?") StartStopConfig startStop() default StartStopConfig.AUTO;
- if config is
START
-> always start - if config is
STOP
-> always stop - if config is
AUTO
-> startStartStop.UNDEFINED
and wait for a call toStartStoppable.setStartStop(StartStop)
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AUTO
Wait for runtime START/STOP command viaStartStoppable.setStartStop(StartStop)
.START
Force START the Component.STOP
Force STOP the Component.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StartStopConfig
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static StartStopConfig[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
START
public static final StartStopConfig START
Force START the Component.
-
STOP
public static final StartStopConfig STOP
Force STOP the Component.
-
AUTO
public static final StartStopConfig AUTO
Wait for runtime START/STOP command viaStartStoppable.setStartStop(StartStop)
.
-
-
Method Detail
-
values
public static StartStopConfig[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (StartStopConfig c : StartStopConfig.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static StartStopConfig valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-