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 TypeMethodDescriptionvoidSetsDataInvalidatedflag totrue.booleanReturnstrueif element's data is not synchronized with associated element or Abean.intupdate()Reads value from associated element or Abean and calculates it's new values.
-
Method Details
-
invalidateData
void invalidateData()SetsDataInvalidatedflag totrue.- See Also:
-
isDataInvalidated
boolean isDataInvalidated()Returnstrueif element's data is not synchronized with associated element or Abean. This fag goes to false after update or apply.- Returns:
trueif 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_EMPTYDataBushPackedException- contains all exception thrown or caught during updating element
-