Class StatusDefinition
- java.lang.Object
-
- io.openems.edge.controller.io.heatpump.sgready.StatusDefinition
-
public class StatusDefinition extends java.lang.Object
State Definition.Stores information about the time, it was switched on and provides an method to set this state.
-
-
Constructor Summary
Constructors Constructor Description StatusDefinition(HeatPumpImpl parent, Status status, HeatPump.ChannelId activeTimeChannelId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
isActive()
Returns if this state is the active state.protected void
switchOn()
Switch on the state/it's referring relays.protected void
updateActiveTime()
Updates the time channel depending if the state is active or not.
-
-
-
Constructor Detail
-
StatusDefinition
public StatusDefinition(HeatPumpImpl parent, Status status, HeatPump.ChannelId activeTimeChannelId)
-
-
Method Detail
-
switchOn
protected void switchOn() throws java.lang.IllegalArgumentException, OpenemsError.OpenemsNamedException
Switch on the state/it's referring relays.Forward its state to the parent changeState method, to set the corresponding relay outputs and the present state, if the state is not already active.
- Throws:
OpenemsError.OpenemsNamedException
- on errorjava.lang.IllegalArgumentException
- on error
-
updateActiveTime
protected void updateActiveTime()
Updates the time channel depending if the state is active or not.
-
isActive
protected boolean isActive()
Returns if this state is the active state.- Returns:
- Is this state active.
-
-