JSup - Forlani

JSup alarm definition (Draft)

Alarm common

The priority of an alarm is a number from 1 to 99; 1 is the highest (most important) alarm priority.
See JSup Alarm suppression.
See JSup Alarm disabling.
See JSup Alarm mask and filter.

The alarm description, by default, is the tag description. A custom alarm description can be defined (and localized) via tag properties with replacement %n% where:

Programmatically calculated description can be provided to tag array or bit field alarm. A special syntax in the (middle of) the custom alarm description can be used to invoke a code that returns the alarm description, given the alarm tag.
%JavaCodeFunctionForTag javaCodeFunctionName%
Will be replaced with the value of the given JavaCode functions, that must return a String value and must have a single TagRef parameter, where a reference to the tag instance (array element, bit field also) the alarm is related to.
%callForTag full.package.class.methodName%
Will be replaced with the value of the given static Java functions, that must return a String value and must have a single TagRef parameter, where a reference to the tag instance (array element, bit field also) the alarm is related to. This can be useful to invoke library class methods defined in JavaCode imports (see JSup Application properties)

For example, in the properties of a boolean alarm tag array can be defined a single property:

@B=Unclosed switch %JavaCodeFunctionForTag descAllarm%

The JavaCode functions String descAllarm( TagRef tag ) {...} will be invoked for every tag array element.

Simple tag alarm

Boolean tag alarm

In the tag dialog, the Alarm when frame select

Click the Description button to enter/edit a custom boolean alarm description in the tag properties.

Numeric tag alarm

For a numeric tag 4 value limit alarms can be defined:

For each of these alarm a value limit must be defined. The limit can be a constant value or a calculated expression based on (other) tag(s) value(s).

Numeric tags can also be defined with temporal variation alarms:

For each of these alarms a constant or variable (tag or calculated math expression) variation rate limit (Delta T1) is monitored over a time interval (constant, in second).
Various parameter can refine the behaviour of the alarm:

Tag array alarms

Tag array elements (boolean or numeric) can be defined as alarm. Array element alarm descriptions can be programmatically provided (as described above) or specified in the tag array properties like:

@B_2=description for boolean alarm related of tag[2]
@H_0=description for numeric H alarm related of tag[0]
@B_1_5=description for boolean alarm related of tag[1,5]
@LL_3_2_4=description for numeric LL alarm related of tag[3,2,4]

Auto acknowledgment

Alarms can be defined to be auto acknowledged when they turn to normal.
This special behavior can be defined by setting to true the autoAckOnNormal property (in tag, tag class or alarm group properties).
In this way the alarm acknowledgment is required only while the alarm is active; when the alarm returns to normal, acknowledgment is required no more.

Therefore the alarm state Normal unacknowledged ("N-Unack") is suppressed and the alarm can only be in one of the following states:


A constant 1/true (or 0/false) can be used or a {Math Expression} can be provided (between brace parentesies) and these symbols are available:

A JavaCode functions can be called passing the above symbols as parameters if required.
For example defining the property as:
autoAckOnNormal={ autoAck( thisTag, thisAlarmUId, activeFrom) }
then the booelan JavaCode function called autoAck defined with the parameter: TagRef tag, String alarnUId, long activeFrom is called when the alarm returns to normal state and it will return true if the alarm is to be auto acknoledged.

If the acknowledge is not required during the night an expression like following can be defined:
autoAckOnNormal={ ($Hour >= 20) | ($Hour <= 7) }
The usage of a JavaCode functions is to be prefered for maintanance reasons.