Class TimeOfUseTariffControllerImpl
java.lang.Object
io.openems.edge.common.component.AbstractOpenemsComponent
io.openems.edge.controller.ess.timeofusetariff.TimeOfUseTariffControllerImpl
- All Implemented Interfaces:
OpenemsComponent
,ComponentJsonApi
,JsonApi
,Controller
,TimeOfUseTariffController
,EnergySchedulable<StateMachine,
,TimeOfUseTariffControllerImpl.Context> TimedataProvider
public class TimeOfUseTariffControllerImpl
extends AbstractOpenemsComponent
implements TimeOfUseTariffController, EnergySchedulable<StateMachine,TimeOfUseTariffControllerImpl.Context>, Controller, OpenemsComponent, TimedataProvider, ComponentJsonApi
-
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.common.component.OpenemsComponent
OpenemsComponent.ChannelId
Nested classes/interfaces inherited from interface io.openems.edge.controller.ess.timeofusetariff.TimeOfUseTariffController
TimeOfUseTariffController.ChannelId
-
Field Summary
Fields inherited from interface io.openems.edge.controller.ess.timeofusetariff.TimeOfUseTariffController
PERIODS_PER_HOUR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
buildJsonApiRoutes
(JsonApiBuilder builder) Specifies routes of the current component in the given builder.protected void
Handles @Deactivate of implementations.debugLog()
Gets some output that is suitable for a continuous Debug log.Get theEnergyScheduleHandler
.Gets theTimedata
service.void
run()
Executes the Controller logic.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.common.jsonapi.ComponentJsonApi
id
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, getComponentContext, getState, getStateChannel, hasFaults, id, isEnabled, serviceFactoryPid, servicePid
Methods inherited from interface io.openems.edge.controller.ess.timeofusetariff.TimeOfUseTariffController
_setQuarterlyPrices, _setStateMachine, getQuarterlyPricesChannel, getStateMachine, getStateMachineChannel
-
Constructor Details
-
TimeOfUseTariffControllerImpl
public TimeOfUseTariffControllerImpl()
-
-
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
-
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.
-
buildJsonApiRoutes
Description copied from interface:JsonApi
Specifies routes of the current component in the given builder.Example:
@Override
public void buildJsonApiRoutes(JsonApiBuilder builder) { builder.rpc("METHOD_NAME", call -> { // handle call... }); }- Specified by:
buildJsonApiRoutes
in interfaceJsonApi
- Parameters:
builder
- the builder to add the routes
-
debugLog
Description copied from interface:OpenemsComponent
Gets some output that is suitable for a continuous Debug log. Returns 'null' by default which causes no output.- Specified by:
debugLog
in interfaceOpenemsComponent
- Returns:
- the debug log output
-
getEnergyScheduleHandler
public EnergyScheduleHandler<StateMachine,TimeOfUseTariffControllerImpl.Context> getEnergyScheduleHandler()Description copied from interface:EnergySchedulable
Get theEnergyScheduleHandler
.- Specified by:
getEnergyScheduleHandler
in interfaceEnergySchedulable<StateMachine,
TimeOfUseTariffControllerImpl.Context> - Returns:
EnergyScheduleHandler
-