Class DataBushHandler
java.lang.Object
org.scictrl.mp.orbitcorrect.model.optics.DataBushHandler
DataBushHandler class.
- Author:
- igor@scictrl.com
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanOperation has been aborted.DataBush objectorg.scictrl.mp.orbitcorrect.model.optics.DataBushEntDataBush structure object.org.scictrl.mp.orbitcorrect.model.optics.IListenerEntStructure listener.org.scictrl.mp.orbitcorrect.model.optics.LinearOpticsOperatorlinear optics calculator object.Thread lock object.org.apache.logging.log4j.LoggerLogger.booleanSet should fire events.intThis field indicates when should DataBush be updated (when update method is manually demanded or when event happen). -
Constructor Summary
ConstructorsConstructorDescriptionDataBushHandler(DataBush db, org.scictrl.mp.orbitcorrect.model.optics.IListenerEnt lEnt, Object synchLock) DataBushHandlerconstructor. -
Method Summary
Modifier and TypeMethodDescriptionintThis method sets such current toPowerSupply's ofPowerSupplyListl that desired magnetic strength on magnets will be achieved.intThis method sets the same current toPowerSupplyBean's ofPowerSupply's ofPowerSupplyListl as is on theirPowerSupply's.intThis method call method_connect(DBExceptionHolder)on allBPMonitor's fromBPMonitorListand consequently connect allBPMonitor's onBeamPositionMonitorBean.intThis method call method_connect(DBExceptionHolder)on allPowerSupplay's fromPowerSupplyListand consequently connect allPowerSupplay's onPowerSupplyBean.intThis method call method_disconnect(DBExceptionHolder)on allBPMonitor's fromBPMonitorListand consequently disconnect allBPMonitor's onBeamPositionMonitorBean.intThis method call method_disconnect(DBExceptionHolder)on allPowerSupplay's fromPowerSupplyListand consequently disconnect allPowerSupplay's onPowerSupplyBean.intThis method call method_update(DBExceptionHolder)on allBPMonitor's fromBPMonitorListand consequently update allBPMonitor's onBeamPositionMonitorBean.int_updateMagnets(AbstractProtectedList<? extends AbstractMagnetElement> pl, PowerSupplyList l, DataBushPackedException eh) This method call method_update(DBExceptionHolder)onAbstractCalibratedMagnet's fromMagnetList's of dependent magnet ofPowerSupplay's fromPowerSupplayList, if they are members ofAbstractProtectedListl.intThis method call method_update(DBExceptionHolder)on allPowerSupplay's fromPowerSupplyListand consequently update allPowerSupplay's onPowerSupplyBean.int_updateSpecials(org.scictrl.mp.orbitcorrect.model.optics.DataBushEnt ent, DataBushPackedException eh) _updateSpecials.intapply()This method applaies magnets and power supplaies by calling methods_applyMagnetsand_applyPowerSupplies.intThis method applies magnets by calling method_applyMagnets.intThis method applies correctors by calling method_applyFromMagnetson them.voidclear()clear.intconnect()This method connectsDataBush'sPowerSupplyList,BPMonitorListandDataBushInfoto control system.intThis method connects parameter specifiedBPMonitorListto control system.intThis method connects parameter specifiedPowerSupplyListto control system.connectBPM(BPMonitor el) connectBPM.connectFrequencyProperty.This method on control system findsDoubleProperty, which represent energy, and return it.This method on control system findsRWDoubleProperty, which represent current (which current define parameter string), and return it.intThis method disconnectsDataBush'sPowerSupplyList,BPMonitorListandDataBushInfofrom control system.voiddisconnect(IDataConnector<?> connector) disconnect.intThis method disconnects parameter specifiedBPMonitorListfrom control system.intThis method disconnects parameter specifiedPowerSupplyListfrom control system.getElement(String name) This method returnsAbstractDataBushElement, whose name is parametr specified name, if is contained in any ofDataBushEntlists: powerSupplies, optics, or is itsDataBushInfo.getPowerSupply(String name) This method returnsPowerSupply, whose name is parametr specified name, if is contained inDataBushEntlist powerSupplies.intThis method returns update mode.booleanisSetFiresEvent.voidnotifyBPMDataUpdate.voidnotifyDBInfoDataUpdate.voidnotifyPSDataUpdate.voidnotifyRFDataUpdate.voidsetSetFiresEvent(boolean newSetFiresEvent) Setter for the fieldsetFiresEvent.voidsetUpdateMode(byte mode) Setter for the fieldupdateMode.voidsetUpdateMode(int mode) Setter for the fieldupdateMode.voidsimulateBPMs.doubletestPrecision(double value) testPrecision.intupdate()update.intupdate(AbstractProtectedMagnetList<? extends AbstractMagnetElement> l) update.intupdate(BindedList l) update.intupdate.intupdate(OpticsList l) update.intupdate.
-
Field Details
-
lock
Thread lock object. -
db
DataBush object -
ent
public org.scictrl.mp.orbitcorrect.model.optics.DataBushEnt entDataBush structure object. -
lEnt
public org.scictrl.mp.orbitcorrect.model.optics.IListenerEnt lEntStructure listener. -
linOp
public org.scictrl.mp.orbitcorrect.model.optics.LinearOpticsOperator linOplinear optics calculator object. -
updateMode
public int updateModeThis field indicates when should DataBush be updated (when update method is manually demanded or when event happen). -
setFiresEvent
public boolean setFiresEventSet should fire events. -
aborted
public boolean abortedOperation has been aborted. -
log
public org.apache.logging.log4j.Logger logLogger.
-
-
Constructor Details
-
Method Details
-
_applyMagnets
This method sets such current toPowerSupply's ofPowerSupplyListl that desired magnetic strength on magnets will be achieved.- Parameters:
l- aPowerSupplyListobjecteh- aDataBushPackedExceptionobject- Returns:
- a int
-
_applyPowerSupplies
This method sets the same current toPowerSupplyBean's ofPowerSupply's ofPowerSupplyListl as is on theirPowerSupply's.- Parameters:
l- aPowerSupplyListobjecteh- aDataBushPackedExceptionobject- Returns:
- a int
-
_connect
This method call method_connect(DBExceptionHolder)on allBPMonitor's fromBPMonitorListand consequently connect allBPMonitor's onBeamPositionMonitorBean.- Parameters:
l- aBPMonitorListobjecteh- aDataBushPackedExceptionobject- Returns:
- a int
- See Also:
-
clear
public void clear()clear.
-
_connect
This method call method_connect(DBExceptionHolder)on allPowerSupplay's fromPowerSupplyListand consequently connect allPowerSupplay's onPowerSupplyBean.- Parameters:
l- aPowerSupplyListobjecteh- aDataBushPackedExceptionobject- Returns:
- a int
- See Also:
-
_disconnect
This method call method_disconnect(DBExceptionHolder)on allBPMonitor's fromBPMonitorListand consequently disconnect allBPMonitor's onBeamPositionMonitorBean.- Parameters:
l- aBPMonitorListobject- Returns:
- a int
-
_disconnect
This method call method_disconnect(DBExceptionHolder)on allPowerSupplay's fromPowerSupplyListand consequently disconnect allPowerSupplay's onPowerSupplyBean.- Parameters:
l- aPowerSupplyListobject- Returns:
- a int
-
_updateBPMs
This method call method_update(DBExceptionHolder)on allBPMonitor's fromBPMonitorListand consequently update allBPMonitor's onBeamPositionMonitorBean.- Parameters:
l- aBPMonitorListobjecteh- aDataBushPackedExceptionobject- Returns:
- a int
- See Also:
-
_updateMagnets
public int _updateMagnets(AbstractProtectedList<? extends AbstractMagnetElement> pl, PowerSupplyList l, DataBushPackedException eh) This method call method_update(DBExceptionHolder)onAbstractCalibratedMagnet's fromMagnetList's of dependent magnet ofPowerSupplay's fromPowerSupplayList, if they are members ofAbstractProtectedListl.- Parameters:
pl- aAbstractProtectedListobjectl- aPowerSupplyListobjecteh- aDataBushPackedExceptionobject- Returns:
- a int
- See Also:
-
_updatePowerSupplies
This method call method_update(DBExceptionHolder)on allPowerSupplay's fromPowerSupplyListand consequently update allPowerSupplay's onPowerSupplyBean.- Parameters:
l- aPowerSupplyListobjecteh- aDataBushPackedExceptionobject- Returns:
- a int
- See Also:
-
_updateSpecials
public int _updateSpecials(org.scictrl.mp.orbitcorrect.model.optics.DataBushEnt ent, DataBushPackedException eh) throws IllegalStateException _updateSpecials.
- Parameters:
ent- aDataBushEntobjecteh- aDataBushPackedExceptionobject- Returns:
- a int
- Throws:
IllegalStateException- if any.
-
apply
This method applaies magnets and power supplaies by calling methods_applyMagnetsand_applyPowerSupplies. Both are called on all suitableDataBushHandler'sDataBush's list.- Returns:
- a int
- Throws:
InconsistentDataException- if any.IllegalStateException- if any.DataBushPackedException- if any.- See Also:
-
apply
public int apply(PowerSupplyList l) throws InconsistentDataException, IllegalStateException, DataBushPackedException This method applies magnets by calling method_applyMagnets. Method is called on patrameter specifiedPowerSupplaylist.- Parameters:
l- aPowerSupplyListobject- Returns:
- a int
- Throws:
InconsistentDataException- if any.IllegalStateException- if any.DataBushPackedException- if any.- See Also:
-
applyFast
public int applyFast(ElementList<AbstractDataBushElement> cor) throws InconsistentDataException, IllegalStateException, DataBushPackedException, ControlSystemException This method applies correctors by calling method_applyFromMagnetson them.- Parameters:
cor- aElementListobject- Returns:
- a int
- Throws:
InconsistentDataException- if any.IllegalStateException- if any.DataBushPackedException- if any.ControlSystemException- if any.
-
connect
This method connectsDataBush'sPowerSupplyList,BPMonitorListandDataBushInfoto control system.- Returns:
- a int
- Throws:
IllegalStateException- if any.DataBushPackedException- if any.
-
connect
This method connects parameter specifiedBPMonitorListto control system.- Parameters:
l- aBPMonitorListobject- Returns:
- a int
- Throws:
IllegalStateException- if any.DataBushPackedException- if any.
-
connect
This method connects parameter specifiedPowerSupplyListto control system.- Parameters:
l- aPowerSupplyListobject- Returns:
- a int
- Throws:
IllegalStateException- if any.DataBushPackedException- if any.
-
connectPowerSuply
This method on control system findsRWDoubleProperty, which represent current (which current define parameter string), and return it. This property is also added topsMonitor.- Parameters:
ps- aPowerSupplyobject- Returns:
- RWDoubleProperty
- Throws:
ControlSystemException- if any.
-
connectFrequencyProperty
public IWriteConnector<Double> connectFrequencyProperty(RFGenerator rf) throws ControlSystemException connectFrequencyProperty.
- Parameters:
rf- aRFGeneratorobject- Returns:
- a
IWriteConnectorobject - Throws:
ControlSystemException- if any.
-
connectInfoProperty
This method on control system findsDoubleProperty, which represent energy, and return it. This property is also added topsMonitor.- Parameters:
info- aDataBushInfoobject- Returns:
- DoubleProperty
- Throws:
ControlSystemException- if any.
-
disconnect
This method disconnectsDataBush'sPowerSupplyList,BPMonitorListandDataBushInfofrom control system.- Returns:
- a int
- Throws:
IllegalStateException- if any.
-
disconnect
This method disconnects parameter specifiedBPMonitorListfrom control system.- Parameters:
l- aBPMonitorListobject- Returns:
- a int
- Throws:
IllegalStateException- if any.
-
disconnect
This method disconnects parameter specifiedPowerSupplyListfrom control system.- Parameters:
l- aPowerSupplyListobject- Returns:
- a int
- Throws:
IllegalStateException- if any.
-
getElement
This method returnsAbstractDataBushElement, whose name is parametr specified name, if is contained in any ofDataBushEntlists: powerSupplies, optics, or is itsDataBushInfo.- Parameters:
name- aStringobject- Returns:
- a
AbstractDataBushElementobject
-
getPowerSupply
This method returnsPowerSupply, whose name is parametr specified name, if is contained inDataBushEntlist powerSupplies.- Parameters:
name- aStringobject- Returns:
- a
PowerSupplyobject
-
getUpdateMode
public int getUpdateMode()This method returns update mode.- Returns:
- a int
-
isSetFiresEvent
public boolean isSetFiresEvent()isSetFiresEvent.
- Returns:
- boolean
-
notifyBPMDataUpdate
public void notifyBPMDataUpdate()notifyBPMDataUpdate.
-
notifyRFDataUpdate
public void notifyRFDataUpdate()notifyRFDataUpdate.
-
notifyPSDataUpdate
notifyPSDataUpdate.
- Parameters:
ps- aPowerSupplyobject
-
notifyDBInfoDataUpdate
public void notifyDBInfoDataUpdate()notifyDBInfoDataUpdate.
-
setSetFiresEvent
public void setSetFiresEvent(boolean newSetFiresEvent) Setter for the field
setFiresEvent.- Parameters:
newSetFiresEvent- boolean
-
setUpdateMode
public void setUpdateMode(byte mode) Setter for the field
updateMode.- Parameters:
mode- byte
-
setUpdateMode
public void setUpdateMode(int mode) Setter for the field
updateMode.- Parameters:
mode- byte
-
simulateBPMs
public void simulateBPMs()simulateBPMs.
-
testPrecision
public double testPrecision(double value) testPrecision.
- Parameters:
value- double- Returns:
- double
-
update
update.
- Returns:
- a int
- Throws:
IllegalStateException- if any.DataBushPackedException- if any.
-
update
public int update(AbstractProtectedMagnetList<? extends AbstractMagnetElement> l) throws IllegalStateException, DataBushPackedException update.
- Parameters:
l- aAbstractProtectedMagnetListobject- Returns:
- a int
- Throws:
IllegalStateException- if any.DataBushPackedException- if any.
-
update
update.
- Parameters:
l- aBindedListobject- Returns:
- a int
- Throws:
IllegalStateException- if any.DataBushPackedException- if any.
-
update
update.
- Parameters:
l- aBPMonitorListobject- Returns:
- a int
- Throws:
IllegalStateException- if any.DataBushPackedException- if any.
-
update
update.
- Parameters:
l- aOpticsListobject- Returns:
- a int
- Throws:
IllegalStateException- if any.DataBushPackedException- if any.
-
update
update.
- Parameters:
l- aPowerSupplyListobject- Returns:
- a int
- Throws:
IllegalStateException- if any.DataBushPackedException- if any.
-
connectBPM
connectBPM.
- Parameters:
el- aBPMonitorobject- Returns:
- a
IDataConnectorobject - Throws:
ControlSystemException- if any.
-
disconnect
disconnect.
- Parameters:
connector- aIDataConnectorobject
-