Package org.yamcs.alarms
Class ActiveAlarm<T>
java.lang.Object
org.yamcs.alarms.ActiveAlarm<T>
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
acknowledge
(String username, long ackTime, String message) Acknowledge the alarm.void
long
long
int
getId()
long
long
long
int
int
void
void
boolean
boolean
boolean
isNormal()
boolean
boolean
boolean
boolean
processRTN
(long time) Called when the process returns to normal (i.e. parameter is back in limits)void
Called when the operator resets a latching alarmvoid
setCurrentValue
(T value) setMostSevereValue
(T mostSevereValue) void
toString()
void
trigger()
Trigger the alarm if not already triggeredboolean
void
unshelve()
-
Constructor Details
-
ActiveAlarm
-
-
Method Details
-
isAutoAcknowledge
public boolean isAutoAcknowledge() -
isAcknowledged
public boolean isAcknowledged() -
getId
public int getId() -
getAckMessage
-
triggered
public boolean triggered() -
clear
-
trigger
public void trigger()Trigger the alarm if not already triggered -
acknowledge
Acknowledge the alarm. This method does nothing if the alarm is already acknowledged.- Parameters:
username
-ackTime
-message
-
-
processRTN
public boolean processRTN(long time) Called when the process returns to normal (i.e. parameter is back in limits)- Returns:
- true if the alarm has been updated
-
reset
Called when the operator resets a latching alarm -
shelve
-
isShelved
public boolean isShelved() -
unshelve
public void unshelve() -
getShelveUsername
-
getShelveTime
public long getShelveTime() -
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
-
getClearMessage
-
getUsernameThatCleared
-
getUsernameThatAcknowledged
-
getAcknowledgeTime
public long getAcknowledgeTime() -
getTriggerValue
-
getCurrentValue
-
setCurrentValue
-
getMostSevereValue
-
incrementValueCount
public void incrementValueCount() -
getValueCount
public int getValueCount() -
incrementViolations
public void incrementViolations() -
getViolations
public int getViolations() -
toString
-
setMostSevereValue
-