XML for Trigger / Action Processing

Overview

The sequence of triggers describe the conditional evaluation of transformations of Measurement value and quality, as well as the generation of events.

The sequence of triggers are evaluated in order. Triggers may have as one of their side effects that no further triggers will be processed, at which point the rest of the sequence is ignored.

An action is only taken when the current value of the trigger condition and the previous value match the ActivationType.

Activation

Activation types describe the current state of trigger conditions, taking into account both the current value and previous value.

Previous State Current State Activation Matched By
true true HIGH HIGH
false true RISING RISING, TRANSITION, HIGH
true false FALLING FALLING, TRANSITION, LOW
false false LOW LOW

Example of activating when high:

<!--
    Value 1: 0     Condition: LOW         Action not activated.
    Value 2: 1     Condition: HIGH        Action activated.
-->
<matchValue intValue="1">
    <event eventType="SawAOne" activation="HIGH"/>
</matchValue>

Example of a rising activation:

<!--
    Value 1: 12.6    Condition: LOW         Action not activated.
    Value 2: 9.2     Condition: RISING      Action activated.
    Value 3: 9.5     Condition: HIGH        Action not activated.
-->
<range low="10.0" high="20.0">
    <event eventType="OutOfNominal" activation="RISING"/>
</range>

Trigger Types

Always

A condition that is always triggered. Used to create processing steps that are always taken.

Example:

<always>
  <!-- actions, condition is always 'high' -->
</always>

Filter

Describes a condition that triggers when a new Measurement has the same value and quality as the most recent Measurement that did not trigger the condition.

Optionally, a deadband can be provided to suppress minor changes in analog values.

Example:

<filter>
  <!-- actions, condition is 'high' when values are duplicated -->
</filter>
<filter deadband="0.5">
  <!-- actions, condition is 'high' when values are duplicated or within deadband -->
</filter>

MatchValue

Condition triggered when a Measurement matches the specified value.

Example:

<matchValue stringValue="ExampleString">
  <!-- actions, condition is 'high' when a Measurement is a string value and matches exactly -->
</matchValue>
<matchValue booleanValue="true">
  <!-- actions, condition is 'high' when a Measurement is a boolean value and matches -->
</matchValue>
<matchValue intValue="1">
  <!-- actions, condition is 'high' when a Measurement is an integer value and matches -->
</matchValue>

Range

Describes boundary conditions for analog values. Can include both upper and lower limits, or just one of either.

The nominal range is defined to be above the lower limit and below the

When the condition had been previously triggered (the value was outside of the nominal range), the optional deadband field describes how far the value must return within the nominal range to no longer be triggering the condition. This can be used to prevent a value oscillating near the limit from repeatedly triggering the condition.

Example:

<range low="10.0">
  <!-- actions, condition is 'high' when analog value is less than 10.0 -->
</range>
<range high="20.0">
  <!-- actions, condition is 'high' when analog value is greater than 20.0 -->
</range>
<range low="10.0" high="20.0" deadband="0.5">
  <!-- actions, condition is 'high' when analog value is less than 10.0 or greater than 20.0,
            with a deadband as described above -->
</range>

Action Types

Suppress

Type of action that prevents the Measurement from being stored or published.

Example:

<suppress activation="HIGH"/>

Strip Value

Type of action that strips the value of the Measurement before it is stored/published.

Example:

<stripValue activation="HIGH"/>

Set Boolean Value

Type of action that sets the Measurement value to the specified boolean value.

Example:

<setBool value="true" activation="HIGH"/>
<setBool value="false" activation="HIGH"/>

Event

Type of action that publishes an Event related to the Measurement's Point.

The 'eventType' attribute associates the generated Event with system event configuration.

Example:

<event eventType="OutOfNominal" activation="HIGH"/>

Scale

Type of action that performs a linear transformation on the analog value of the Measurement.

Has scale and offset attributes. If the original analog value is x, the final value of the Measurement will be:

scale * x + offset

Integer values can be forced to floating point values using the 'forceToDouble' attribute, which defaults to 'false'.

Example:

<scale scale="0.1" offset="100" activation="HIGH"/>
<scale scale="100" offset="0.5" forceToDouble="true" activation="HIGH"/>

Boolean Mapping

Type of action that transforms a boolean Measurement value to a string value.

Example:

<boolMapping falseString="OFF" trueString="ON" activation="HIGH"/>

Integer Mapping

Type of action that transforms an integer Measurement value to a string value.

Example:

<integerMapping activation="HIGH">
    <mapping fromInteger="0" toString="OFF"/>
    <mapping fromInteger="1" toString="ON"/>
    <mapping fromInteger="3" toString="ERROR"/>
</integerMapping>

Full Examples

Analog Point

<analog name="AnalogPointA" unit="V">
    <type name="Point"/>
    <triggers>
        <filter deadband="0.1">
            <suppress activation="HIGH"/>
        </filter>
        <always>
            <scale scale="0.1" offset="0" activation="HIGH"/>
        </always>
        <range low="118.5" high="121.5" deadband="0.1">
            <event eventType="OutOfNominal" activation="RISING"/>
            <event eventType="ReturnToNominal" activation="FALLING"/>
        </range>
    </triggers>
</analog>

Status Point

<status name="StatusPointB" unit="status">
    <type name="Point"/>
    <triggers>
        <filter>
            <suppress activation="HIGH"/>
        </filter>
        <always>
            <boolMapping falseString="OPEN" trueString="CLOSED" activation="HIGH"/>
        </always>
    </triggers>
</analog>