Class ControllerIoHeatingElementImpl
java.lang.Object
io.openems.edge.common.component.AbstractOpenemsComponent
io.openems.edge.controller.io.heatingelement.ControllerIoHeatingElementImpl
- All Implemented Interfaces:
OpenemsComponent
,Controller
,ControllerIoHeatingElement
,TimedataProvider
public class ControllerIoHeatingElementImpl
extends AbstractOpenemsComponent
implements ControllerIoHeatingElement, Controller, OpenemsComponent, TimedataProvider
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.openems.edge.controller.api.Controller
Controller.ChannelId
Nested classes/interfaces inherited from interface io.openems.edge.controller.io.heatingelement.ControllerIoHeatingElement
ControllerIoHeatingElement.ChannelId
Nested classes/interfaces inherited from interface io.openems.edge.common.component.OpenemsComponent
OpenemsComponent.ChannelId
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
applyLevel
(Level level) Switch on Phases according to selectedLevel
.protected void
Handles @Deactivate of implementations.protected int
Gets the configured Power-per-Phase in [W].Gets theTimedata
service.protected Status
Handle Mode "Automatic".void
run()
Executes the Controller logic.protected void
Helper function to switch an output if it was not switched before.Methods inherited from class io.openems.edge.common.component.AbstractOpenemsComponent
_channel, activate, activate, addChannel, addChannels, addChannels, alias, channels, getComponentContext, id, isEnabled, logDebug, logError, logInfo, logWarn, modified, removeChannel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.openems.edge.controller.api.Controller
_setRunFailed, getRunFailed, getRunFailedChannel
Methods inherited from interface io.openems.edge.common.component.OpenemsComponent
_channel, _getChannelAs, alias, channel, channel, channels, debugLog, getComponentContext, getState, getStateChannel, hasFaults, id, isEnabled, serviceFactoryPid, servicePid
-
Field Details
-
componentManager
-
-
Constructor Details
-
ControllerIoHeatingElementImpl
-
-
Method Details
-
deactivate
protected void deactivate()Description copied from class:AbstractOpenemsComponent
Handles @Deactivate of implementations. Prints log output.- Overrides:
deactivate
in classAbstractOpenemsComponent
-
run
Description copied from interface:Controller
Executes the Controller logic.- Specified by:
run
in interfaceController
- Throws:
OpenemsError.OpenemsNamedException
- on error
-
modeAutomatic
protected Status modeAutomatic() throws IllegalArgumentException, OpenemsError.OpenemsNamedExceptionHandle Mode "Automatic".- Returns:
- run state
- Throws:
IllegalArgumentException
- on error.OpenemsError.OpenemsNamedException
- on error.
-
applyLevel
public void applyLevel(Level level) throws IllegalArgumentException, OpenemsError.OpenemsNamedException Switch on Phases according to selectedLevel
.- Parameters:
level
- the target Level- Throws:
IllegalArgumentException
- on errorOpenemsError.OpenemsNamedException
- on error
-
getPowerPerPhase
protected int getPowerPerPhase()Gets the configured Power-per-Phase in [W].- Returns:
- power per phase
-
setOutput
protected void setOutput(Phase phase, boolean value) throws IllegalArgumentException, OpenemsError.OpenemsNamedException Helper function to switch an output if it was not switched before.- Parameters:
phase
-Phase
value
- The boolean value which must set on the output channel address.- Throws:
OpenemsError.OpenemsNamedException
- on error.IllegalArgumentException
- on error.
-
getTimedata
Description copied from interface:TimedataProvider
Gets theTimedata
service.- Specified by:
getTimedata
in interfaceTimedataProvider
- Returns:
- the service or null if it is not (yet) available.
-