Class AutomaticOrbitCorrectionOperator

java.lang.Object
org.scictrl.mp.orbitcorrect.correction.OrbitCorrectionOperator
org.scictrl.mp.orbitcorrect.correction.automatic.AutomaticOrbitCorrectionOperator

public class AutomaticOrbitCorrectionOperator extends OrbitCorrectionOperator
This is controller type of class, intance presents active orbit correcction progress.
Author:
igor@scictrl.com
  • Constructor Details

    • AutomaticOrbitCorrectionOperator

      public AutomaticOrbitCorrectionOperator()

      Constructor for AutomaticOrbitCorrectionOperator.

  • Method Details

    • abortByUser

      public void abortByUser()
      Aborts current correction and puts this model in status ST_ABORTING. If correction apply is in progress, it is aborted.
    • stopByUser

      public void stopByUser()

      stopByUser.

    • requestAbort

      public void requestAbort(String message, Class<?> requestor, Throwable error, boolean skipMail)

      requestAbort.

      Parameters:
      message - a String object
      requestor - a Class object
      error - a Throwable object
      skipMail - a boolean
    • requestAbort

      public void requestAbort(String message, Class<?> requestor, Throwable error)

      requestAbort.

      Parameters:
      message - a String object
      requestor - a Class object
      error - a Throwable object
    • requestStop

      public void requestStop(String text)

      requestStop.

      Parameters:
      text - a String object
    • requestStop

      public void requestStop(String message, boolean skipMail)

      requestStop.

      Parameters:
      message - a String object
      skipMail - a boolean
    • unlockWait

      public void unlockWait()

      unlockWait.

    • waitIdle

      public void waitIdle(long milliseconds)
      Waits for provided number of milliseconds
      Parameters:
      milliseconds - the wait time
    • initialize

      public void initialize(String name, DataBush db, ElementList<AbstractCorrector>[] correctors, ElementList<BPMonitor>[] bpms, OrbitCorrectionController contrl)

      initialize.

      Overrides:
      initialize in class OrbitCorrectionOperator
      Parameters:
      name - a String object
      db - a DataBush object
      correctors - an array of ElementList objects
      bpms - an array of ElementList objects
      contrl - a OrbitCorrectionController object
    • isCurrentThreadExpired

      public boolean isCurrentThreadExpired()

      isCurrentThreadExpired.

      Returns:
      a boolean
    • getState

      public OrbitCorrectionOperator.State getState()

      Getter for the field state.

      Overrides:
      getState in class OrbitCorrectionOperator
      Returns:
      a OrbitCorrectionOperator.State object
    • startContinunous

      public void startContinunous(IAutomaticOCModel aocModel)
      Starts the AutomaticOC operation by creating and starting new execution thread with provided AutomaticOCModel as main operation strategy.
      Parameters:
      aocModel - operation strategy implementation
    • startSingleLoop

      public void startSingleLoop(IAutomaticOCModel aocModel, int steps, boolean dryRun)

      Starts the AutomaticOC operation by creating and starting new execution thread with provided AutomaticOCModel as main operation strategy.

      The correction loop is performed until correction model decides that can correct no more. Some correction loops are executed in steps, the number of steps to go is controlled with steps parameter.

      Parameters:
      aocModel - operation strategy implementation
      steps - controls how many steps deep the loop recursion goes. If less then 0, then there is no step limit and loop is executed till end, if more than 0, then can go deeper for given count.
      dryRun - a boolean
    • getAutomaticOCModel

      public IAutomaticOCModel getAutomaticOCModel()

      Getter for the field automaticOCModel.

      Returns:
      a IAutomaticOCModel object