Package io.openems.edge.core.cycle
Class CycleImpl
java.lang.Object
io.openems.edge.common.component.AbstractOpenemsComponent
io.openems.edge.core.cycle.CycleImpl
- All Implemented Interfaces:
OpenemsComponent
,Cycle
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.openems.edge.common.cycle.Cycle
Cycle.ChannelId
Nested classes/interfaces inherited from interface io.openems.edge.common.component.OpenemsComponent
OpenemsComponent.ChannelId
-
Field Summary
Modifier and TypeFieldDescriptionprotected ComponentManager
protected org.osgi.service.event.EventAdmin
Holds the Schedulers and their relative cycleTime.protected Sum
Fields inherited from interface io.openems.edge.common.cycle.Cycle
DEFAULT_CYCLE_TIME, SINGLETON_COMPONENT_ID, SINGLETON_SERVICE_PID
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addScheduler
(Scheduler newScheduler) protected void
Handles @Deactivate of implementations.int
Gets the duration of one global OpenEMS Cycle in [ms].protected void
Log an info message including the Component ID.protected void
Log a warn message including the Component ID.protected void
removeScheduler
(Scheduler scheduler) Methods inherited from class io.openems.edge.common.component.AbstractOpenemsComponent
_channel, activate, activate, addChannel, addChannels, addChannels, alias, channels, getComponentContext, id, isEnabled, logDebug, logError, 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.cycle.Cycle
_setIgnoreDisabledController, _setMeasuredCycleTime, _setMeasuredCycleTime, getIgnoreDisabledController, getIgnoreDisabledControllerChannel, getMeasuredCycleTime, getMeasuredCycleTimeChannel
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
-
eventAdmin
protected org.osgi.service.event.EventAdmin eventAdmin -
sumComponent
-
componentManager
-
schedulers
Holds the Schedulers and their relative cycleTime. They are sorted ascending by their cycleTimes.
-
-
Constructor Details
-
CycleImpl
public CycleImpl()
-
-
Method Details
-
addScheduler
-
removeScheduler
-
deactivate
protected void deactivate()Description copied from class:AbstractOpenemsComponent
Handles @Deactivate of implementations. Prints log output.- Overrides:
deactivate
in classAbstractOpenemsComponent
-
logInfo
Description copied from class:AbstractOpenemsComponent
Log an info message including the Component ID.- Overrides:
logInfo
in classAbstractOpenemsComponent
- Parameters:
log
- the Logger instancemessage
- the message
-
logWarn
Description copied from class:AbstractOpenemsComponent
Log a warn message including the Component ID.- Overrides:
logWarn
in classAbstractOpenemsComponent
- Parameters:
log
- the Logger instancemessage
- the message
-
getCycleTime
public int getCycleTime()Description copied from interface:Cycle
Gets the duration of one global OpenEMS Cycle in [ms].- Specified by:
getCycleTime
in interfaceCycle
- Returns:
- the duration in milliseconds
-