Class CycleWorker

java.lang.Object
io.openems.common.worker.AbstractWorker
io.openems.edge.core.cycle.CycleWorker

public class CycleWorker extends AbstractWorker
  • Constructor Details

    • CycleWorker

      public CycleWorker(CycleImpl parent)
  • Method Details

    • getCycleTime

      protected int getCycleTime()
      Description copied from class: AbstractWorker
      Gets the cycleTime of this worker in [ms].
      • > 0 sets the minimum execution time of one Cycle
      • = 0 never wait between two consecutive executions of forever()
      • < 0 causes the Cycle to sleep forever until 'triggerNextRun()' is called
      Specified by:
      getCycleTime in class AbstractWorker
      Returns:
      the cycleTime
    • forever

      protected void forever()
      Description copied from class: AbstractWorker
      This method is called in a loop forever until the Thread gets interrupted.
      Specified by:
      forever in class AbstractWorker