Class DataBushHandler
java.lang.Object
org.scictrl.mp.orbitcorrect.model.optics.DataBushHandler
DataBushHandler class.
- Author:
- igor@scictrl.com
-
Field Summary
Modifier and TypeFieldDescriptionboolean
Operation has been aborted.DataBush objectorg.scictrl.mp.orbitcorrect.model.optics.DataBushEnt
DataBush structure object.org.scictrl.mp.orbitcorrect.model.optics.IListenerEnt
Structure listener.org.scictrl.mp.orbitcorrect.model.optics.LinearOpticsOperator
linear optics calculator object.Thread lock object.org.apache.logging.log4j.Logger
Logger.boolean
Set should fire events.int
This field indicates when should DataBush be updated (when update method is manually demanded or when event happen). -
Constructor Summary
ConstructorDescriptionDataBushHandler
(DataBush db, org.scictrl.mp.orbitcorrect.model.optics.IListenerEnt lEnt, Object synchLock) DataBushHandler
constructor. -
Method Summary
Modifier and TypeMethodDescriptionint
This method sets such current toPowerSupply
's ofPowerSupplyList
l that desired magnetic strength on magnets will be achieved.int
This method sets the same current toPowerSupplyBean
's ofPowerSupply
's ofPowerSupplyList
l as is on theirPowerSupply
's.int
This method call method_connect(DBExceptionHolder)
on allBPMonitor
's fromBPMonitorList
and consequently connect allBPMonitor
's onBeamPositionMonitorBean
.int
This method call method_connect(DBExceptionHolder)
on allPowerSupplay
's fromPowerSupplyList
and consequently connect allPowerSupplay
's onPowerSupplyBean
.int
This method call method_disconnect(DBExceptionHolder)
on allBPMonitor
's fromBPMonitorList
and consequently disconnect allBPMonitor
's onBeamPositionMonitorBean
.int
This method call method_disconnect(DBExceptionHolder)
on allPowerSupplay
's fromPowerSupplyList
and consequently disconnect allPowerSupplay
's onPowerSupplyBean
.int
This method call method_update(DBExceptionHolder)
on allBPMonitor
's fromBPMonitorList
and 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 ofAbstractProtectedList
l.int
This method call method_update(DBExceptionHolder)
on allPowerSupplay
's fromPowerSupplyList
and consequently update allPowerSupplay
's onPowerSupplyBean
.int
_updateSpecials
(org.scictrl.mp.orbitcorrect.model.optics.DataBushEnt ent, DataBushPackedException eh) _updateSpecials.int
apply()
This method applaies magnets and power supplaies by calling methods_applyMagnets
and_applyPowerSupplies
.int
This method applies magnets by calling method_applyMagnets
.int
This method applies correctors by calling method_applyFromMagnets
on them.void
clear()
clear.int
connect()
This method connectsDataBush
'sPowerSupplyList
,BPMonitorList
andDataBushInfo
to control system.int
This method connects parameter specifiedBPMonitorList
to control system.int
This method connects parameter specifiedPowerSupplyList
to 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.int
This method disconnectsDataBush
'sPowerSupplyList
,BPMonitorList
andDataBushInfo
from control system.void
disconnect
(IDataConnector<?> connector) disconnect.int
This method disconnects parameter specifiedBPMonitorList
from control system.int
This method disconnects parameter specifiedPowerSupplyList
from control system.getElement
(String name) This method returnsAbstractDataBushElement
, whose name is parametr specified name, if is contained in any ofDataBushEnt
lists: powerSupplies, optics, or is itsDataBushInfo
.getPowerSupply
(String name) This method returnsPowerSupply
, whose name is parametr specified name, if is contained inDataBushEnt
list powerSupplies.int
This method returns update mode.boolean
isSetFiresEvent.void
notifyBPMDataUpdate.void
notifyDBInfoDataUpdate.void
notifyPSDataUpdate.void
notifyRFDataUpdate.void
setSetFiresEvent
(boolean newSetFiresEvent) Setter for the fieldsetFiresEvent
.void
setUpdateMode
(byte mode) Setter for the fieldupdateMode
.void
setUpdateMode
(int mode) Setter for the fieldupdateMode
.void
simulateBPMs.double
testPrecision
(double value) testPrecision.int
update()
update.int
update
(AbstractProtectedMagnetList<? extends AbstractMagnetElement> l) update.int
update
(BindedList l) update.int
update.int
update
(OpticsList l) update.int
update.
-
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 ofPowerSupplyList
l that desired magnetic strength on magnets will be achieved.- Parameters:
l
- aPowerSupplyList
objecteh
- aDataBushPackedException
object- Returns:
- a int
-
_applyPowerSupplies
This method sets the same current toPowerSupplyBean
's ofPowerSupply
's ofPowerSupplyList
l as is on theirPowerSupply
's.- Parameters:
l
- aPowerSupplyList
objecteh
- aDataBushPackedException
object- Returns:
- a int
-
_connect
This method call method_connect(DBExceptionHolder)
on allBPMonitor
's fromBPMonitorList
and consequently connect allBPMonitor
's onBeamPositionMonitorBean
.- Parameters:
l
- aBPMonitorList
objecteh
- aDataBushPackedException
object- Returns:
- a int
- See Also:
-
clear
public void clear()clear.
-
_connect
This method call method_connect(DBExceptionHolder)
on allPowerSupplay
's fromPowerSupplyList
and consequently connect allPowerSupplay
's onPowerSupplyBean
.- Parameters:
l
- aPowerSupplyList
objecteh
- aDataBushPackedException
object- Returns:
- a int
- See Also:
-
_disconnect
This method call method_disconnect(DBExceptionHolder)
on allBPMonitor
's fromBPMonitorList
and consequently disconnect allBPMonitor
's onBeamPositionMonitorBean
.- Parameters:
l
- aBPMonitorList
object- Returns:
- a int
-
_disconnect
This method call method_disconnect(DBExceptionHolder)
on allPowerSupplay
's fromPowerSupplyList
and consequently disconnect allPowerSupplay
's onPowerSupplyBean
.- Parameters:
l
- aPowerSupplyList
object- Returns:
- a int
-
_updateBPMs
This method call method_update(DBExceptionHolder)
on allBPMonitor
's fromBPMonitorList
and consequently update allBPMonitor
's onBeamPositionMonitorBean
.- Parameters:
l
- aBPMonitorList
objecteh
- aDataBushPackedException
object- 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 ofAbstractProtectedList
l.- Parameters:
pl
- aAbstractProtectedList
objectl
- aPowerSupplyList
objecteh
- aDataBushPackedException
object- Returns:
- a int
- See Also:
-
_updatePowerSupplies
This method call method_update(DBExceptionHolder)
on allPowerSupplay
's fromPowerSupplyList
and consequently update allPowerSupplay
's onPowerSupplyBean
.- Parameters:
l
- aPowerSupplyList
objecteh
- aDataBushPackedException
object- Returns:
- a int
- See Also:
-
_updateSpecials
public int _updateSpecials(org.scictrl.mp.orbitcorrect.model.optics.DataBushEnt ent, DataBushPackedException eh) throws IllegalStateException _updateSpecials.
- Parameters:
ent
- aDataBushEnt
objecteh
- aDataBushPackedException
object- Returns:
- a int
- Throws:
IllegalStateException
- if any.
-
apply
This method applaies magnets and power supplaies by calling methods_applyMagnets
and_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 specifiedPowerSupplay
list.- Parameters:
l
- aPowerSupplyList
object- 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_applyFromMagnets
on them.- Parameters:
cor
- aElementList
object- Returns:
- a int
- Throws:
InconsistentDataException
- if any.IllegalStateException
- if any.DataBushPackedException
- if any.ControlSystemException
- if any.
-
connect
This method connectsDataBush
'sPowerSupplyList
,BPMonitorList
andDataBushInfo
to control system.- Returns:
- a int
- Throws:
IllegalStateException
- if any.DataBushPackedException
- if any.
-
connect
This method connects parameter specifiedBPMonitorList
to control system.- Parameters:
l
- aBPMonitorList
object- Returns:
- a int
- Throws:
IllegalStateException
- if any.DataBushPackedException
- if any.
-
connect
This method connects parameter specifiedPowerSupplyList
to control system.- Parameters:
l
- aPowerSupplyList
object- 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
- aPowerSupply
object- Returns:
- RWDoubleProperty
- Throws:
ControlSystemException
- if any.
-
connectFrequencyProperty
public IWriteConnector<Double> connectFrequencyProperty(RFGenerator rf) throws ControlSystemException connectFrequencyProperty.
- Parameters:
rf
- aRFGenerator
object- Returns:
- a
IWriteConnector
object - 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
- aDataBushInfo
object- Returns:
- DoubleProperty
- Throws:
ControlSystemException
- if any.
-
disconnect
This method disconnectsDataBush
'sPowerSupplyList
,BPMonitorList
andDataBushInfo
from control system.- Returns:
- a int
- Throws:
IllegalStateException
- if any.
-
disconnect
This method disconnects parameter specifiedBPMonitorList
from control system.- Parameters:
l
- aBPMonitorList
object- Returns:
- a int
- Throws:
IllegalStateException
- if any.
-
disconnect
This method disconnects parameter specifiedPowerSupplyList
from control system.- Parameters:
l
- aPowerSupplyList
object- Returns:
- a int
- Throws:
IllegalStateException
- if any.
-
getElement
This method returnsAbstractDataBushElement
, whose name is parametr specified name, if is contained in any ofDataBushEnt
lists: powerSupplies, optics, or is itsDataBushInfo
.- Parameters:
name
- aString
object- Returns:
- a
AbstractDataBushElement
object
-
getPowerSupply
This method returnsPowerSupply
, whose name is parametr specified name, if is contained inDataBushEnt
list powerSupplies.- Parameters:
name
- aString
object- Returns:
- a
PowerSupply
object
-
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
- aPowerSupply
object
-
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
- aAbstractProtectedMagnetList
object- Returns:
- a int
- Throws:
IllegalStateException
- if any.DataBushPackedException
- if any.
-
update
update.
- Parameters:
l
- aBindedList
object- Returns:
- a int
- Throws:
IllegalStateException
- if any.DataBushPackedException
- if any.
-
update
update.
- Parameters:
l
- aBPMonitorList
object- Returns:
- a int
- Throws:
IllegalStateException
- if any.DataBushPackedException
- if any.
-
update
update.
- Parameters:
l
- aOpticsList
object- Returns:
- a int
- Throws:
IllegalStateException
- if any.DataBushPackedException
- if any.
-
update
update.
- Parameters:
l
- aPowerSupplyList
object- Returns:
- a int
- Throws:
IllegalStateException
- if any.DataBushPackedException
- if any.
-
connectBPM
connectBPM.
- Parameters:
el
- aBPMonitor
object- Returns:
- a
IDataConnector
object - Throws:
ControlSystemException
- if any.
-
disconnect
disconnect.
- Parameters:
connector
- aIDataConnector
object
-