Class AbstractPredictor
java.lang.Object
io.openems.edge.common.component.AbstractOpenemsComponent
io.openems.edge.predictor.api.prediction.AbstractPredictor
- All Implemented Interfaces:
OpenemsComponent
,Predictor
- Direct Known Subclasses:
DummyPredictor
,PredictorPersistenceModelImpl
,PredictorSimilardayModelImpl
public abstract class AbstractPredictor
extends AbstractOpenemsComponent
implements Predictor, OpenemsComponent
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.openems.edge.common.component.OpenemsComponent
OpenemsComponent.ChannelId
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractPredictor
(ChannelId[] firstInitialChannelIds, ChannelId[]... furtherInitialChannelIds) -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
activate
(org.osgi.service.component.ComponentContext context, String id, String alias, boolean enabled) Handles @Activate of implementations.protected void
activate
(org.osgi.service.component.ComponentContext context, String id, String alias, boolean enabled, String[] channelAddresses, LogVerbosity logVerbosity) protected abstract Prediction
createNewPrediction
(ChannelAddress channelAddress) Gets the Channel-Addresses for which this Predictor can provide a prediction.protected abstract ClockProvider
getPrediction
(ChannelAddress channelAddress) Gets aPrediction
for the givenChannelAddress
.Methods inherited from class io.openems.edge.common.component.AbstractOpenemsComponent
_channel, activate, addChannel, addChannels, addChannels, alias, channels, deactivate, 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.component.OpenemsComponent
_channel, _getChannelAs, alias, channel, channel, channels, debugLog, getComponentContext, getState, getStateChannel, hasFaults, id, isEnabled, serviceFactoryPid, servicePid
-
Constructor Details
-
AbstractPredictor
-
-
Method Details
-
getClockProvider
-
createNewPrediction
-
activate
protected final void activate(org.osgi.service.component.ComponentContext context, String id, String alias, boolean enabled) Description copied from class:AbstractOpenemsComponent
Handles @Activate of implementations. Prints log output.- Overrides:
activate
in classAbstractOpenemsComponent
- Parameters:
context
- the OSGi ComponentContextid
- the unique OpenEMS Component IDalias
- Human-readable name of this Component. Typically 'config.alias()'. Defaults to 'id' if emptyenabled
- is the Component enabled?
-
activate
protected void activate(org.osgi.service.component.ComponentContext context, String id, String alias, boolean enabled, String[] channelAddresses, LogVerbosity logVerbosity) throws OpenemsError.OpenemsNamedException -
getChannelAddresses
Description copied from interface:Predictor
Gets the Channel-Addresses for which this Predictor can provide a prediction.The entries can contain wildcards to match multiple actual
ChannelAddress
es.- Specified by:
getChannelAddresses
in interfacePredictor
- Returns:
- an array of
ChannelAddress
es
-
getPrediction
Description copied from interface:Predictor
Gets aPrediction
for the givenChannelAddress
.- Specified by:
getPrediction
in interfacePredictor
- Parameters:
channelAddress
- theChannelAddress
- Returns:
- the
Prediction
-