Class ValueLevelAlarmProcessor

All Implemented Interfaces:
PropertyChangeListener, EventListener, ValueProcessor

public class ValueLevelAlarmProcessor extends DefaultAlarmProcessor

ValueLevelAlarmProcessor class.

Author:
igor@scictrl.com
  • Constructor Details

    • ValueLevelAlarmProcessor

      public ValueLevelAlarmProcessor()

      Constructor for ValueLevelAlarmProcessor.

  • Method Details

    • 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
    • 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.
    • getDefaultSeverity

      public gov.aps.jca.dbr.Severity getDefaultSeverity()

      Getter for the field defaultSeverity.

      Returns:
      the defaultSeverity
    • getDefaultStatus

      public gov.aps.jca.dbr.Status getDefaultStatus()

      Getter for the field defaultStatus.

      Returns:
      the defaultStatus
    • getLowerAlarmLimit

      public double getLowerAlarmLimit()

      Getter for the field lowerAlarmLimit.

      Returns:
      the lowerAlarmLimit
    • getLowerAlarmSeverity

      public gov.aps.jca.dbr.Severity getLowerAlarmSeverity()

      Getter for the field lowerAlarmSeverity.

      Returns:
      the lowerAlarmSeverity
    • getLowerAlarmStatus

      public gov.aps.jca.dbr.Status getLowerAlarmStatus()

      Getter for the field lowerAlarmStatus.

      Returns:
      the lowerAlarmStatus
    • getLowerWarningLimit

      public double getLowerWarningLimit()

      Getter for the field lowerWarningLimit.

      Returns:
      the lowerWarningLimit
    • getLowerWarningSeverity

      public gov.aps.jca.dbr.Severity getLowerWarningSeverity()

      Getter for the field lowerWarningSeverity.

      Returns:
      the lowerWarningSeverity
    • getLowerWarningStatus

      public gov.aps.jca.dbr.Status getLowerWarningStatus()

      Getter for the field lowerWarningStatus.

      Returns:
      the lowerWarningStatus
    • getPrecision

      public double getPrecision()

      Getter for the field precision.

      Returns:
      the precision
    • setPrecision

      public void setPrecision(double precision)

      Setter for the field precision.

      Parameters:
      precision - a double
    • getUpperAlarmLimit

      public double getUpperAlarmLimit()

      Getter for the field upperAlarmLimit.

      Returns:
      the upperAlarmLimit
    • getUpperAlarmSeverity

      public gov.aps.jca.dbr.Severity getUpperAlarmSeverity()

      Getter for the field upperAlarmSeverity.

      Returns:
      the upperAlarmSeverity
    • getUpperAlarmStatus

      public gov.aps.jca.dbr.Status getUpperAlarmStatus()

      Getter for the field upperAlarmStatus.

      Returns:
      the upperAlarmStatus
    • getUpperWarningLimit

      public double getUpperWarningLimit()

      Getter for the field upperWarningLimit.

      Returns:
      the upperWarningLimit
    • getUpperWarningSeverity

      public gov.aps.jca.dbr.Severity getUpperWarningSeverity()

      Getter for the field upperWarningSeverity.

      Returns:
      the upperWarningSeverity
    • getUpperWarningStatus

      public gov.aps.jca.dbr.Status getUpperWarningStatus()

      Getter for the field upperWarningStatus.

      Returns:
      the upperWarningStatus
    • isEnabled

      public boolean isEnabled()

      isEnabled.

      Returns:
      a boolean
    • setEnabled

      public void setEnabled(boolean enabled)
      Sets this processor to be enabled. If false, it will always be alarm false and on default severity and status.
      Parameters:
      enabled - a boolean
    • 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
    • setLowerAlarmLimit

      public void setLowerAlarmLimit(double lowerAlarmLimit)

      Setter for the field lowerAlarmLimit.

      Parameters:
      lowerAlarmLimit - a double
    • setLowerWarningLimit

      public void setLowerWarningLimit(double lowerWarningLimit)

      Setter for the field lowerWarningLimit.

      Parameters:
      lowerWarningLimit - a double
    • setUpperAlarmLimit

      public void setUpperAlarmLimit(double upperAlarmLimit)

      Setter for the field upperAlarmLimit.

      Parameters:
      upperAlarmLimit - a double
    • setUpperWarningLimit

      public void setUpperWarningLimit(double upperWarningLimit)

      Setter for the field upperWarningLimit.

      Parameters:
      upperWarningLimit - a double