Class AutomaticOrbitCorrectionOperator
java.lang.Object
org.scictrl.mp.orbitcorrect.correction.OrbitCorrectionOperator
org.scictrl.mp.orbitcorrect.correction.automatic.AutomaticOrbitCorrectionOperator
This is controller type of class, intance presents active orbit correcction progress.
- Author:
- igor@scictrl.com
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
Thread that can be terminated.Nested classes/interfaces inherited from class org.scictrl.mp.orbitcorrect.correction.OrbitCorrectionOperator
OrbitCorrectionOperator.State
-
Field Summary
Fields inherited from class org.scictrl.mp.orbitcorrect.correction.OrbitCorrectionOperator
sendMailNotification
-
Constructor Summary
ConstructorDescriptionConstructor for AutomaticOrbitCorrectionOperator. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Aborts current correction and puts this model in status ST_ABORTING.Getter for the fieldautomaticOCModel
.getState()
Getter for the fieldstate
.void
initialize
(String name, DataBush db, ElementList<AbstractCorrector>[] correctors, ElementList<BPMonitor>[] bpms, OrbitCorrectionController contrl) initialize.boolean
isCurrentThreadExpired.void
requestAbort
(String message, Class<?> requestor, Throwable error) requestAbort.void
requestAbort
(String message, Class<?> requestor, Throwable error, boolean skipMail) requestAbort.void
requestStop
(String text) requestStop.void
requestStop
(String message, boolean skipMail) requestStop.void
startContinunous
(IAutomaticOCModel aocModel) Starts the AutomaticOC operation by creating and starting new execution thread with provided AutomaticOCModel as main operation strategy.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.void
stopByUser.void
unlockWait.void
waitIdle
(long milliseconds) Waits for provided number of millisecondsMethods inherited from class org.scictrl.mp.orbitcorrect.correction.OrbitCorrectionOperator
applyUndo, canUndo, clearLastCorrections, fireProgressReported, getBPMonitors, getController, getCorrectionScale, getCorrectors, getCurrentOrbit, getDataBush, getLastCorrectionH, getLastCorrectionV, getLastOrbit, getMaxCorrectionValue, getMessage, getName, getNewOrbit, getResponseMatrix, invalidateResponseMatrix, isSendMailNotification, isStateAborting, isStateActive, isStateApplying, isStateCalculating, isStateInactive, isStateStopping, isStateWaiting, sendMailNotification, setLastCorrection, setSendMailNotification, setState, setStateActive, setStateActive, setStateApplying, setStateApplying, setStateCalculating, setStateWaiting, setStateWaiting
-
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
requestAbort.
-
requestAbort
requestAbort.
-
requestStop
requestStop.
- Parameters:
text
- aString
object
-
requestStop
requestStop.
- Parameters:
message
- aString
objectskipMail
- 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 classOrbitCorrectionOperator
- Parameters:
name
- aString
objectdb
- aDataBush
objectcorrectors
- an array ofElementList
objectsbpms
- an array ofElementList
objectscontrl
- aOrbitCorrectionController
object
-
isCurrentThreadExpired
public boolean isCurrentThreadExpired()isCurrentThreadExpired.
- Returns:
- a boolean
-
getState
Getter for the field
state
.- Overrides:
getState
in classOrbitCorrectionOperator
- Returns:
- a
OrbitCorrectionOperator.State
object
-
startContinunous
Starts the AutomaticOC operation by creating and starting new execution thread with provided AutomaticOCModel as main operation strategy.- Parameters:
aocModel
- operation strategy implementation
-
startSingleLoop
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 implementationsteps
- 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
Getter for the field
automaticOCModel
.- Returns:
- a
IAutomaticOCModel
object
-