Class ValueDiffAlarmProcessor

All Implemented Interfaces:
PropertyChangeListener, EventListener, ValueProcessor

public class ValueDiffAlarmProcessor extends DefaultAlarmProcessor

ValueDiffAlarmProcessor class.

Author:
igor@scictrl.com
  • Constructor Details

    • ValueDiffAlarmProcessor

      public ValueDiffAlarmProcessor()

      Constructor for ValueDiffAlarmProcessor.

  • Method Details

    • configure

      public void configure(Record record, org.apache.commons.configuration.HierarchicalConfiguration config)
      Configures the internals of value processor, provides reference to parent record and to configuration with root inside processor tag. Parent record is not yet initialized, so does not have reference to Database, the Database reference will be available during activate call.
      Specified by:
      configure in interface ValueProcessor
      Overrides:
      configure in class DefaultAlarmProcessor
      Parameters:
      record - the parent record.
      config - configuration with room inside processor tag.
    • activate

      public void activate()
      Record has now reference to Database. processor might want to connect to other records on this server or PVs on other servers. This can not be done until all records from configuration has been loaded. Call to this method signals to the processor that records has been loaded and linking to other values can be commenced.
      Specified by:
      activate in interface ValueProcessor
      Overrides:
      activate in class DefaultAlarmProcessor
    • propertyChange

      public void propertyChange(PropertyChangeEvent evt)
      Specified by:
      propertyChange in interface PropertyChangeListener
      Overrides:
      propertyChange in class DefaultAlarmProcessor
    • updateAlarmStatus

      public void updateAlarmStatus()

      Alarm processor should check connections and other parameters and update alarm status.

      This method should be called by processor itself, for example from PropertyChange update loop.

      As well could be called by asynchronous update loop, which does the supress_time handling.

      Overrides:
      updateAlarmStatus in class DefaultAlarmProcessor
    • getTimeWindow

      public long getTimeWindow()

      Getter for the field timeWindow.

      Returns:
      a long
    • getValueWindow

      public double getValueWindow()

      Getter for the field valueWindow.

      Returns:
      a double