Changes for page 7. Events Setup

Last modified by Iaroslav Platonov on 2026/06/09 11:03

From version 64.2
edited by Lana
on 2026/02/06 05:05
Change comment: Update document after refactoring.
To version 65.1
edited by Iaroslav Platonov
on 2026/06/09 11:03
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.Lana
1 +XWiki.Iaroslav
Content
... ... @@ -1,552 +1,690 @@
1 -= CONTENT =
1 +{{html clean="false"}}
2 +<style>
3 +.doc-content h1::before,.doc-content h2::before,
4 +.doc-content h3::before,.doc-content h4::before,
5 +.doc-content h5::before,.doc-content h6::before { content:none !important; display:none !important; }
6 +.doc-content { counter-reset:none !important; }
7 +#rn-prog { position:fixed;top:0;left:0;height:3px;width:0;background:#005AB4;z-index:9999;pointer-events:none; }
8 +.doc-wrap { position:relative; }
9 +.doc-content { margin-right:224px;border-left:1px solid #E8E8E8;border-right:1px solid #E8E8E8;padding:0 32px; }
10 +.doc-toc { position:absolute;top:0;right:0;width:200px;font-size:12.5px;line-height:1.55;padding:20px 0 20px 16px; }
11 +.doc-toc.is-fixed { position:fixed;width:200px;overflow-y:auto;z-index:10; }
12 +.toc-header { display:flex;justify-content:space-between;align-items:center;margin-bottom:10px; }
13 +.toc-header strong { font-size:13px;font-weight:700;color:#222; }
14 +.toc-toggle { background:none;border:none;cursor:pointer;color:#555;font-size:14px;padding:0 2px;line-height:1; }
15 +.toc-toggle:hover { color:#222; }
16 +.doc-toc ul { list-style:none;margin:0;padding:0; }
17 +.doc-toc li { margin:0; }
18 +.doc-toc a { display:block;padding:3px 0;color:#555;text-decoration:none;border-left:2px solid transparent;transition:color .12s; }
19 +.doc-toc a:hover { color:#222;text-decoration:underline; }
20 +.doc-toc a.toc-on { color:#222;font-weight:700;border-left:2px solid #005AB4;padding-left:5px; }
21 +.tl1 > a { font-weight:600;color:#222; }
22 +.tl2 > a { padding-left:14px; }
23 +.tl3 > a { padding-left:26px;font-size:12px; }
24 +.doc-content h2 { font-size:1.15em;font-weight:700;color:#222;margin:36px 0 10px 0;display:flex;align-items:baseline;gap:7px;scroll-margin-top:16px; }
25 +.doc-content h3 { font-size:1em;font-weight:700;color:#222;margin:22px 0 8px 0;display:flex;align-items:baseline;gap:6px;scroll-margin-top:16px; }
26 +.doc-content h4 { font-size:.93em;font-weight:700;color:#222;margin:14px 0 6px 0;scroll-margin-top:16px; }
27 +.doc-content p { font-size:.93em;color:#333;line-height:1.75;margin:0 0 12px 0; }
28 +.doc-content ul,.doc-content ol { font-size:.93em;color:#333;line-height:1.75;margin:0 0 12px 0;padding-left:24px; }
29 +.doc-content li { margin-bottom:4px; }
30 +.doc-content strong { color:#222; }
31 +.doc-content code { background:#f5f5f5;border:1px solid #E8E8E8;border-radius:3px;padding:1px 5px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:.82em;color:#222;line-height:1; }
32 +.anchor-icon { color:#E8E8E8;text-decoration:none;opacity:0;transition:opacity .15s;vertical-align:middle;margin-left:4px;display:inline-flex;align-items:center; }
33 +h2:hover .anchor-icon,h3:hover .anchor-icon { opacity:1; }
34 +.anchor-icon:hover { color:#005AB4; }
35 +.note { border-radius:6px;padding:12px 16px;margin:14px 0;border:1px solid transparent; }
36 +.note-info { background:#e1f1f9 !important;border-color:#b3d4ee !important;border-left:4px solid #005AB4 !important; }
37 +.note-warning { background:#fff4ec !important;border-color:#f5cba7 !important;border-left:4px solid #DD5600 !important; }
38 +.note-tip { background:#e5f3df !important;border-color:#b7dba5 !important;border-left:4px solid #73A839 !important; }
39 +.note-hd { font-weight:700;font-size:.85em;display:flex;align-items:center;gap:5px;margin-bottom:5px; }
40 +.note-info .note-hd { color:#003d80 !important; }
41 +.note-warning .note-hd { color:#a03d00 !important; }
42 +.note-tip .note-hd { color:#3d6b1a !important; }
43 +.note-body { font-size:.875em;color:#222 !important;line-height:1.65; }
44 +.section-index { list-style:disc;padding-left:20px;margin:0 0 20px 0; }
45 +.section-index li { margin-bottom:12px; }
46 +.section-index li a { color:#005AB4;font-weight:600;font-size:.93em;text-decoration:underline; }
47 +.section-index li p { margin:3px 0 0 0;font-size:.875em;color:#333;line-height:1.6; }
48 +.parent-topic { font-size:.82em;color:#555;margin:18px 0 24px 0;border-top:1px solid #E8E8E8;padding-top:10px; }
49 +.parent-topic a { color:#005AB4; }
50 +img.inline-icon { display:inline-block;height:28px;width:auto;vertical-align:middle;border:1px solid #E8E8E8;border-radius:4px;margin:0 3px;box-shadow:0 1px 2px rgba(0,0,0,.08); }
51 +img.inline-icon-sm { display:inline-block;height:20px;width:auto;vertical-align:middle;border:1px solid #E8E8E8;border-radius:3px;margin:0 3px;box-shadow:0 1px 2px rgba(0,0,0,.08); }
52 +.fig { margin:12px auto 24px auto;width:fit-content;max-width:100%; }
53 +.fig img { border-radius:4px 4px 0 0;border:1px solid #E8E8E8;display:block;cursor:zoom-in;max-width:100%;box-shadow:0 1px 4px rgba(0,0,0,.10);transition:box-shadow .15s; }
54 +.fig img:hover { box-shadow:0 3px 12px rgba(0,90,180,.18); }
55 +.fig-cap { font-size:.78em;color:#555;margin:0;padding:5px 8px;background:#f5f5f5;border:1px solid #E8E8E8;border-top:none;border-radius:0 0 4px 4px;display:block;width:100%;box-sizing:border-box; }
56 +#rn-lb { display:none;position:fixed;inset:0;z-index:9998;background:rgba(0,0,0,.8);cursor:zoom-out;align-items:center;justify-content:center; }
57 +#rn-lb.open { display:flex; }
58 +#rn-lb-wrap { position:relative;cursor:default;max-width:92vw;max-height:90vh; }
59 +#rn-lb-wrap img { max-width:100%;max-height:90vh;border-radius:5px;display:block; }
60 +#rn-lb-x { position:absolute;top:-13px;right:-13px;background:#005AB4;color:#fff;width:26px;height:26px;border-radius:50%;border:none;cursor:pointer;font-size:15px;display:flex;align-items:center;justify-content:center; }
61 +#rn-lb-cap { position:fixed;bottom:18px;left:50%;transform:translateX(-50%);color:#ddd;font-size:.78em;background:rgba(0,0,0,.55);padding:3px 12px;border-radius:14px;pointer-events:none; }
62 +#rn-top { position:fixed;bottom:60px;right:60px;z-index:9997;width:36px;height:36px;border-radius:50%;background:#005AB4;color:#fff;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;opacity:0;transform:translateY(8px);transition:opacity .22s,transform .22s;pointer-events:none;box-shadow:0 2px 8px rgba(0,90,180,.3); }
63 +#rn-top.on { opacity:1;transform:translateY(0);pointer-events:auto; }
64 +#rn-top:hover { background:#0066cc; }
65 +.rn-toast { position:fixed;bottom:66px;right:24px;z-index:9999;background:#222;color:#fff;font-size:.74em;padding:4px 11px;border-radius:4px;pointer-events:none;opacity:0;transition:opacity .18s; }
66 +.rn-toast.on { opacity:1; }
67 +.rn-table { width:100%;border-collapse:collapse;margin:8px 0 18px 0;font-size:.82em; }
68 +.rn-table th { background:#f5f5f5;text-align:left;padding:7px 10px;font-size:.78em;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:#555;border-bottom:2px solid #E8E8E8; }
69 +.rn-table td { padding:7px 10px;border-bottom:1px solid #E8E8E8;color:#333;vertical-align:top;line-height:1.6; }
70 +.rn-table tr:last-child td { border-bottom:none; }
71 +.rn-table tr:hover td { background:#f5f5f5; }
72 +.rn-table code { background:#f0f0f0;border:1px solid #ddd;border-radius:3px;padding:1px 4px;font-size:.88em;font-family:Menlo,Monaco,Consolas,monospace; }
73 +.tbl-wrap { overflow-x:auto;margin:8px 0 18px 0; }
74 +.var-badge { display:inline-block;font-family:Menlo,Monaco,Consolas,monospace;font-size:.8em;background:#deeaf7;color:#005AB4;border:1px solid #b3d4ee;border-radius:3px;padding:1px 6px; }
75 +</style>
2 2  
3 -{{toc/}}
77 +<div id="rn-prog"></div>
78 +<div id="rn-lb">
79 + <div id="rn-lb-wrap">
80 + <button id="rn-lb-x" onclick="closeLightbox()">&#10005;</button>
81 + <img id="rn-lb-img" src="" alt=""/>
82 + </div>
83 + <div id="rn-lb-cap"></div>
84 +</div>
85 +<button id="rn-top" onclick="window.scrollTo({top:0,behavior:'smooth'})" title="Back to top">
86 + <svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor"><path d="M8 4l5 5H3z"/></svg>
87 +</button>
88 +<div class="rn-toast" id="rn-toast">Link copied &#10003;</div>
4 4  
5 -= 1. INTRODUCTION =
90 +<div class="doc-wrap">
91 +<div class="doc-content">
6 6  
7 -CENTO is a multifunctional software platform for data collection, processing and display. This Manual describes the user tool in CENTO "Events".
93 + <ul class="section-index">
94 + <li><a href="#s-intro">1. Introduction</a>
95 + <p>Overview of the Events tool — purpose, capabilities, and key concepts.</p></li>
96 + <li><a href="#s-events">2. CENTO Events</a>
97 + <p>Event editor, creating and editing events via UI or Excel, and flashing on diagrams.</p></li>
98 + <li><a href="#s-notifications">3. Notifications Settings</a>
99 + <p>Configuring email notifications, filter logic, and notification delivery examples.</p></li>
100 + <li><a href="#s-sound-editor">4. Sound Editor</a>
101 + <p>Uploading and managing .mp3 sound files for event alerts.</p></li>
102 + <li><a href="#s-examples">5. Examples of Event Setup</a>
103 + <p>Practical examples: events on tag value change and device status change.</p></li>
104 + <li><a href="#s-annex">Appendix: Formula Reference</a>
105 + <p>Variables and operators available in event condition formulas.</p></li>
106 + </ul>
8 8  
9 -It is assumed that the user is already familiar with the basic elements of the CENTO interface after reading the "User Manual" instructions.
10 10  
11 -"Events" in CENTO are designed to increase the observability of system operation by tracking changes in the system status and process equipment, logging events, and notifying users. Events help the personnel to timely react to changes in the technological process and system operation. To achieve these goals, CENTO offers user notification and acknowledgement features alongside event logging.
109 + <h2 id="s-intro">1. Introduction<a class="anchor-icon" href="javascript:void(0)" onclick="copyAnchor('s-intro')" title="Copy link"><svg width="12" height="12" viewBox="0 0 16 16" fill="currentColor"><path d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"/></svg></a></h2>
12 12  
13 -= 2. CENTO EVENTS =
111 + <p>CENTO is a multifunctional software platform for data collection, processing, and display. This manual describes the <strong>Events</strong> user tool in CENTO.</p>
14 14  
15 -== 2.1. Event editor ==
113 + <p>It is assumed that the user is already familiar with the basic elements of the CENTO interface after reading the User Manual.</p>
16 16  
17 -To go to the **Event editor**, select the item in the main menu:
115 + <p>Events in CENTO are designed to increase the observability of system operation by tracking changes in the system status and process equipment, logging events, and notifying users. Events help personnel react in a timely manner to changes in the technological process and system operation. To achieve these goals, CENTO provides user notification and acknowledgement features alongside event logging.</p>
18 18  
19 -Settings > Events > Event editor.
117 + <h2 id="s-events">2. CENTO Events<a class="anchor-icon" href="javascript:void(0)" onclick="copyAnchor('s-events')" title="Copy link"><svg width="12" height="12" viewBox="0 0 16 16" fill="currentColor"><path d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"/></svg></a></h2>
20 20  
21 -[[image:Screenshot 2025-12-10 at 21.28.44.png||height="318" width="274"]]
119 + <h3 id="s-event-editor">2.1. Event editor<a class="anchor-icon" href="javascript:void(0)" onclick="copyAnchor('s-event-editor')" title="Copy link"><svg width="12" height="12" viewBox="0 0 16 16" fill="currentColor"><path d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"/></svg></a></h3>
22 22  
23 -Fig. 2.1 - Event editor in the CENTO menu
121 + <p>To open the <strong>Event editor</strong>, select from the main menu: <strong>Settings &rarr; Events &rarr; Event editor</strong>.</p>
24 24  
25 -Figure 2.2. shows the interface of the **Event editor.**
123 + <div class="fig">
124 + <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.28.44.png" alt="Event editor in the CENTO menu" style="max-width:100%;" onclick="openLightbox(this)"/>
125 + <p class="fig-cap">Figure 2.1. Event editor in the CENTO menu</p>
126 + </div>
26 26  
27 -[[image:Screenshot 2025-12-10 at 21.29.15.png||height="483" width="1424"]]
128 + <p>Figure 2.2 shows the <strong>Event editor</strong> interface.</p>
28 28  
29 -Fig. 2.2 - Event editor
130 + <div class="fig">
131 + <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.29.15.png" alt="Event editor" style="max-width:100%;" onclick="openLightbox(this)"/>
132 + <p class="fig-cap">Figure 2.2. Event editor</p>
133 + </div>
30 30  
31 -The **Event editor** page provides the option to:
135 + <p>The <strong>Event editor</strong> page provides the following capabilities:</p>
136 + <ol>
137 + <li>Add a new event to the system <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.29.51.png" alt="Add event"/></li>
138 + <li>Activate <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.30.26.png" alt="Activate"/> or disable <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.30.54.png" alt="Disable"/> selected events</li>
139 + <li>Edit <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.32.53.png" alt="Edit"/>, copy <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.33.40.png" alt="Copy"/>, and delete <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.34.05.png" alt="Delete"/> in the <strong>Actions</strong> column</li>
140 + <li>Delete any number of events at once <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.35.15.png" alt="Delete selected"/></li>
141 + <li>Edit the number of records displayed</li>
142 + <li>Search for events by filtering <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.36.03.png" alt="Filter"/> (the filter is located to the right of the table headings)</li>
143 + <li>Edit event configuration <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.36.56.png" alt="Edit configuration"/></li>
144 + <li>Adjust setpoint text <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.37.32.png" alt="Adjust setpoint text"/></li>
145 + </ol>
32 32  
33 -1. Add a new event to the system [[image:Screenshot 2025-12-10 at 21.29.51.png||height="21" width="74"]]
34 -1. Activate [[image:Screenshot 2025-12-10 at 21.30.26.png||height="20" width="108"]] or disable [[image:Screenshot 2025-12-10 at 21.30.54.png||height="20" width="103"]] selected events
35 -1. (((
36 -Edit [[image:Screenshot 2025-12-10 at 21.32.53.png||height="25" width="24"]], copy [[image:Screenshot 2025-12-10 at 21.33.40.png||height="26" width="26"]], and delete [[image:Screenshot 2025-12-10 at 21.34.05.png||height="27" width="27"]]in the "Actions" column
37 -)))
38 -1. (((
39 -Delete any number of events [[image:Screenshot 2025-12-10 at 21.35.15.png||height="22" width="125"]]
40 -)))
41 -1. (((
42 -Edit the number of records to be displayed
43 -)))
44 -1. (((
45 -Search for events of interest by filtering [[image:Screenshot 2025-12-10 at 21.36.03.png||height="32" width="33"]] (the filter is located to the right of the table headings)
46 -)))
47 -1. (((
48 -Edit event configuration [[image:Screenshot 2025-12-10 at 21.36.56.png||height="22" width="86"]]
49 -)))
50 -1. (((
51 -Adjust the setpoint text [[image:Screenshot 2025-12-10 at 21.37.32.png||height="20" width="108"]]
52 -)))
53 53  
54 -== 2.2. Creating and editing an event in web-interface ==
148 + <h3 id="s-event-create">2.2. Creating and editing an event in the web interface<a class="anchor-icon" href="javascript:void(0)" onclick="copyAnchor('s-event-create')" title="Copy link"><svg width="12" height="12" viewBox="0 0 16 16" fill="currentColor"><path d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"/></svg></a></h3>
55 55  
150 + <p>An event can be created manually or automatically. Events are automatically created when the setpoint parameter is enabled. For a detailed description, refer to the Setup Manual.</p>
56 56  
57 -An event can be created manually and automatically. Events are automatically created when the setpoint parameter is enabled. For a detailed description, refer to the "Setup Manual".
152 + <p>The text of setpoints can be edited in the <strong>Event editor</strong> interface. Click the button <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.38.47.png" alt="Adjust setpoint text"/>. The <strong>Setpoint editing</strong> window opens (Figure 2.3), where the wording of setpoints for Triggering and/or Return can be modified, including Upper/Lower warning limit, Upper/Lower alarm limit, and Upper/Lower physical limit.</p>
58 58  
59 -The text of setpoints can be edited in the **Event editor** interface.
154 + <p>One or more variables can be specified in the setpoint triggering message:</p>
155 + <ul>
156 + <li><code>{{.tag_name}}</code> &mdash; tag name</li>
157 + <li><code>{{.tag_code}}</code> &mdash; tag code</li>
158 + <li><code>{{.tag_id}}</code> &mdash; tag ID</li>
159 + <li><code>{{.tag_code_or_id}}</code> &mdash; tag code, or ID if the code is empty</li>
160 + <li><code>{{.tag_limit}}</code> &mdash; setpoint value</li>
161 + <li><code>{{.tag_unit}}</code> &mdash; tag units</li>
162 + <li><code>{{.device_name}}</code> &mdash; name of the device the tag is linked to</li>
163 + </ul>
60 60  
61 -To do this, click on the button [[image:Screenshot 2025-12-10 at 21.38.47.png||height="22" width="119"]]. After that, the **Setpoint editing** window opens (see Fig. 2.3), where the wording of the setpoints for Triggering and/or Return can be modified, such as Upper/Lower warning limit, Upper/Lower alarm limit, and Upper/Lower physical limit.
62 62  
63 -One or more variables can be specified in the setpoint triggering message:
166 + <div class="note note-warning"><div class="note-hd"><span>&#9888;</span> Important</div><div class="note-body">If curly braces or dots are missing when writing these parameters, a validation error will occur. If a non-existent parameter is entered (e.g. <code>{{.tag_name_2}}</code>), the Operating Journal will receive an event of the form: <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.39.52.png" alt="error icon"/> <strong>&lt;no value&gt; &gt; 10</strong>.</div></div>
64 64  
65 -* ~{~{.tag_name}} - tag name;
66 -* ~{~{.tag_code}} - tag code;
67 -* ~{~{.tag_id}} - tag ID;
68 -* ~{~{.tag_code_or_id}} - tag code, if the code is empty, then its ID;
69 -* ~{~{.tag_limit}} - setpoint value;
70 -* ~{~{.tag_unit}} - tag units;
71 -* ~{~{.device_name}} - name of the device to which the tag is linked.
168 + <div class="fig">
169 + <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.40.35.png" alt="Setpoint editing page" style="max-width:100%;" onclick="openLightbox(this)"/>
170 + <p class="fig-cap">Figure 2.3. Setpoint editing page</p>
171 + </div>
72 72  
73 -IMPORTANT: if {figure brackets} or dots are missing when writing these parameters, a validation error will occur.
173 + <p>To create a new event, click the button <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.41.09.png" alt="Add new event"/>. Only an authorized user with appropriate rights can create and edit events.</p>
74 74  
75 -If a parameter with an error (non-existent parameter) is entered, for example: ~{~{.tag_name_2}}, the Operating journal will receive an event of the following type: [[image:Screenshot 2025-12-10 at 21.39.52.png||height="18" width="18"]] **< no value> > 10**.
175 + <p>Figure 2.4 shows the event creation page.</p>
76 76  
77 -[[image:Screenshot 2025-12-10 at 21.40.35.png||height="788" width="874"]]
177 + <div class="fig">
178 + <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.41.54.png" alt="Event editor: creation page" style="max-width:100%;" onclick="openLightbox(this)"/>
179 + <p class="fig-cap">Figure 2.4. Event editor: creation page</p>
180 + </div>
78 78  
79 -Fig. 2.3 - Setpoint editing page
182 + <p>The <strong>Event editor</strong> window contains the following fields:</p>
183 + <ul>
184 + <li><strong>Identifier</strong> &mdash; the sequence number of the event (filled in automatically); can be changed if needed.</li>
185 + <li><strong>Name</strong> &mdash; the name of the event.</li>
186 + <li><strong>Object</strong> &mdash; an object from the CENTO Information Model (IM) to which the event refers. The IM object is selected from a drop-down tree.</li>
187 + <li><strong>Device</strong> &mdash; the device to which the event refers, selected from the drop-down device tree.</li>
188 + <li><strong>Event type</strong> &mdash; switches the event type between &ldquo;Single&rdquo; and &ldquo;With return&rdquo; <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.42.53.png" alt="Event type switch"/>.</li>
189 + <li><strong>Tags</strong> &mdash; the ID of the telemetering tag to which the event belongs.</li>
190 + <li><strong>Message</strong> &mdash; the message text output when the event is triggered.</li>
191 + <li><strong>Formula</strong> &mdash; the condition for the event to be triggered. Click <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.43.51.png" alt="Formula list"/> to open the list of available formulas (see Appendix).</li>
192 + <li><strong>Dead time (ms)</strong> &mdash; delay time in milliseconds before the event is generated. Helps prevent false events caused by intermittent communication failures.</li>
193 + <li><strong>Type</strong> &mdash; a drop-down list for the importance or category of the event.</li>
194 + <li><strong>Acknowledgement</strong> &mdash; a switch to enable user acknowledgement of event notification.</li>
195 + <li><strong>Sound</strong> &mdash; selects a sound for notification from those loaded in the Sound Editor (see section 4). The selected sound can be previewed using the button <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.44.31.png" alt="Play sound"/> to the right of the &ldquo;Sound&rdquo; field.</li>
196 + <li><strong>Before acknowledgement</strong> &mdash; a switch to play the selected sound until the event is acknowledged.</li>
197 + <li><strong>Sound repeats</strong> &mdash; number of repetitions of sound playback when the event occurs.</li>
198 + </ul>
80 80  
81 -To create a new event, click on the button [[image:Screenshot 2025-12-10 at 21.41.09.png||height="24" width="96"]].
82 82  
83 -Only an authorized user with appropriate rights can create and edit events.
201 + <div class="note note-warning"><div class="note-hd"><span>&#9888;</span> Important</div><div class="note-body"><strong>Modern browsers block sound playback by default.</strong> To allow CENTO to play sounds in Chrome:<ol style='margin:6px 0 0 0;padding-left:18px;'><li>Left-click to the left of the address bar (Figure 2.5) and select <strong>Site settings</strong>.</li><li>Go to <strong>Privacy and security &rarr; Site settings &rarr; Additional permissions &rarr; Sound</strong> and select <strong>Allow</strong> (Figure 2.6).</li><li>Refresh the CENTO page.</li></ol></div></div>
84 84  
85 -Fig. 2.4. shows the page for creating a new event.
203 + <div class="fig">
204 + <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.45.18.png" alt="Site settings — opening permissions" style="max-width:100%;" onclick="openLightbox(this)"/>
205 + <p class="fig-cap">Figure 2.5. Site settings — opening permissions</p>
206 + </div>
86 86  
87 -[[image:Screenshot 2025-12-10 at 21.41.54.png||height="606" width="1425"]]
208 + <div class="fig">
209 + <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.48.19.png" alt="Allowing sound playback for the site" style="max-width:100%;" onclick="openLightbox(this)"/>
210 + <p class="fig-cap">Figure 2.6. Allowing sound playback for the site</p>
211 + </div>
88 88  
89 -Fig. Event editor: creation page
213 + <p>After filling in all required fields, click <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.48.55.png" alt="Save"/> and update the configuration (Figure 2.7).</p>
90 90  
91 -The** Event editor** window contains the following fields:
215 + <div class="fig">
216 + <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.49.27.png" alt="Update configuration" style="max-width:100%;" onclick="openLightbox(this)"/>
217 + <p class="fig-cap">Figure 2.7. Update configuration</p>
218 + </div>
92 92  
93 -**Identifier **contains the sequence number of the event (filled in automatically), can be changed if necessary.
220 + <div class="note note-info"><div class="note-hd"><span>&#8505;</span> Note</div><div class="note-body">There are two event types in CENTO: <strong>Single</strong> and <strong>With return</strong>. Events with return are used for important persistent states (e.g. &ldquo;Ground fault in isolated-neutral network&rdquo;). The <em>opening event</em> reports the state start; the <em>closing event</em> reports its end. <strong>Events with return must always be paired</strong> &mdash; the second event always closes the first. Active (unclosed) events are shown in a separate tab of the operational log.</div></div>
94 94  
95 -**Name **is a field for entering the name of the event.
222 + <p>When <strong>With return</strong> is selected as the event type, the Event editor displays additional fields with the heading <strong>With return</strong> (Figure 2.8). These fields are identical to those for the Single event type.</p>
96 96  
97 -**Object **field is used to add an object from the CENTO Information Model (IM), to which the event refers (see "Information Model Setup Manual"). The IM object is selected from the IM drop-down tree.
224 + <div class="fig">
225 + <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.49.59.png" alt="Event editor with &ldquo;With return&rdquo; type" style="max-width:100%;" onclick="openLightbox(this)"/>
226 + <p class="fig-cap">Figure 2.8. Event editor with &ldquo;With return&rdquo; type</p>
227 + </div>
98 98  
99 -**Device **is** **the device to which the event refers is added in this field. The device is selected from the drop-down device tree.
229 + <h3 id="s-event-excel">2.3. Creating and editing events using Excel<a class="anchor-icon" href="javascript:void(0)" onclick="copyAnchor('s-event-excel')" title="Copy link"><svg width="12" height="12" viewBox="0 0 16 16" fill="currentColor"><path d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"/></svg></a></h3>
100 100  
101 -**Event type **switches the event type between "Single" and "With return" [[image:Screenshot 2025-12-10 at 21.42.53.png||height="27" width="135"]].
231 + <p>Events can be configured using Excel files. This function is available at <strong>Settings &rarr; Configuration Files</strong> (Figure 2.9).</p>
102 102  
103 -There are two types of events in CENTO – single and with return events. For system objects, there may be important state that the user should see in the active status (e.g., "Ground in a network with isolated neutral", "Switching on a sectionalizer", "Opening the emergency exit door"). Events reporting this important state are opening events. Events reporting the end of an important object state are closing events. These two types of events are events with return. **Events with return should ALWAYS be paired: the second event ALWAYS closes the first one. **Events in the active state are displayed in a separate tab of the operational log and disappear from there after triggering the closing event. Other events (regardless of their importance) are single events.
233 + <div class="fig">
234 + <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.51.04.png" alt="Import/Export configuration file page" style="max-width:100%;" onclick="openLightbox(this)"/>
235 + <p class="fig-cap">Figure 2.9. Import/Export configuration file page</p>
236 + </div>
104 104  
105 -**Tags **field requires to specify the ID of the telemetering tag to which the event belongs;
238 + <p>To configure events, download the <code>events.xlsx</code> file by clicking <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.51.37.png" alt="Download"/>, then fill in the appropriate cells in a new row in the <strong>Events</strong> tab (Figure 2.10).</p>
106 106  
107 -**Message **is the message text that should be output when the event is triggered;
240 + <div class="fig">
241 + <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.52.08.png" alt="Events tab in events.xlsx" style="max-width:100%;" onclick="openLightbox(this)"/>
242 + <p class="fig-cap">Figure 2.10. Events tab in events.xlsx</p>
243 + </div>
108 108  
109 -**Formula **field is used to enter a formula that describes the condition for the event to be triggered. Clicking on [[image:Screenshot 2025-12-10 at 21.43.51.png||height="28" width="163"]] will open the list of formulas for forming the event. Description of formulas is given in the Appendix.
245 + <p>Fill in the following columns to create an event:</p>
246 + <ul>
247 + <li><strong>Event ID</strong> &mdash; unique event number. Must not duplicate existing IDs in the system.</li>
248 + <li><strong>Name</strong> &mdash; event name.</li>
249 + <li><strong>Event type</strong> &mdash; <code>one_position</code> or <code>two_position</code>.</li>
250 + <li><strong>Event status</strong> &mdash; <code>1</code> = enabled, <code>0</code> = disabled.</li>
251 + <li><strong>Device ID</strong> &mdash; device identifier the event refers to.</li>
252 + <li><strong>Device</strong> &mdash; auto-generated when downloading; shows the device path for debugging. Do not fill in manually.</li>
253 + <li><strong>Object ID</strong> &mdash; IM object identifier the event refers to.</li>
254 + <li><strong>Object</strong> &mdash; auto-generated when downloading; shows the object path for debugging. Do not fill in manually.</li>
255 + <li><strong>Tags</strong> &mdash; tag (parameter) ID the event refers to.</li>
256 + <li><strong>Formula</strong> &mdash; condition for triggering the event (see Appendix).</li>
257 + <li><strong>Dead time, ms</strong> &mdash; delay time in milliseconds before event generation.</li>
258 + <li><strong>Event type code</strong> &mdash; code from the <strong>Event type</strong> directory in the separate tab of this file.</li>
259 + <li><strong>Event type name</strong> &mdash; filled in automatically when uploading/downloading.</li>
260 + <li><strong>Message</strong> &mdash; message text displayed in logs when the event is triggered.</li>
261 + <li><strong>Acknowledgement</strong> &mdash; <code>True</code> = enabled, <code>False</code> = disabled.</li>
262 + <li><strong>Sound ID</strong> &mdash; ID of a sound file loaded through the Sound Editor.</li>
263 + <li><strong>Sound name</strong> &mdash; filled in automatically when uploading/downloading.</li>
264 + <li><strong>Repeat count</strong> &mdash; number of sound repetitions when the event is triggered.</li>
265 + <li><strong>Infinity repeat</strong> &mdash; <code>True</code> = repeat until acknowledged, <code>False</code> = use repeat count.</li>
266 + </ul>
110 110  
111 -**Dead time, (ms)** field specifies the delay time for the event to be generated in milliseconds. It helps prevent false events, such as those caused by frequent device polling failures due to poor communication.
112 112  
113 -**Type** is** **a drop-down list used to specify the importance or category of the event.
269 + <p>After filling in all required fields, upload the file using the <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.53.38.png" alt="Upload"/> button on the Import/Export configuration file page (Figure 2.9). In the dialog (Figure 2.11), select the filled-in <code>events.xlsx</code>. The system will automatically validate the file (Figure 2.12).</p>
114 114  
115 -**Acknowledgement **is a switch to activate the function of user acknowledgement of event notification;
271 + <div class="fig">
272 + <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.54.07.png" alt="Upload configuration file window" style="max-width:100%;" onclick="openLightbox(this)"/>
273 + <p class="fig-cap">Figure 2.11. Upload configuration file window</p>
274 + </div>
116 116  
117 -**Sound **field is used to select a sound for notification. The drop-down list contains those sounds that are loaded through the Sound Editor (see item 3). The selected sound can be listened to using the button [[image:Screenshot 2025-12-10 at 21.44.31.png||height="24" width="27"]] to the right of the "Sound" field.
276 + <div class="fig">
277 + <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.54.41.png" alt="Validating the configuration file" style="max-width:100%;" onclick="openLightbox(this)"/>
278 + <p class="fig-cap">Figure 2.12. Validating the configuration file</p>
279 + </div>
118 118  
119 -**Before acknowledgement** is a switch to play the selected sound before the event is acknowledged;
281 + <p>If errors are detected, they will be displayed in the upload window. After all errors are corrected, the <strong>Write configuration</strong> button becomes available. After uploading, refresh the configuration to apply changes (see Figure 2.7).</p>
120 120  
121 -**Sound repeats **field is used to set the number of repetitions of sound playback when the event occurs.
283 + <div class="note note-info"><div class="note-hd"><span>&#8505;</span> Note</div><div class="note-body">For <strong>partial editing</strong>, CENTO also allows downloading and uploading only a filtered subset of events. In the Event editor, filter for the events of interest using <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.55.29.png" alt="Filter"/>, then click <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.55.55.png" alt="Config"/> and select <strong>Download</strong>. The downloaded <code>events.xlsx</code> will contain only the filtered events. To upload changes, click the same button and select <strong>Upload</strong>. Events not included in the download will remain unchanged.</div></div>
122 122  
123 -**Warning! **Modern browsers block playback of sounds in a browser by default, so sound alerts may not be played. To allow CENTO to play sounds in the browser, follow the steps below (an example is given for Chrome):
285 + <div class="note note-warning"><div class="note-hd"><span>&#9888;</span> Important</div><div class="note-body">Partial upload/download is <strong>not compatible</strong> with Excel files downloaded using an earlier version of the service. Attempting to upload an old file will result in a &ldquo;Version incompatibility&rdquo; error. When adding a new event, the new Event ID must not match any existing ID in the system.</div></div>
124 124  
125 -~1. Left click to the left of the address bar (see Fig. 2.5).
287 + <h3 id="s-event-flash">2.4. Flashing on the diagram<a class="anchor-icon" href="javascript:void(0)" onclick="copyAnchor('s-event-flash')" title="Copy link"><svg width="12" height="12" viewBox="0 0 16 16" fill="currentColor"><path d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"/></svg></a></h3>
126 126  
127 -2. Select "Site settings".
289 + <p>An object on a mimic diagram can be configured to flash (blink) when an event is active. There are two methods:</p>
128 128  
129 -[[image:Screenshot 2025-12-10 at 21.45.18.png||height="350" width="366"]]
291 + <h4>Method 1: Flashing by tag</h4>
130 130  
131 -Fig. 2.5 - Site settings
293 + <p>Use this method if the information model is not configured or not planned. Steps:</p>
294 + <ol>
295 + <li>
296 + <strong>Set up an event</strong> with the triggering formula, for example, connection loss
297 + (<code>ti40027171 != 1</code>) or restoration (<code>ti40027171 == 1</code>) — any tag
298 + registered in the system can be used (Figure 2.13).
299 + </li>
300 + <li>
301 + <strong>Create a calculated tag</strong> with the formula <code>[devstatusNN]</code> where
302 + NN is the device ID (Figure 2.14). The tag to be used for the designated purpose may get
303 + its value from a real device or may be based on other tags.
304 + </li>
305 + <li>
306 + <strong>Set up an object on the diagram</strong>, referencing the calculated tag from step 2
307 + in its rules (Figure 2.15).
308 + </li>
309 + <li>
310 + After saving the diagram and updating the configuration, if the status of the NN device
311 + changes, the system will start flashing the bound diagram object until it is acknowledged.
312 + </li>
313 + </ol>
132 132  
133 -3. In the opened window, go to Privacy and security → Site settings → Additional permissions → Content → Additional content settings → Sound, and select Allow (see Fig. 2.6).
134 134  
135 -[[image:Screenshot 2025-12-10 at 21.48.19.png||height="264" width="1104"]]
316 + <div class="fig">
317 + <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.58.43.png" alt="Event configured for tag-based flashing" style="max-width:100%;" onclick="openLightbox(this)"/>
318 + <p class="fig-cap">Figure 2.13. Event configured for tag-based flashing</p>
319 + </div>
136 136  
137 -Fig. 2.6 - Allow sound
321 + <div class="fig">
322 + <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.59.17.png" alt="Calculated tag for diagram flashing" style="max-width:100%;" onclick="openLightbox(this)"/>
323 + <p class="fig-cap">Figure 2.14. Calculated tag for diagram flashing</p>
324 + </div>
138 138  
139 -4. Refresh the CENTO page.
326 + <div class="fig">
327 + <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2021.59.53.png" alt="Diagram object rules referencing the calculated tag" style="max-width:100%;" onclick="openLightbox(this)"/>
328 + <p class="fig-cap">Figure 2.15. Diagram object rules referencing the calculated tag</p>
329 + </div>
140 140  
141 -After filling in all the required fields, click [[image:Screenshot 2025-12-10 at 21.48.55.png||height="25" width="70"]] and update the configuration (see Fig. 2.7).
331 + <h4>Method 2: Flashing by information model object</h4>
142 142  
143 -[[image:Screenshot 2025-12-10 at 21.49.27.png||height="338" width="340"]]
333 + <p>For this method, the information model must be configured and the required IM object must be selected in the event's <strong>Object</strong> field. The diagram object must be <em>active</em> (see the Diagrams Development Manual) and bound to the same IM object. Steps:</p>
334 + <ol>
335 + <li><strong>Create an event</strong> with the IM object selected in the <strong>Object</strong> field (Figure 2.16).</li>
336 + <li><strong>Create an active diagram object</strong> bound to the same IM object (Figure 2.17).</li>
337 + </ol>
144 144  
145 -Fig. 2.7 - Update  configuration
146 146  
147 -If selecting **With return** in the Event type, the **Event editor** window displays additional fields with the general heading **With return** (see Fig. 2.8). These fields are the same as those used for the **Single** event type.
340 + <div class="fig">
341 + <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2022.01.01.png" alt="Creating an event with an information model object" style="max-width:100%;" onclick="openLightbox(this)"/>
342 + <p class="fig-cap">Figure 2.16. Creating an event with an information model object</p>
343 + </div>
148 148  
149 -[[image:Screenshot 2025-12-10 at 21.49.59.png||height="600" width="1390"]]
345 + <div class="fig">
346 + <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2022.02.05.png" alt="Diagram object bound to the information model" style="max-width:100%;" onclick="openLightbox(this)"/>
347 + <p class="fig-cap">Figure 2.17. Diagram object bound to the information model</p>
348 + </div>
150 150  
151 -Fig. 2.8 - With return event editor window
350 + <h2 id="s-notifications">3. Notifications Settings<a class="anchor-icon" href="javascript:void(0)" onclick="copyAnchor('s-notifications')" title="Copy link"><svg width="12" height="12" viewBox="0 0 16 16" fill="currentColor"><path d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"/></svg></a></h2>
152 152  
153 -== 2.3. Creating and editing events using Excel ==
352 + <h3 id="s-notif-create">3.1. Creating and editing notifications<a class="anchor-icon" href="javascript:void(0)" onclick="copyAnchor('s-notif-create')" title="Copy link"><svg width="12" height="12" viewBox="0 0 16 16" fill="currentColor"><path d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"/></svg></a></h3>
154 154  
155 -Events can be configured using Excel files. This function is available on the page /CENTO/web/ui/configuration_loader/index (Settings > Configuration Files) (see Fig. 2.9).
354 + <p>CENTO can notify users about triggered events via email. To configure notifications, go to <strong>Settings &rarr; Events &rarr; Notifications</strong>. Mail server configuration is described in the Setup Manual, Mail Servers.</p>
156 156  
157 -[[image:Screenshot 2025-12-10 at 21.51.04.png||height="474" width="1388"]]
356 + <div class="fig">
357 + <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2022.03.45.png" alt="Notifications interface" style="max-width:100%;" onclick="openLightbox(this)"/>
358 + <p class="fig-cap">Figure 3.1. Notifications interface</p>
359 + </div>
158 158  
159 -Fig. 2.9 - Import/Export configuration file page
361 + <p>The notification table contains the following columns:</p>
362 + <ol>
363 + <li><strong>Name</strong> &mdash; notification name.</li>
364 + <li><strong>Emails</strong> &mdash; email addresses configured to receive notifications.</li>
365 + <li><strong>Dispatch period</strong> &mdash; the time of day allowed for sending notifications.</li>
366 + <li><strong>Iteration period</strong> &mdash; minimum time interval between notifications (notifications cannot be sent more frequently than this period).</li>
367 + <li><strong>Operation threshold</strong> &mdash; number of event triggers required before a notification is sent.</li>
368 + <li><strong>State</strong> &mdash; on/off.</li>
369 + <li><strong>Actions</strong> &mdash; edit <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2022.05.05.png" alt="Edit"/>, copy <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2022.05.32.png" alt="Copy"/>, delete <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2022.05.55.png" alt="Delete"/>.</li>
370 + </ol>
160 160  
161 -To configure events, download the events.xlsx file by clicking the button [[image:Screenshot 2025-12-10 at 21.51.37.png||height="28" width="97"]], then fill in the appropriate cells in the new line of the table in the **Events** tab (see Fig. 2.10).
162 162  
163 -[[image:Screenshot 2025-12-10 at 21.52.08.png||height="565" width="1397"]]
373 + <p>To create a new notification, click <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2022.06.27.png" alt="Create notification"/>. Only an authorized user with appropriate permissions can create and edit notifications.</p>
164 164  
165 -Fig. 2.10 - Events tab in the events.xslx file
375 + <div class="fig">
376 + <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2022.07.01.png" alt="Notifications: creation page" style="max-width:100%;" onclick="openLightbox(this)"/>
377 + <p class="fig-cap">Figure 3.2. Notifications: creation page</p>
378 + </div>
166 166  
167 -To create an event, fill in the following columns:
380 + <p>Fill in the following fields in the <strong>Notification settings</strong> tab:</p>
381 + <ul>
382 + <li><strong>Name</strong> &mdash; notification name.</li>
383 + <li><strong>State</strong> &mdash; enables or disables the notification.</li>
384 + <li><strong>Operation threshold</strong> &mdash; number of event triggers required before a notification is sent.</li>
385 + <li><strong>Dispatch period</strong> &mdash; the time of day allowed for sending notifications.</li>
386 + <li><strong>Iteration period</strong> &mdash; minimum time interval between notifications.</li>
387 + <li><strong>Delay (s)</strong> &mdash; accumulation window starting from the first event before the notification is sent.</li>
388 + <li><strong>E-mail server</strong> &mdash; mail server for sending notifications (configured in Settings &rarr; Email servers).</li>
389 + <li><strong>Recipients</strong> &mdash; email addresses of notification recipients.</li>
390 + </ul>
168 168  
169 -**Event ID **is an event unique number.
170 170  
171 -**Name **is the name of the event.
393 + <p>In the <strong>Event selection</strong> tab (Figure 3.3), tick the events required for notification in the left column and click <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2022.08.29.png" alt="Move right"/> to move them to the right column. To remove events, mark them in the right column and click <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2022.08.55.png" alt="Move left"/>.</p>
172 172  
173 -**Event type **is one_position or two_position event.
395 + <div class="fig">
396 + <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2022.07.55.png" alt="Event selection tab" style="max-width:100%;" onclick="openLightbox(this)"/>
397 + <p class="fig-cap">Figure 3.3. Event selection tab</p>
398 + </div>
174 174  
175 -**Event status **is responsible for the event status: 1 - event is enabled, 0 - event is disabled.
400 + <p>After filling in all fields, click <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2022.09.48.png" alt="Save"/> and update the configuration.</p>
176 176  
177 -**Device ID **is a device identifier to which the event refers.
402 + <h3 id="s-notif-logic">3.2. Notification operation<a class="anchor-icon" href="javascript:void(0)" onclick="copyAnchor('s-notif-logic')" title="Copy link"><svg width="12" height="12" viewBox="0 0 16 16" fill="currentColor"><path d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"/></svg></a></h3>
178 178  
179 -**The device** is not required to be filled in, it is generated when downloading an Excel file to help with debugging (displays the path of the linked device).
404 + <p>There are three filter types that control when notifications are sent:</p>
405 + <ol>
406 + <li><strong>Operation threshold</strong></li>
407 + <li><strong>Iteration period</strong></li>
408 + <li><strong>Dispatch period</strong></li>
409 + </ol>
180 180  
181 -**Object ID **is an IM object identifier to which the event refers.
182 182  
183 -**Object** does not need to be filled in, it is generated when downloading an Excel file to help in debugging (displays the path of the linked object).
412 + <p>When configured without any restrictions, a notification is sent whenever any of the configured events is triggered.</p>
184 184  
185 -**Tags **is a tag (parameter) Identifier to which the event refers.
414 + <h4>Operation threshold</h4>
186 186  
187 -**Formula** defines the condition under which the event is to be triggered. Description of formulas is given in the Appendix.
416 + <p>A notification is triggered when the total number of triggered events in the notification reaches the configured threshold. If the threshold is 0, the notification is generated immediately after any event triggers, provided the other filters allow it.</p>
188 188  
189 -**Dead time, ms **is a field to enter the delay time, in milliseconds, for the event to be triggered.
418 + <h4>Iteration period</h4>
190 190  
191 -**Event type code **is a code, which is entered according to the **Event type** directory using a separate tab in this file.
420 + <p>The iteration period starts from the time the last notification was triggered. It is set in days and hours. If set to 0 days 0 hours, notifications are generated and sent immediately when the other filter conditions are met.</p>
192 192  
193 -**Event type name **is a name of the event type, the field is filled in automatically when uploading-downloading the configuration file.
422 + <h4>Dispatch period</h4>
194 194  
195 -**Message **is a message text that should be displayed in the logs when the event is triggered.
424 + <p>If set to 0:00&ndash;24:00, notifications can be sent at any time of day. If set to a specific time (e.g. 8:00), notifications are batched and sent once at that time. The dispatch period can only be set within a single calendar day.</p>
196 196  
197 -**Acknowledgement **is responsible for the event acknowledgement. True - acknowledgement is enabled, False - acknowledgement is disabled.
426 + <div class="fig">
427 + <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2022.11.07.png" alt="Logic of filter settings when generating notifications" style="max-width:100%;" onclick="openLightbox(this)"/>
428 + <p class="fig-cap">Figure 3.4. Logic of filter settings when generating notifications</p>
429 + </div>
198 198  
199 -**Sound ID **specifies an ID of a sound file loaded through the sound editor.
431 + <h4>Changing notification settings</h4>
200 200  
201 -**Sound name **is a name of the sound file, the field is filled in automatically when loading-unloading the configuration file.
433 + <p>When notification settings are changed at any time:</p>
434 + <ul>
435 + <li>The <strong>operation threshold counter</strong> is preserved but the notification will not trigger until the next event after the threshold is reached.</li>
436 + <li>The <strong>iteration period</strong> is reset.</li>
437 + </ul>
202 202  
203 -**Repeat count **is used to set the number of repetitions of sound playback when the event is triggered.
204 204  
205 -**Infinity repeat **is responsible for repeating the sound until the user acknowledges the event. True - infinite repetition is enabled, False - infinite repetition is disabled.
440 + <p>Examples:</p>
441 + <ol>
442 + <li>Threshold = 5, 3 events triggered. User increases threshold to 10 &rarr; notification fires after 7 more events (total 10).</li>
443 + <li>Threshold = 10, 7 events triggered. User reduces threshold to 5 &rarr; notification fires after the next event (total 8 triggered events).</li>
444 + <li>Iteration period = 10 hours, last notification sent 2 hours ago. Settings changed &rarr; iteration period resets and notification fires on the next event trigger.</li>
445 + <li>Threshold = 10, notification has 3 events, event #1 triggered twice. User deletes event #1 from notification. When total reaches 10, notification is sent without event #1&rsquo;s messages.</li>
446 + </ol>
206 206  
207 -After all required fields are filled in, the file should be uploaded using the button [[image:Screenshot 2025-12-10 at 21.53.38.png||height="22" width="77"]] on the **Import/Export configuration file** page (see Fig. 2.9). In the window that appears (see Fig. 2.11), select the filled in events.xlsx file. The system will automatically validate the file to ensure it is correctly filled in and formatted (see Fig. 2.12).
208 208  
209 -[[image:Screenshot 2025-12-10 at 21.54.07.png||height="234" width="379"]]
449 + <div class="fig">
450 + <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2022.12.07.png" alt="Notification with operation threshold" style="max-width:100%;" onclick="openLightbox(this)"/>
451 + <p class="fig-cap">Figure 3.5. Notification with operation threshold</p>
452 + </div>
210 210  
211 -Fig. 2.11 - Upload configuration file window
454 + <div class="fig">
455 + <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2022.12.39.png" alt="Notification with dispatch period" style="max-width:100%;" onclick="openLightbox(this)"/>
456 + <p class="fig-cap">Figure 3.6. Notification with dispatch period</p>
457 + </div>
212 212  
213 -[[image:Screenshot 2025-12-10 at 21.54.41.png||height="413" width="477"]]
459 + <div class="fig">
460 + <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2022.13.08.png" alt="Notification with all restrictions active" style="max-width:100%;" onclick="openLightbox(this)"/>
461 + <p class="fig-cap">Figure 3.7. Notification with all restrictions active</p>
462 + </div>
214 214  
215 -Fig. 2.12 - Validating the configuration file
464 + <h2 id="s-sound-editor">4. Sound Editor<a class="anchor-icon" href="javascript:void(0)" onclick="copyAnchor('s-sound-editor')" title="Copy link"><svg width="12" height="12" viewBox="0 0 16 16" fill="currentColor"><path d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"/></svg></a></h2>
216 216  
217 -If errors are detected, they will be displayed in the file upload window. After all errors are eliminated, the **Write configuration** button will become available.
466 + <p>Sound notifications are managed at <strong>Settings &rarr; Events &rarr; Sound editor</strong>.</p>
218 218  
219 -After uploading the file, the configuration should be refreshed to apply the changes (see Fig. 2.7).
468 + <div class="fig">
469 + <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2022.13.46.png" alt="Sound Editor page" style="max-width:100%;" onclick="openLightbox(this)"/>
470 + <p class="fig-cap">Figure 4.1. Sound Editor page</p>
471 + </div>
220 220  
221 -To make working with events more convenient, CENTO provides the option to edit the event configuration partially using Excel.
473 + <p>The Sound Editor shows a table with the following columns: <strong>ID</strong>, <strong>Name</strong>, <strong>File name</strong>, <strong>Uploaded</strong> (date), and <strong>Actions</strong> (edit, play, delete).</p>
222 222  
223 -To do this, on the page /CENTO/web/ui/event_editor/index (menu item Settings > Events > Event editor (see Fig. 2.1 - Fig. 2.2), search for an events using the filtering [[image:Screenshot 2025-12-10 at 21.55.29.png||height="24" width="25"]], then click on the button [[image:Screenshot 2025-12-10 at 21.55.55.png||height="25" width="95"]]and select **Download** in the drop-down list. After that, the file events.xlsx will be downloaded to the PC, containing only the filtered events from the **Events editor**.
475 + <div class="note note-info"><div class="note-hd"><span>&#8505;</span> Note</div><div class="note-body">The Sound Editor only supports <strong>.mp3</strong> files.</div></div>
224 224  
225 -Actions when filling/editing the columns of the Excel table are similar to the actions during uploading from the** Import/Export configuration file** menu (see Fig. 2.9 - Fig. 2.10).
477 + <p>To add a new sound, click <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2022.14.32.png" alt="Add new sound"/>. In the pop-up (Figure 4.2), specify the name, select or drag-and-drop the .mp3 file, and click <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2022.15.48.png" alt="Upload"/>.</p>
226 226  
227 -NOTE: when adding a new event, crossing **Event ID** is unacceptable as an incomplete event configuration is unloaded. The new **ID** should not match the existing one in the system (configuration).
479 + <div class="fig">
480 + <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2022.15.12.png" alt="New sound upload window" style="max-width:100%;" onclick="openLightbox(this)"/>
481 + <p class="fig-cap">Figure 4.2. New sound upload window</p>
482 + </div>
228 228  
229 -To upload the changes made to the file, click on the button [[image:Screenshot 2025-12-10 at 21.55.55.png||height="25" width="95"]] select **Upload** from the drop-down list. Events that were not taken into account when downloading the Excel file will remain unchanged
484 + <div class="note note-warning"><div class="note-hd"><span>&#9888;</span> Important</div><div class="note-body">If CENTO is open in multiple browser tabs (e.g. Sound Editor in one tab, a mimic diagram in another), the old sound will continue to play on the diagram tab after changing the sound in the editor. The new sound will play only after the user interacts with the diagram tab (e.g. clicking the mouse).</div></div>
230 230  
231 -IMPORTANT: partial upload/download is not compatible with previously downloaded Excel files. If an Excel file was downloaded using an earlier version of the service (prior to the introduction of the partial upload/download feature), it cannot be uploaded back - an error message saying "Version incompatibility" appears.
486 + <h2 id="s-examples">5. Examples of Event Setup<a class="anchor-icon" href="javascript:void(0)" onclick="copyAnchor('s-examples')" title="Copy link"><svg width="12" height="12" viewBox="0 0 16 16" fill="currentColor"><path d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"/></svg></a></h2>
232 232  
233 -== 2.4. Flashing on the diagram ==
488 + <p>The following examples use the web interface on the event creation page described in section 2.2.</p>
234 234  
235 -The flashing of an object on the diagram can be configured in the following ways:
490 + <h4>Example 1: Event on tag value change</h4>
236 236  
237 -**~1. Flashing by tag**
492 + <div class="fig">
493 + <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2022.17.31.png" alt="Event setup on tag value change" style="max-width:100%;" onclick="openLightbox(this)"/>
494 + <p class="fig-cap">Figure 5.1. Event setup on tag value change</p>
495 + </div>
238 238  
239 -This method is relevant if the system does not have and does not plan to customize the information model.
497 + <p>Figure 5.1 shows the event <em>Switch position f.1.1 (1QF1)</em> configured as a one-position event bound to an IM object and a device. The formula <code>ti11013008 == 2</code> triggers the event when tag 11013008 equals 2. Dead time is 0 (no delay), acknowledgement is enabled, and the default sound plays 5 times.</p>
240 240  
241 -To customize the flashing of a diagram object by tag:
499 + <h4>Example 2: Event on device status change (with return)</h4>
242 242  
243 -A) Set up an event that will contain the formula, for example, connection loss (ti40027171 != 1) or restoration of connection (ti40027171 == 1) with the device (see Fig. 2.13). The formula can refer not only to the device status, any tags registered in the system can be applied here, in this example, the device status is used as a special case. For more details on the available formulas and expressions, please refer to the** Setup Manual. **
501 + <div class="fig">
502 + <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/6.%20Events%20Setup/WebHome/Screenshot%202025-12-10%20at%2022.19.25.png" alt="Event setup on device status change" style="max-width:100%;" onclick="openLightbox(this)"/>
503 + <p class="fig-cap">Figure 5.2. Event setup on device status change</p>
504 + </div>
244 244  
245 -[[image:Screenshot 2025-12-10 at 21.58.43.png||height="824" width="1407"]]
506 + <p>Figure 5.2 shows a paired event with return. Two notifications are configured:</p>
507 + <ol>
508 + <li>
509 + <strong>Lost connection with Mikrotik SW1.2</strong> &mdash; formula
510 + <code>(devstatus100 == 3) AND (devprevstatus100 != 3)</code>, meaning device ID 100
511 + just entered error status. Dead time = 3000 ms; alarm type with acknowledgement;
512 + sound plays until acknowledged.
513 + </li>
514 + <li>
515 + <strong>Restored connection with Mikrotik SW1.2</strong> &mdash; formula
516 + <code>(devstatus100 == 1) AND (devprevstatus100 != 1)</code>, meaning device ID 100
517 + just returned to normal status. Informational type; no acknowledgement required;
518 + sound plays 3 times.
519 + </li>
520 + </ol>
246 246  
247 -Fig. 2.13 - Event for tag flashing
248 248  
249 -B) Create a calculated tag with the formula [devstatusNN], where NN is the device id (see Figure 2.14). The binding to devstatus is used for example. The tag to be used for the designated purpose may get the value from the real device or may be based on other tags.
523 + <h2 id="s-annex">Appendix: Formula Reference<a class="anchor-icon" href="javascript:void(0)" onclick="copyAnchor('s-annex')" title="Copy link"><svg width="12" height="12" viewBox="0 0 16 16" fill="currentColor"><path d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"/></svg></a></h2>
250 250  
251 -[[image:Screenshot 2025-12-10 at 21.59.17.png]]
525 + <p>Formulas can include arithmetic operations, conditions, mathematical and special functions, and pre-calculated measurements (up to three levels of nesting).</p>
252 252  
253 -Fig. 2.14 - Calculated tag to create tag flashing on the diagram
527 + <div class="tbl-wrap">
528 + <table class="rn-table">
529 + <caption style="text-align:left;font-size:.8em;color:#555;padding:6px 0;font-weight:700;">Table A.1 &mdash; Variables in formulas</caption>
530 + <thead>
531 + <tr>
532 + <th style="min-width:160px;">Variable</th>
533 + <th>Description</th>
534 + </tr>
535 + </thead>
536 + <tbody>
537 + <tr><td><code>[tiN]</code></td><td>Current value of tag with ID&nbsp;N</td></tr>
538 + <tr><td><code>[prevN]</code></td><td>Previous value of the tag with ID&nbsp;N</td></tr>
539 + <tr><td><code>[statusN]</code></td><td>Current status of tag with ID&nbsp;N</td></tr>
540 + <tr><td><code>[prevstatusN]</code></td><td>Previous status of tag with ID&nbsp;N</td></tr>
541 + <tr><td><code>[lasttimeN]</code></td><td>Current timestamp of the tag with ID&nbsp;N</td></tr>
542 + <tr><td><code>[beforetimeN]</code></td><td>Previous timestamp of the tag with ID&nbsp;N</td></tr>
543 + <tr><td><code>[devstatusN]</code></td><td>Current device status: 0&nbsp;= disabled; 1&nbsp;= normal; 2&nbsp;= at least one TI with abnormal quality; 3&nbsp;= polling error (unavailable); 4&nbsp;= manual input; 7&nbsp;= waiting for data</td></tr>
544 + <tr><td><code>[devprevstatusN]</code><br><code>[prevdevstatusN]</code></td><td>Previous device status (same status codes as above)</td></tr>
545 + <tr><td><code>[devlastdtN]</code></td><td>Time when the latest device data was received</td></tr>
546 + <tr><td><code>[devpingtimeN]</code></td><td>Response time (ms) to ICMP ping of device&nbsp;N</td></tr>
547 + <tr><td><code>[connectedN]</code></td><td>Connection with device&nbsp;N restored</td></tr>
548 + <tr><td><code>[!connectedN]</code></td><td>Connection with device&nbsp;N is lost</td></tr>
549 + </tbody>
550 + </table>
551 + </div>
254 254  
255 -C) Set up an object on the diagram, in the rules of which the calculated tag from point b will be applied (see Fig. 2.15).
256 256  
257 -[[image:Screenshot 2025-12-10 at 21.59.53.png]]
554 + <div class="tbl-wrap">
555 + <table class="rn-table">
556 + <caption style="text-align:left;font-size:.8em;color:#555;padding:6px 0;font-weight:700;">Table A.2 &mdash; Operators in formulas</caption>
557 + <thead>
558 + <tr>
559 + <th style="min-width:80px;">Operator</th>
560 + <th>Description</th>
561 + <th>Example</th>
562 + <th>Result</th>
563 + </tr>
564 + </thead>
565 + <tbody>
566 + <tr><td><code>+</code></td><td>Addition</td><td><code>5 + 5</code></td><td>10</td></tr>
567 + <tr><td><code>-</code></td><td>Subtraction</td><td><code>5 - 3</code></td><td>2</td></tr>
568 + <tr><td><code>*</code></td><td>Multiplication</td><td><code>0.01 * [val]</code></td><td>0.01 &times; val</td></tr>
569 + <tr><td><code>/</code></td><td>Division</td><td><code>[val] / 1000</code></td><td>val / 1000</td></tr>
570 + <tr><td><code>%</code></td><td>Modulo (remainder)</td><td><code>10 % 3</code></td><td>1</td></tr>
571 + <tr><td><code>=</code></td><td>Assigns a value to a tag</td><td><code>[ti123] = 5</code></td><td>5</td></tr>
572 + <tr><td><code>==</code></td><td>Equal (returns true/false)</td><td><code>2 == 2</code></td><td>true</td></tr>
573 + <tr><td><code>&lt;, &gt;, &lt;=, &gt;=</code></td><td>Arithmetic comparison</td><td><code>2 &gt;= 3</code></td><td>false</td></tr>
574 + <tr><td><code>&amp;&amp;</code>, <code>&amp;</code>, <code>AND</code>, <code>and</code></td><td>Logical AND</td><td><code>(devstatus1==1) AND (devstatus2==1)</code></td><td>true if both</td></tr>
575 + <tr><td><code>||</code>, <code>|</code>, <code>OR</code>, <code>or</code></td><td>Logical OR</td><td><code>(devstatus1==3) OR (devstatus2==3)</code></td><td>true if either</td></tr>
576 + </tbody>
577 + </table>
578 + </div>
258 258  
259 -Figure 2.15 - Example rules with the tag created in step b.
260 260  
261 -D) After saving the diagram and updating the configuration, if the status of the NN device changes, the system will start it flashing on the diagram until acknowledged.
581 + <div class="parent-topic">Parent topic: <a href="[[CENTO Manuals>>doc:CENTO Manuals.WebHome]]">CENTO Manuals</a></div>
262 262  
263 -**2. Flashing by the information model object**
583 +</div><!-- /doc-content -->
264 264  
265 -For this method to work, the information model should be configured, and the required information model object should be selected in the event setting (**Object** field). In this case, the diagram object should be active (see more details in the "Diagrams Development Manual") and bound to the information model object selected in the event.
585 +<nav class="doc-toc">
586 + <div class="toc-header">
587 + <strong>On This Page</strong>
588 + <button class="toc-toggle" id="toc-tog" title="Collapse">&laquo;</button>
589 + </div>
590 + <ul id="toc-list">
591 + <li class="tl1"><a href="#s-intro" data-toc>1. Introduction</a></li>
592 + <li class="tl1"><a href="#s-events" data-toc>2. CENTO Events</a></li>
593 + <li class="tl2"><a href="#s-event-editor" data-toc>2.1. Event editor</a></li>
594 + <li class="tl2"><a href="#s-event-create" data-toc>2.2. Creating events (UI)</a></li>
595 + <li class="tl2"><a href="#s-event-excel" data-toc>2.3. Creating events (Excel)</a></li>
596 + <li class="tl2"><a href="#s-event-flash" data-toc>2.4. Flashing on diagram</a></li>
597 + <li class="tl1"><a href="#s-notifications" data-toc>3. Notifications</a></li>
598 + <li class="tl2"><a href="#s-notif-create" data-toc>3.1. Creating notifications</a></li>
599 + <li class="tl2"><a href="#s-notif-logic" data-toc>3.2. Notification logic</a></li>
600 + <li class="tl1"><a href="#s-sound-editor" data-toc>4. Sound Editor</a></li>
601 + <li class="tl1"><a href="#s-examples" data-toc>5. Examples</a></li>
602 + <li class="tl1"><a href="#s-annex" data-toc>Appendix: Formulas</a></li>
603 + </ul>
604 +</nav>
266 266  
267 -Let us consider an example of this solution.
606 +</div><!-- /doc-wrap -->
268 268  
269 -A) Create an event with the selected object of the information model in the **Object** field (see Fig. 2.15).[[image:Screenshot 2025-12-10 at 22.01.01.png||height="914" width="1408"]]
270 -
271 -Fig. 2.15 - Creating an event with the information model object.
272 -
273 -B) Create an active object on the diagram bound to the object of the information model, which was selected in the event settings (see Fig. 2.16).
274 -
275 -[[image:Screenshot 2025-12-10 at 22.02.05.png||height="538" width="724"]]
276 -
277 -Fig. 2.16 - Creating a diagram object bound to the information model.
278 -
279 -= 3. NOTIFICATIONS SETTINGS =
280 -
281 -== 3.1. Creating and editing notifications ==
282 -
283 -CENTO has the function to notify users about an event triggered via e-mail.
284 -
285 -To configure notifications, go to the /CENTO/web/ui/notifications_configuration/index page (menu item Settings > Events > Notifications (see Fig. 2.1). The configuration of the mail server is described in the "Setup Manual, Mail servers".
286 -
287 -
288 -[[image:Screenshot 2025-12-10 at 22.03.45.png]]
289 -
290 -Fig. 3.1 - Notifications interface
291 -
292 -In the interface presented, the user has the ability to:
293 -
294 -~1. Create notifications;
295 -
296 -2. Edit notifications.
297 -
298 -The notification table has the following columns.
299 -
300 -1. **Name **is the name of the notification.
301 -1. **Emails **are the e-mail addresses that have been configured to receive notifications.
302 -1. **Dispatch period **is the time of the day allowed for sending notifications.
303 -1. **Iteration period** is the minimum time interval between notifications, meaning notifications cannot be sent to the recipient more frequently than this set period.
304 -1. **Operation threshold **is the number of event triggers required before a notification is sent.
305 -1. **State **is on/off.
306 -1. **Actions** are operations available to the user that can be performed in response to an event (edit [[image:Screenshot 2025-12-10 at 22.05.05.png||height="25" width="27"]], copy [[image:Screenshot 2025-12-10 at 22.05.32.png||height="26" width="26"]], delete [[image:Screenshot 2025-12-10 at 22.05.55.png||height="26" width="23"]]).
307 -
308 -To create a new notification, click the button [[image:Screenshot 2025-12-10 at 22.06.27.png||height="33" width="151"]].
309 -
310 -Only an authorized user with appropriate permissions can create and edit notifications.
311 -
312 -The notifications creation is shown in Fig. 3.2.
313 -
314 -[[image:Screenshot 2025-12-10 at 22.07.01.png||height="517" width="1422"]]
315 -
316 -Fig. 3.2 - Notifications: creation page
317 -
318 -To create a notification, fill in the following fields in the **Notification settings** tab:
319 -
320 -**Name** is used to specify the name of the notification.
321 -
322 -**State **is a switch that enables or disables the notification.
323 -
324 -**Operation threshold **is the number of event triggers required before a notification is sent.
325 -
326 -**Dispatch period** is the time of the day allowed for sending notifications.
327 -
328 -**Iteration period** is the minimum time interval between notifications, meaning notifications cannot be sent to the recipient more frequently than this set period.
329 -
330 -**Delay (s) **is** **set to accumulate events during the delay from the first event.
331 -
332 -**Notification method:**
333 -
334 -**E-mail server **is a mail server used for sending messages. Mail servers are configured in the Settings > Email servers menu (for details on configuring mail servers, refer to the "Setup Manual").
335 -
336 -Recipients is a field for entering e-mail addresses of notification recipients.
337 -
338 -[[image:Screenshot 2025-12-10 at 22.07.55.png]]
339 -
340 -Fig. 3.3 - Event selection tab
341 -
342 -In the "Event selection" tab (Fig. 3.3), tick the events required for notification in the left column and use the "Right" button [[image:Screenshot 2025-12-10 at 22.08.29.png||height="27" width="24"]]to move them to the right column. Unnecessary events can be moved from the right column using the "Left" button [[image:Screenshot 2025-12-10 at 22.08.55.png||height="28" width="25"]], having previously marked them with checkmarks.
343 -
344 -After filling in all the fields, click the button [[image:Screenshot 2025-12-10 at 22.09.48.png||height="24" width="60"]] and update the configuration.
345 -
346 -== 3.2. Notification operation ==
347 -
348 -There are three types of filters in the notifications:
349 -
350 -1. Operation threshold;
351 -1. Iteration period;
352 -1. Dispatch period.
353 -
354 -When configured without restrictions, the notification comes whenever any of the configured events added to the notification are triggered.
355 -
356 -**Operation threshold**
357 -
358 -The notification is triggered when the total number of triggered events in the notification reaches the number the user set.
359 -
360 -If the operation threshold is 0, the notification is generated immediately after any of the events in the notification are triggered, unless the Iteration period is set and the Dispatch period is allowed.
361 -
362 -**Iteration period**
363 -
364 -The iteration period report starts from the time when the last notification was triggered. The iteration period is set in days and hours.
365 -
366 -If the iteration period is set to 0 days 0 hours, notifications will be generated and sent immediately if the conditions of other filters are met.
367 -
368 -**Dispatch period**
369 -
370 -If the dispatch period is set to 0:00 - 24:00, notifications can be sent at any time of the day.
371 -
372 -If the dispatch period is set to a specific time, such as 8:00, notifications will be sent once a day at that time.
373 -
374 -Currently, the dispatch period can only be set within a single day. For example, it is not possible to set a period from 20:00 to 6:00 of the next day.
375 -
376 -[[image:Screenshot 2025-12-10 at 22.11.07.png]]
377 -
378 -Fig.3.4 - Logic of settings operation when generating notifications
379 -
380 -**Changing notification settings**
381 -
382 -If you change the alert settings (name, addresses, mail servers, triggering limits, message set, etc.) at any time, the following will happen:
383 -
384 -If the notification settings (name, recipients, email servers, operation limits, message set, etc.) are changed at any time, the following will occur:
385 -
386 -The operation threshold is saved, but the notification will not be triggered until the next event in the notification if the operation threshold is reached.
387 -
388 -The iteration period is reset.
389 -
390 -**Examples of changing notification settings:**
391 -
392 -1. The operation threshold limit was set to 5, and 3 events were triggered. After the user increases the threshold to 10, the notification will be triggered after 7 more events.
393 -1. The operation threshold was set to 10, and 7 events were triggered. After the user reduces the operation threshold to 5, a notification will be sent after the next event, for a total of 8 triggered events.
394 -1. The iteration period was set to 10 hours, and the first notification was sent 2 hours ago. Events are triggered periodically. If the notification settings are changed, the iteration period will be reset, and a notification will be sent the next time an event is triggered. The iteration period counter will start again.
395 -1. The operation threshold was set to 10. There are 3 events in the notification. The 1st event triggered 2 times. Then the User deleted the first event from the notification. The triggering counter is not reset. When the triggering counter reaches the value of 10, the notification with 8 triggering messages will be sent. The first event (which was deleted) will not be included in the notification text.
396 -
397 -**Examples of alert notification logic**
398 -
399 -[[image:Screenshot 2025-12-10 at 22.12.07.png]]
400 -
401 -Fig.3.5 - Notification with operation threshold
402 -
403 -[[image:Screenshot 2025-12-10 at 22.12.39.png]]
404 -
405 -Fig. 3.6 - Notification with dispatch period
406 -
407 -[[image:Screenshot 2025-12-10 at 22.13.08.png]]
408 -
409 -Fig. 3.7 - Notification with all restrictions
410 -
411 -The types of sound notifications are configured on the /CENTO/web/ui/sound_editor/index page (Settings > Events > Sound editor (see Fig. 2.1)) (see Fig. 4.1).
412 -
413 -[[image:Screenshot 2025-12-10 at 22.13.46.png]]
414 -
415 -Fig. 4.1 - "Sound Editor" page
416 -
417 -The **Sound editor** page shows a table with available sounds. The table contains the following columns:
418 -
419 -**ID **is a unique digital identifier of the sound.
420 -
421 -**Name** is the name of the sound.
422 -
423 -**File name **is the name of the uploaded sound file.
424 -
425 -**Uploaded **is the date when the sound was uploaded to the system.
426 -
427 -**Actions **is used to manage sounds: edit sound, play sound file, and delete.
428 -
429 -**Note: t**he sound editor allows only ".mp3" to be uploaded.
430 -
431 -To create a new sound, click the button [[image:Screenshot 2025-12-10 at 22.14.32.png||height="25" width="110"]]. After that a pop-up window appears (see Fig. 4.2).
432 -
433 -[[image:Screenshot 2025-12-10 at 22.15.12.png||height="242" width="376"]]
434 -
435 -Fig. 4.2 - New sound upload window
436 -
437 -In the window that appears, specify the name of the new sound, select a file from your computer or drag and drop the sound file into the special field. After clicking the button [[image:Screenshot 2025-12-10 at 22.15.48.png||height="22" width="43"]], the created sound will appear in the Sound Editor.
438 -
439 -**Attention! **If CENTO is opened in multiple browser tabs, for example, with the sound editor in the first tab and the diagram in the second tab, the old sound will continue to play on the diagram tab after changing the sound in the sound editor. The new sound will only play on the diagram tab once the user interacts with the diagram page (e.g., by clicking a mouse button on the diagram tab).
440 -
441 -= 5. EXAMPLES OF EVENT SETTING =
442 -
443 -Let’s look at some examples of event settings using the web interface. All actions are performed on the event creation page, as described in section 2.1 of this manual.
444 -
445 -Example No.1: Setting up an event on tag value change.
446 -
447 -[[image:Screenshot 2025-12-10 at 22.17.31.png||height="683" width="1366"]]
448 -
449 -Fig. 5.1 - Event setting on tag value change
450 -
451 -Fig.5.1 shows that the event //Switch position f.1.1 (1QF1)// is configured with a one-position event type bound to the IM object and the device, from which the tag value changes come with the ID number 11013008. The text in the **Message** field will be written in the CENTO **Event logs,** which gets there when the tag value 11013008 is equal to 2, the formula //__ti11013008==__// 2 tells about it (formula operators are given in the Annex). This event will be configured with dead time 0 (there will be no delay in event generation), with acknowledgment and with playing the default sound, which will sound 5 times and then turn off.
452 -
453 -Example No. 2: Setting up the event on device status change.
454 -
455 -Let’s consider an example of configuring an event for changing the device status (see Fig. 5.2). The event is configured with a return. Fill all the necessary fields with information similar to the previous example. This event is divided into two notifications:
456 -
457 -1. The event //Lost connection with the device Mikrotik SW1.2 switch //enters the event log under the condition described in the formula //(devstatus100== 3) AND (devprevstatus100 !=3)//, which indicates that the status of the device with ID100 came equal to 3 and the previous status does not equal 3. This event will be configured with dead time 3000 (delay on event generation will be equal to 3000 ms) as an alarm event with acknowledgment and with sound playing until the user acknowledges this notification.
458 -1. The event //Restored connection with device Mikrotik SW1.2 switch //is logged in the event log under the condition described in the formula //(devstatus100== 1) AND (devprevstatus100 !=1)//, which indicates that the status of the device with ID100 came equal to 1 and the previous status is not equal to 1. This event will be configured as informative without acknowledgment and with a sound that will be played 3 times and then turned off.
459 -
460 -[[image:Screenshot 2025-12-10 at 22.19.25.png||height="650" width="1372"]]
461 -
462 -Fig. 5.2 - Setting up the event on device status change
463 -
464 -----
465 -
466 -Annex: description of formula
467 -
468 -Arithmetic operations, conditions, mathematical and special functions, etc., are allowed. Up to three levels of nested pre-calculated measurements are permitted.
469 -
470 -Table A.1 - Variables in formulas
471 -
472 -|(% style="width:404px" %)Variable|(% style="width:472px" %)Description
473 -|(% style="width:404px" %)(((
474 -[tiN],
475 -
476 -where N is the sequence number of TI
477 -)))|(% style="width:472px" %)Current value of tag with id N
478 -|(% style="width:404px" %)(((
479 -[prevN],
480 -
481 -where N is the sequence number of TI
482 -)))|(% style="width:472px" %)Previous value of the tag with id N
483 -|(% style="width:404px" %)(((
484 -[statusN],
485 -
486 -where N is the sequence number of TI
487 -)))|(% style="width:472px" %)Current status of tag with id N
488 -|(% style="width:404px" %)(((
489 -[prevstatusN],
490 -
491 -where N is the sequence number of TI
492 -)))|(% style="width:472px" %)Previous status of tag with id N
493 -|(% style="width:404px" %)(((
494 -[lasttimeN],
495 -
496 -where N is the sequence number of TI
497 -)))|(% style="width:472px" %)Current timestamp of the tag with id N
498 -|(% style="width:404px" %)(((
499 -[beforetimeN],
500 -
501 -where N is the sequence number of TI
502 -)))|(% style="width:472px" %)Previous timestamp of the tag with id N
503 -|(% style="width:404px" %)(((
504 -[devstatusN],
505 -
506 -where N is the device number (ID)
507 -)))|(% style="width:472px" %)Current status of the device (0 - disabled in configuration; 1 - normal; 2 - at least one TI has abnormal quality (out of limits or error in formula); 3 - device polling error (device unavailable); 4 - manual input in tags or channels of the device, 7 - waiting for data)
508 -|(% style="width:404px" %)(((
509 -[devprevstatusN] or
510 -
511 - [prevdevstatusN]
512 -
513 -where N is the device number (ID)
514 -)))|(% style="width:472px" %)Previous device status (0-disabled in configuration; 1 - normal; 2 - at least one TI has abnormal quality (out of limits or formula error); 3 - device polling error (device unavailable); 4 - manual input in device tags or channels, 7 - waiting for data)
515 -|(% style="width:404px" %)(((
516 -[devlastdtN],
517 -
518 -where N is the device number (ID)
519 -)))|(% style="width:472px" %)The time when the latest device data was received
520 -|(% style="width:404px" %)(((
521 -[devpingtimeN],
522 -
523 -where N is the device number (ID)
524 -)))|(% style="width:472px" %)Response time (in ms) to the ping command of the device polled by ICMP
525 -|(% style="width:404px" %)(((
526 -[connectedN],
527 -
528 -where N is the sequence number of TI
529 -)))|(% style="width:472px" %)Connection with the device with id N restored
530 -|(% style="width:404px" %)(((
531 -[!connectedN],
532 -
533 -where N is the sequence number of TI
534 -)))|(% style="width:472px" %)Connection with the device with id N is lost
535 -
536 -Table A.2 - Operators in formulas
537 -
538 -|(% style="width:130px" %)Operator|(% style="width:639px" %)Description|(% style="width:293px" %)Utilization|(% style="width:282px" %)Result
539 -|(% style="width:130px" %)+|(% style="width:639px" %)Adds up numbers or tag values|(% style="width:293px" %)5 + 5|(% style="width:282px" %)10
540 -|(% style="width:130px" %)-|(% style="width:639px" %)Subtracts the first number or tag value from the second number or tag value|(% style="width:293px" %)5 - 3|(% style="width:282px" %)2
541 -|(% style="width:130px" %)*|(% style="width:639px" %)Multiplies numbers or tag values|(% style="width:293px" %)0.01 * [val]|(% style="width:282px" %)0.01 * [val]
542 -|(% style="width:130px" %)/|(% style="width:639px" %)Divides the first number or tag value by the second number or tag value|(% style="width:293px" %)[val] / 1000|(% style="width:282px" %)[val] / 1000
543 -|(% style="width:130px" %)%|(% style="width:639px" %)Returns the remainder of the division|(% style="width:293px" %)10 / 3|(% style="width:282px" %)1
544 -|=(% style="width: 130px;" %) |(% style="width:639px" %)Assigns a specific value to a tag|(% style="width:293px" %)[ti123] = 5|(% style="width:282px" %)5
545 -|=(% style="width: 130px;" %)=|(% style="width:639px" %)Returns true if the compared values are equal, and false if they are not equal|(% style="width:293px" %)2 == 2|(% style="width:282px" %)true
546 -|(% style="width:130px" %)<, >, <=, >=|(% style="width:639px" %)Returns true if the arithmetic condition is met and false if it is not met|(% style="width:293px" %)2 >= 3|(% style="width:282px" %)false
547 -|(% style="width:130px" %)&&, &, &, &|(% style="width:639px" %)Logical operator "and"|(% style="width:293px" %) |(% style="width:282px" %)
548 -|(% style="width:130px" %)~~|~|, OR, or|(% style="width:639px" %)Logical operator "or"|(% style="width:293px" %) |(% style="width:282px" %)
549 -
550 -
551 -
552 -
608 +<script>
609 +(function(){
610 + var bar=document.getElementById('rn-prog');
611 + var top=document.getElementById('rn-top');
612 + window.addEventListener('scroll',function(){
613 + var d=document.documentElement;
614 + var pct=d.scrollTop/(d.scrollHeight-d.clientHeight);
615 + bar.style.width=(pct*100)+'%';
616 + d.scrollTop>280?top.classList.add('on'):top.classList.remove('on');
617 + },{passive:true});
618 + var links=Array.from(document.querySelectorAll('[data-toc]'));
619 + var secs=links.map(function(a){return{el:document.getElementById(a.getAttribute('href').slice(1)),a:a};}).filter(function(s){return s.el;});
620 + var busy=false;
621 + var obs=new IntersectionObserver(function(entries){
622 + if(busy)return;
623 + entries.forEach(function(e){
624 + if(!e.isIntersecting)return;
625 + var i=secs.findIndex(function(s){return s.el===e.target;});
626 + if(i<0)return;
627 + secs.forEach(function(s){s.a.classList.remove('toc-on');});
628 + secs[i].a.classList.add('toc-on');
629 + var toc=document.querySelector('.doc-toc');
630 + var link=secs[i].a;
631 + toc.scrollTop=link.offsetTop-toc.offsetTop-toc.clientHeight/2+link.clientHeight/2;
632 + });
633 + },{rootMargin:'-8% 0px -60% 0px',threshold:0});
634 + secs.forEach(function(s){obs.observe(s.el);});
635 + links.forEach(function(a){
636 + a.addEventListener('click',function(e){
637 + var id=a.getAttribute('href').slice(1);
638 + var el=document.getElementById(id);
639 + if(!el)return;
640 + e.preventDefault();
641 + busy=true;
642 + secs.forEach(function(s){s.a.classList.remove('toc-on');});
643 + a.classList.add('toc-on');
644 + el.scrollIntoView({behavior:'smooth',block:'start'});
645 + setTimeout(function(){busy=false;},900);
646 + });
647 + });
648 + var tocList=document.getElementById('toc-list');
649 + var togBtn=document.getElementById('toc-tog');
650 + var collapsed=false;
651 + togBtn&&togBtn.addEventListener('click',function(){
652 + collapsed=!collapsed;
653 + tocList.style.display=collapsed?'none':'';
654 + togBtn.textContent=collapsed?'»':'«';
655 + });
656 + var lb=document.getElementById('rn-lb');
657 + var lbI=document.getElementById('rn-lb-img');
658 + var lbC=document.getElementById('rn-lb-cap');
659 + window.openLightbox=function(img){lbI.src=img.src;lbI.alt=img.alt;lbC.textContent=img.alt;lb.classList.add('open');document.body.style.overflow='hidden';};
660 + window.closeLightbox=function(){lb.classList.remove('open');document.body.style.overflow='';};
661 + lb.addEventListener('click',function(e){if(e.target===lb)closeLightbox();});
662 + document.addEventListener('keydown',function(e){if(e.key==='Escape')closeLightbox();});
663 + var toast=document.getElementById('rn-toast');
664 + var t;
665 + window.copyAnchor=function(id){
666 + var url=location.href.split('#')[0]+'#'+id;
667 + if(navigator.clipboard)navigator.clipboard.writeText(url).catch(function(){});
668 + else{var x=document.createElement('textarea');x.value=url;document.body.appendChild(x);x.select();document.execCommand('copy');document.body.removeChild(x);}
669 + toast.classList.add('on');clearTimeout(t);t=setTimeout(function(){toast.classList.remove('on');},1600);
670 + };
671 + (function(){
672 + var toc=document.querySelector('.doc-toc');
673 + var wrap=document.querySelector('.doc-wrap');
674 + if(!toc||!wrap)return;
675 + var navbar=document.querySelector('.navbar,nav.navbar,#topBar,header');
676 + var navH=navbar?navbar.offsetHeight:0;
677 + var footer=document.querySelector('footer,.xwikifooter,#xwikifooter,.bottombar,.sticky-container');
678 + function update(){
679 + var wr=wrap.getBoundingClientRect();
680 + if(wr.top<=navH){
681 + var footerTop=footer?footer.getBoundingClientRect().top:window.innerHeight;
682 + var h=Math.max(0,Math.min(window.innerHeight,footerTop)-navH);
683 + toc.classList.add('is-fixed');toc.style.top=navH+'px';toc.style.left=(wr.right-200)+'px';toc.style.height=h+'px';
684 + }else{toc.classList.remove('is-fixed');toc.style.top=toc.style.left=toc.style.height='';}
685 + }
686 + requestAnimationFrame(function(){requestAnimationFrame(function(){update();window.addEventListener('scroll',update,{passive:true});window.addEventListener('resize',update,{passive:true});});});
687 + })();
688 +})();
689 +</script>
690 +{{/html}}