Class CycleImpl

All Implemented Interfaces:
OpenemsComponent, Cycle

public class CycleImpl extends AbstractOpenemsComponent implements OpenemsComponent, Cycle
  • Field Details

    • eventAdmin

      protected org.osgi.service.event.EventAdmin eventAdmin
    • sumComponent

      protected Sum sumComponent
    • componentManager

      protected ComponentManager componentManager
    • schedulers

      protected final TreeSet<Scheduler> schedulers
      Holds the Schedulers and their relative cycleTime. They are sorted ascending by their cycleTimes.
  • Constructor Details

    • CycleImpl

      public CycleImpl()
  • Method Details

    • 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 class AbstractOpenemsComponent
    • logInfo

      protected void logInfo(org.slf4j.Logger log, String message)
      Description copied from class: AbstractOpenemsComponent
      Log an info message including the Component ID.
      Overrides:
      logInfo in class AbstractOpenemsComponent
      Parameters:
      log - the Logger instance
      message - the message
    • logWarn

      protected void logWarn(org.slf4j.Logger log, String message)
      Description copied from class: AbstractOpenemsComponent
      Log a warn message including the Component ID.
      Overrides:
      logWarn in class AbstractOpenemsComponent
      Parameters:
      log - the Logger instance
      message - 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 interface Cycle
      Returns:
      the duration in milliseconds