Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Шаблон текста сообщения (поле message), может содержать следующие макросы:

  • %1 - описание логической схемы;

  • %2 - состояние элементов логической схемы, включенных в условия IF;

  • %3 - дата и время срабатывания логической схемы;

  • %4 - имя логической схемы;

  • %5{id} - имя датчика (параметризируемый);

  • %6{id} - состояние датчика (параметризируемый);

  • %7{id} - значение датчика (параметризируемый);

  • %8 - вывод индекса элемента приведшего к последнему изменению состояния группы/модуля/системы.

Макросы вычисляются на момент отправки уведомления. Отправляемый текст сообщения формируется из шаблона сообщения, при этом макросы шаблона сообщения заменяются на результат вычисления этих макросов в одинарных кавычках.

Макросы %5, %6, %7 имеют возможность параметризации по идентификатору элемента {id}. Т.е. для этих макросов возможно указать конкретный элемент, для которого будет вычислен макрос. В качестве параметра, определяющего элемент, передается идентификатор элемента. Идентификатор элемента помещается в фигурных скобках {idнепосредственно после имени макроса.

Пример вычисления макросов:

%5{201001} — выводит имя элемента с id=201001 - 'sc470-0192-internal T°C';

%6{201001} — выводит состояние элемента с id=201001 - 'normal';

%7{201001} — выводит значение элемента с id=201001 - '27.4'.

В случае если элемент с указанным идентификатором не найден, в текст сообщения вставляется строка — 'id=xxxx not found'.

В случае, если параметр {id} не задан, в текст сообщения вставляется значение, вычисленное для элемента, инициировавшего срабатывание логической схемы.

Макрос %8 выводит значение идентификатора датчика (не группы и не модуля), изменение состояния которого привело к срабатыванию логической схемы. Выводится идентификатор именно датчика сработавшего самостоятельно, в составе группы или в составе модуля включенного в логическую схему, а не последнего элемента, которым может быть и группа и модуль.

Если датчик включен в логическую схему непосредственно (не через группу и не через модуль), то это будет тотже датчик имя, состояние и значение которого выводятся макросами %5, %6 и %7 (без параметризации через скобки {}). Если в логическую схему включена группа/модуль, то по этим (%5, %6, %7) макросам выводятся значения группы/модуля, а макрос %8 позволяет определить именно датчик внутри группы/модуля.

Макрос можно вкладывать в качестве параметра в макросы %5{}, %6{}, и %7{} (например %6{%8} выведет текущее состояние данного датчика).

Определяется только последний датчик приведший к изменению состояния группы/модуля, но датчиков в положении определяющим состояние группы/модуля может быть несколько.

Пример:

Логика1 срабатывает на Группу1 в состоянии Warning.

Группа1 находится в состоянии Alarm, и состоит из:

Датчик1 в состоянии Alarm,

Датчик2 в состоянии Warning,

Датчик3 в состоянии Warning.

Датчик1 переходит в сотояние Normal.

Группа1 переходит в состояние Warning и срабатывает Логика1.

Макрос %8 выдаст идентификатор Датчика1.

The message text template (the message field) can contain the following macros:

...

  • %1 - a description of the logic scheme;

...

  • %2 - state of elements of the logic

...

  • scheme included in the IF conditions;

...

  • %3 - date and time of operation of the logic

...

  • scheme;

...

  • %4 - name of the logic scheme;

...

  • %5{id} - the name of the sensor (parameterizable);

...

  • %6{id} - the status of the sensor (parameterizable);

...

  • %7{id} - the value of the sensor (parameterizable);

...

  • %8 - output of the index of the element leading to the last change in the status of the group / module / system.


Macros are calculated at the time of notification. The sent message text is formed from the message template, while the message template macros are replaced with the result of computing these macros in single quotes.

Macros

...

%5,

...

%6,

...

%7 have the option of parameterization by the identifier of the element {id}.

...

Thus. for these macros it is possible to specify a specific element for which the macro will be calculated. The element ID is passed as the parameter that defines the element. The identifier of the element is placed in curly braces {id} immediately after the name of the macro.

Example of computing macros:

...

%5{201001}

...

— выводит имя элемента с id=201001 - 'sc470-0192-internal

...

T°C';

...

%6{201001}

...

— выводит состояние элемента с id=201001 - 'normal';

...

%7{201001}

...

— выводит значение элемента с id=201001 - '27.4'.

If the element with the specified identifier is not found, the string

...

'id=xxxx

...

 not found'

is inserted into the message text.

If the {id} parameter is not specified, a value calculated for the element

...

triggering of the logic

...

scheme is inserted into the message text.

...


Macro %8 displays the value of the identifier of the sensor (not a group

...

and not a module), the change in state of which led to the activation of the logic

...

scheme. The identifier of the sensor that was triggered independently, as part of a group or as part of a module included in the logic

...

scheme, is

...

displayed, and not the last element, which can be both a group and a module.

If the sensor is included in the logic scheme directly (not through the group and not through the module), then it will be the same sensor, whose name

...

, state and value are output by

...

macros %5, %6 and %7 (without parameterization via parentheses {}). If the group / module is included in the logic scheme, then by these (

...

%5,

...

%6,

...

%7) macros the values ​​of the group / module are displayed, and the

...

macro %8 allows to determine the sensor inside the group / module.

The macro can be nested as a parameter in

...

macros %5{},

...

%6{},

...

and %7{} (for example,

...

%6{

...

%8} displays the current state of this sensor).

Only the last sensor that led to the change in the status of the group / module is determined, but there may be several sensors in the position determining the status of the group / module.

Example:

Logic1 is triggered by Group1 in the Warning state.

Group 1 is in the Alarm state, and consists of:

Sensor1 in the Alarm state,

Sensor2 is in the Warning state,

Sensor3 is in the Warning state.

The

...

Sensor1 changes to the Normal state.

Group1 goes into the Warning state and triggers Logic1.

...

The %8 macro will return the

...

Sensor1 ID.