An important element of any visualization interface is the user notification about the violation — alarming. To simplify the perception, but also in mind the close connectivity of visualization and notification (typically notification is amplified with the visualization) it is decided to integrate the interface of a notification in the visualization interface. To do this, all the widget provides two additional attributes (of the session level): "alarm" and "alarmSt". Attribute "alarm" is used to form the signal by the widget, according to his logic, and attribute "alarmSt" is used to control the signaling fact of the branch of the tree of the session of the project.
Attribute "alarm" is a line and has the following format: "
{lev}|{categ}|{message}|{type}|{tp_arg}"
Where:
- lev — signaling (alarm) level; number from 0 to 255;
- categ — alarm category; parameter of the acquisition subsystem, object, path, or their combination;
- message — signaling (alarm) message;
- type — type of notification, is formed as a the integer number (0...7), which contains the flags of notification methods; typical notification methods:
- 1 — visual;
- 2 — beep tone, is frequently made through the PC-speaker;
- 4 — sound signal from the sound file or the speech synthesis, and if in the tp_arg the name of the resource of the sound file is specified, then play it, or in other case the speech synthesis from the text specified in message is made.
- tp_arg — argument of the type; it is used in the case of the audible signal to indicate the resource of the sound alarm (file of the sound format).
Attribute "alarmSt" is an integer number that represents the maximum alarm level and the fact of the quittance of the branch of the tree of the session of the project. Format of the number is as follows:
- first bite (0...255) characterizes the level of the alarm of the branch;
- the second byte indicates the type of notification (as well as in the attribute "alarm");
- the third byte indicates the type of notification without quittance (as well as in the attribute "alarm");
- the four byte has special appointment, assigns different bites
- bit 0 — indicates, by sets, to quittance fact of notification into first byte;
- bit 1 — indicates, by sets it and the bit 0, to the quittance return — enable back the quittance.
Alarm formation and receipt of it by the visualizer.
The alarm formation is performed by the widget by setting its own attribute "alarm" in appropriate way and in accordance with it the attribute "alarmSt" of current and the parent widget is set. Visualizers receive notification of the alarm using a standard mechanism for notifications of the changes of attributes of widgets.
Taking into account that the processing of conditions of the signaling is made in the widgets, the pages containing the objects of signaling should be performed in the background, regardless of their openness to the moment. This is done by setting a flag of the background execution of the page.
Although the mechanism of signaling is built in the visualization area the possibility of formation of visual signaling elements remains, for example by creating the page that will never be opened.
Quittance
Quittance is process of accepting the violation(s) to mind, disabling the notification and action to remove the violation(s). In the display of user's interface the quittance assume only the notification disable.
Quittance performs by specifying the root of the branch of the widgets and the types of notification. This allows to make quittance on the side of visualizer both as by groups, for example by the signaling objects as well as individually by the objects. It is possible to independently quittance different types of alarms. Setting of the quittance is made by the simple modification of the attribute "alarmSt".
Example of the script to work with the signals gives below:
External notification methods
A first and a typical method of notifications is display's light notification by alarm colors and its dynamic about proper visual elements, which always presents and does not require of specific configuration. But often we need for an external type notification, for example: external lamp, PC buzzer or "howler", arbitrary sound, synthesized speech and etc.
For the possibility of implements the external notification methods and the accorded notification types are free described for the visualization server and same visualizers. On the visualization server side describes for forming/getting the notification resource and same notification. On the visualizers side describes a notification by the resources from the visualization server.
The external notifications describes on main page by attributes of text type:
Description of rules and scenarios of notifications performs with user attributes of text type for pages of the visualization project, which applies at the page open. That is potentially for each opening page there possible describe self rules of notifications but typically here enough to describe a generic rules of notification on the main project's page, which open once and doesn't close in work:
- For the visualization server/engine by the attribute "notify{N}" into the format:
- For a visualizer by the attribute "notifyVis[Vision|WebVision]{N}" into the format:
Flags:
- notify[{DL}] — enables notification with repeat by time DL, if the set; for DL = 0 the repeat made once.
- resource — request-form (force) the notification resource from the visualization server, can be an audio file, a text or other data for the notification produce.
- queue — the notification resources appoint not only by global alarming sign and the quittance but follow to the priority queue of sources of the notification-resources. The queue forms on the visualization server side and for the visualizers set need of working with it at the resources request.
- qMergeMess — merging the notifications into the queue by equality its messages.
- quittanceRet — possibility of a visualizer for a quittance recall-return ie in fact the notification enable back.
The exchanging variables:
- en[0,1] — the notification enable (1) or disable (0);
- doNtf[0,1] — call the script for the notification;
- doRes[0,1] — call the script for the resource form;
- res — the content or the content's file name (for external scripts) of the resource;
- mess — the message-parameters for the resource and the notification form.
- lang — the language of current user or system.
The examples and comments to work of typical notification methods:
- Beep (buzzer) on a visualizer or the visualization server side:
- alarm = "10|Prm||0x02"
- notifyVisVision1 | notify1 =
- notifyVisVision1 | notify1 =
- Repeating play for ready audio file, one common, on a visualizer or the visualization server side:
- alarm = "10|Prm||0x04"
- notify2 | notifyVisVision2 =
- notify2 | notifyVisVision2 =
- Play an individual audio file for the source, on the visualization server side:
- alarm = "10|Prm||0x04|res:al_prm1"
- notify2 =
- Speech synth for an individual message for the source, on a visualizer side:
- alarm = "10|Prm|Text message for the speech synth|0x04"
- notify2 =
- Once audio file prepare and playing that on a visualizer or the visualization server side:
- alarm = "10|Prm||0x04"
- notify2 =
- Prepare an individual audio file for the source of notification through the speech synth, on a visualizer or the visualization server side:
- alarm = "10|Prm|Text message for the speech synth|0x04"
- notify2 =