Class Context
java.lang.Object
io.openems.edge.common.statemachine.AbstractContext<GenericManagedEss>
io.openems.edge.ess.generic.offgrid.statemachine.Context
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Battery
protected final OffGridBatteryInverter
protected final ComponentManager
protected final OffGridSwitch
-
Constructor Summary
ConstructorDescriptionContext
(GenericManagedEss parent, Battery battery, OffGridBatteryInverter batteryInverter, OffGridSwitch offGridSwitch, ComponentManager componentManager, AtomicBoolean isFromOffToOnGrid) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Proof if allchannels are present
.boolean
Gets the grid state changes from off to on grid inStartedInOffGridHandler
state.boolean
Checks if contactors set properly for off-grid connection.boolean
Checks if contactors set properly for on-grid connection.void
Set contactors for on-grid connection.void
Set contactors for on-grid connection.void
setFromOffToOnGrid
(boolean isFromOffToOnGrid) Sets if grid state changes from off to on grid.
-
Field Details
-
battery
-
batteryInverter
-
offGridSwitch
-
componentManager
-
-
Constructor Details
-
Context
public Context(GenericManagedEss parent, Battery battery, OffGridBatteryInverter batteryInverter, OffGridSwitch offGridSwitch, ComponentManager componentManager, AtomicBoolean isFromOffToOnGrid)
-
-
Method Details
-
isChannelsDefined
public boolean isChannelsDefined()Proof if allchannels are present
.- Returns:
- true if all defined.
-
isOnGridContactorsSet
public boolean isOnGridContactorsSet()Checks if contactors set properly for on-grid connection.- Returns:
- true if all contactors adjust as they are required.
-
isOffGridContactorsSet
public boolean isOffGridContactorsSet()Checks if contactors set properly for off-grid connection.- Returns:
- true if all contactors adjust as they are required.
-
setContactorsForOnGrid
Set contactors for on-grid connection.- Throws:
OpenemsError.OpenemsNamedException
- on error.
-
setContactorsForOffGrid
Set contactors for on-grid connection.- Throws:
OpenemsError.OpenemsNamedException
- on error.
-
isFromOffToOnGrid
public boolean isFromOffToOnGrid()Gets the grid state changes from off to on grid inStartedInOffGridHandler
state.- Returns:
- true if it goes from off to on grid.
-
setFromOffToOnGrid
public void setFromOffToOnGrid(boolean isFromOffToOnGrid) Sets if grid state changes from off to on grid.- Parameters:
isFromOffToOnGrid
- value to be set.
-