Class GridSwitchHandler
java.lang.Object
io.openems.edge.common.statemachine.StateHandler<StateMachine.OffGridState,Context>
io.openems.edge.ess.generic.offgrid.statemachine.GridSwitchHandler
Reads the State of the Grid-Switch relays.
- If system is currently connected to grid: START_BATTERY_IN_ON_GRID
- If system is currently disconnected from grid: START_BATTERY_IN_OFF_GRID
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Gets called before the StateMachine changes from another State to this State.protected StateMachine.OffGridState
runAndGetNextState
(Context context) Runs the main logic of StateMachine State and returns the next State.Methods inherited from class io.openems.edge.common.statemachine.StateHandler
debugLog, onExit
-
Constructor Details
-
GridSwitchHandler
public GridSwitchHandler()
-
-
Method Details
-
onEntry
Description copied from class:StateHandler
Gets called before the StateMachine changes from another State to this State.- Overrides:
onEntry
in classStateHandler<StateMachine.OffGridState,
Context> - Parameters:
context
- the Context object- Throws:
OpenemsError.OpenemsNamedException
- on error
-
runAndGetNextState
protected StateMachine.OffGridState runAndGetNextState(Context context) throws OpenemsError.OpenemsNamedException Description copied from class:StateHandler
Runs the main logic of StateMachine State and returns the next State.- Specified by:
runAndGetNextState
in classStateHandler<StateMachine.OffGridState,
Context> - Parameters:
context
- theStateHandler
.- Returns:
- the next State
- Throws:
OpenemsError.OpenemsNamedException
-