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 Type
    Method
    Description
    void
    Sets DataInvalidated flag to true.
    boolean
    Returns true if element's data is not synchronized with associated element or Abean.
    int
    Reads value from associated element or Abean and calculates it's new values.
  • Method Details

    • invalidateData

      void invalidateData()
      Sets DataInvalidated flag to true.
      See Also:
    • isDataInvalidated

      boolean isDataInvalidated()
      Returns true 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 checks isDataInvalidated() 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 to false. 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 equals DB_EMPTY
      DataBushPackedException - contains all exception thrown or caught during updating element