Class AbstractPredictor24Hours
java.lang.Object
io.openems.edge.common.component.AbstractOpenemsComponent
io.openems.edge.predictor.api.oneday.AbstractPredictor24Hours
- All Implemented Interfaces:
OpenemsComponent
,Predictor24Hours
- Direct Known Subclasses:
DummyPredictor24Hours
,PredictorPersistenceModelImpl
,PredictorSimilardayModelImpl
public abstract class AbstractPredictor24Hours
extends AbstractOpenemsComponent
implements Predictor24Hours, OpenemsComponent
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
Nested classes/interfaces inherited from interface io.openems.edge.common.component.OpenemsComponent
OpenemsComponent.ChannelId
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractPredictor24Hours
(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) protected abstract Prediction24Hours
createNewPrediction
(ChannelAddress channelAddress) get24HoursPrediction
(ChannelAddress channelAddress) Gives a prediction for the next 24 h for the givenChannelAddress
; one value per 15 minutes; 96 values in total.Gets the Channel-Addresses for which this Predictor can provide a prediction.protected abstract ClockProvider
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
-
AbstractPredictor24Hours
-
-
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) throws OpenemsError.OpenemsNamedException -
getChannelAddresses
Description copied from interface:Predictor24Hours
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 interfacePredictor24Hours
- Returns:
- an array of
ChannelAddress
es
-
get24HoursPrediction
Description copied from interface:Predictor24Hours
Gives a prediction for the next 24 h for the givenChannelAddress
; one value per 15 minutes; 96 values in total.E.g. if called at 10:05, the first value stands for 10:00 to 10:15; second value for 10:15 to 10:30.
- Specified by:
get24HoursPrediction
in interfacePredictor24Hours
- Parameters:
channelAddress
- theChannelAddress
- Returns:
- the
Prediction24Hours
-