Interface AbstractUpdateableElement
- All Known Implementing Classes:
AbstractBending
,AbstractCalibratedMagnet
,AbstractCorrector
,BPMonitor
,DataBushInfo
,HorCorrector
,Kicker
,PowerSupply
,Quadrupole
,RBending
,RFGenerator
,SBending
,Sextupole
,VerCorrector
public interface AbstractUpdateableElement
Marks DataBush element class that can be updated. Class has method
update()
.
Class with this interface is connected to another or to Abean, from which can read value
and update it's own value with it.- Author:
- igor@scictrl.com
-
Method Summary
Modifier and TypeMethodDescriptionvoid
SetsDataInvalidated
flag totrue
.boolean
Returnstrue
if element's data is not synchronized with associated element or Abean.int
update()
Reads value from associated element or Abean and calculates it's new values.
-
Method Details
-
invalidateData
void invalidateData()SetsDataInvalidated
flag totrue
.- See Also:
-
isDataInvalidated
boolean isDataInvalidated()Returnstrue
if element's data is not synchronized with associated element or Abean. This fag goes to false after update or apply.- Returns:
true
if element's data is not synchronized with associated element or Abean.
-
update
Reads value from associated element or Abean and calculates it's new values. Metod reads data from other databush elements or from remote devices represented with Abean. Metod also checksisDataInvalidated()
on depending databush elements, if value has changed. Return value is identification code of error. Note! Update is performed only if virtual flag is set tofalse
. Note! All update methods are synchronized, so only one update is called at time. For update od group of elements call update on appropriate element-list or DataBush.- Returns:
- a int the return code indicating success
- Throws:
IllegalStateException
- thrown if status of DataBush equalsDB_EMPTY
DataBushPackedException
- contains all exception thrown or caught during updating element
-