Class ActiveAlarm<T>


public class ActiveAlarm<T> extends Object
Keeps track of the alarm for one parameter or event.

This will only exist for an alarm that has been triggered. A parameter that has limits definition but never had an out of limits value, will not have an active alarm.

Note: generics parameter T can effectively be either ParameterValue or Db.Event

  • Constructor Details

    • ActiveAlarm

      public ActiveAlarm(T pv, boolean autoAck, boolean latching)
  • Method Details

    • isAutoAcknowledge

      public boolean isAutoAcknowledge()
    • isAcknowledged

      public boolean isAcknowledged()
    • getId

      public int getId()
    • getAckMessage

      public String getAckMessage()
    • triggered

      public boolean triggered()
    • clear

      public void clear(String username, long time, String message)
    • trigger

      public void trigger()
      Trigger the alarm if not already triggered
    • acknowledge

      public void acknowledge(String username, long ackTime, String message)
      Acknowledge the alarm. This method does nothing if the alarm is already acknowledged.
      username -
      ackTime -
      message -
    • processRTN

      public boolean processRTN(long time)
      Called when the process returns to normal (i.e. parameter is back in limits)
      true if the alarm has been updated
    • reset

      public void reset(String username, long time, String message)
      Called when the operator resets a latching alarm
    • shelve

      public void shelve(String username, String message, long shelveDuration)
    • isShelved

      public boolean isShelved()
    • unshelve

      public void unshelve()
    • getShelveUsername

      public String getShelveUsername()
    • getShelveTime

      public long getShelveTime()
    • getShelveMessage

      public String getShelveMessage()
    • getShelveDuration

      public long getShelveDuration()
    • isNormal

      public boolean isNormal()
    • getShelveExpiration

      public long getShelveExpiration()
    • isProcessOK

      public boolean isProcessOK()
    • isTriggered

      public boolean isTriggered()
    • getClearTime

      public long getClearTime()
    • getUsernameThatShelved

      public String getUsernameThatShelved()
    • getClearMessage

      public String getClearMessage()
    • getUsernameThatCleared

      public String getUsernameThatCleared()
    • getUsernameThatAcknowledged

      public String getUsernameThatAcknowledged()
    • getAcknowledgeTime

      public long getAcknowledgeTime()
    • getTriggerValue

      public T getTriggerValue()
    • getCurrentValue

      public T getCurrentValue()
    • setCurrentValue

      public void setCurrentValue(T value)
    • getMostSevereValue

      public T getMostSevereValue()
    • incrementValueCount

      public void incrementValueCount()
    • getValueCount

      public int getValueCount()
    • incrementViolations

      public void incrementViolations()
    • getViolations

      public int getViolations()
    • toString

      public String toString()
      toString in class Object
    • setMostSevereValue

      public T setMostSevereValue(T mostSevereValue)