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
public class CycleImpl extends AbstractOpenemsComponent implements 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
Fields Modifier and Type Field Description protected ComponentManager
componentManager
protected org.osgi.service.event.EventAdmin
eventAdmin
protected java.util.TreeSet<Scheduler>
schedulers
Holds the Schedulers and their relative cycleTime.protected Sum
sumComponent
-
Fields inherited from interface io.openems.edge.common.cycle.Cycle
DEFAULT_CYCLE_TIME, SINGLETON_COMPONENT_ID, SINGLETON_SERVICE_PID
-
-
Constructor Summary
Constructors Constructor Description CycleImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addScheduler(Scheduler newScheduler)
protected void
deactivate()
Handles @Deactivate of implementations.int
getCycleTime()
Gets the duration of one global OpenEMS Cycle in [ms].protected void
logInfo(org.slf4j.Logger log, java.lang.String message)
Log an info message including the Component ID.protected void
logWarn(org.slf4j.Logger log, java.lang.String message)
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 Detail
-
eventAdmin
protected org.osgi.service.event.EventAdmin eventAdmin
-
sumComponent
protected Sum sumComponent
-
componentManager
protected ComponentManager componentManager
-
schedulers
protected final java.util.TreeSet<Scheduler> schedulers
Holds the Schedulers and their relative cycleTime. They are sorted ascending by their cycleTimes.
-
-
Method Detail
-
addScheduler
protected void addScheduler(Scheduler newScheduler)
-
removeScheduler
protected void removeScheduler(Scheduler scheduler)
-
deactivate
protected void deactivate()
Description copied from class:AbstractOpenemsComponent
Handles @Deactivate of implementations. Prints log output.- Overrides:
deactivate
in classAbstractOpenemsComponent
-
logInfo
protected void logInfo(org.slf4j.Logger log, java.lang.String message)
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
protected void logWarn(org.slf4j.Logger log, java.lang.String message)
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
-
-