node-opcua-client 2.71.0 → 2.72.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/dist/alarms_and_conditions/client_alarm.d.ts +45 -43
  2. package/dist/alarms_and_conditions/client_alarm.js +101 -84
  3. package/dist/alarms_and_conditions/client_alarm.js.map +1 -1
  4. package/dist/alarms_and_conditions/client_alarm_list.d.ts +25 -21
  5. package/dist/alarms_and_conditions/client_alarm_list.js +97 -97
  6. package/dist/alarms_and_conditions/client_alarm_list.js.map +1 -1
  7. package/dist/alarms_and_conditions/client_alarm_tools.d.ts +4 -4
  8. package/dist/alarms_and_conditions/client_alarm_tools.js +152 -139
  9. package/dist/alarms_and_conditions/client_alarm_tools.js.map +1 -1
  10. package/dist/alarms_and_conditions/client_alarm_tools_acknowledge_all_conditions.d.ts +18 -18
  11. package/dist/alarms_and_conditions/client_alarm_tools_acknowledge_all_conditions.js +190 -190
  12. package/dist/alarms_and_conditions/client_alarm_tools_dump_event.d.ts +9 -9
  13. package/dist/alarms_and_conditions/client_alarm_tools_dump_event.js +73 -73
  14. package/dist/alarms_and_conditions/client_alarm_tools_extractConditionFields.d.ts +8 -8
  15. package/dist/alarms_and_conditions/client_alarm_tools_extractConditionFields.js +120 -120
  16. package/dist/alarms_and_conditions/client_tools.d.ts +7 -7
  17. package/dist/alarms_and_conditions/client_tools.js +180 -180
  18. package/dist/alarms_and_conditions/client_tools.js.map +1 -1
  19. package/dist/client_base.d.ts +294 -290
  20. package/dist/client_base.js +13 -13
  21. package/dist/client_base.js.map +1 -1
  22. package/dist/client_monitored_item.d.ts +21 -21
  23. package/dist/client_monitored_item.js +11 -11
  24. package/dist/client_monitored_item_base.d.ts +39 -39
  25. package/dist/client_monitored_item_base.js +2 -2
  26. package/dist/client_monitored_item_group.d.ts +18 -18
  27. package/dist/client_monitored_item_group.js +13 -13
  28. package/dist/client_monitored_item_toolbox.d.ts +15 -15
  29. package/dist/client_monitored_item_toolbox.js +117 -117
  30. package/dist/client_session.d.ts +484 -484
  31. package/dist/client_session.js +10 -10
  32. package/dist/client_session_keepalive_manager.d.ts +34 -34
  33. package/dist/client_session_keepalive_manager.js +150 -150
  34. package/dist/client_subscription.d.ts +241 -241
  35. package/dist/client_subscription.js +14 -14
  36. package/dist/client_utils.d.ts +22 -22
  37. package/dist/client_utils.js +88 -88
  38. package/dist/common.d.ts +17 -17
  39. package/dist/common.js +5 -5
  40. package/dist/index.d.ts +55 -55
  41. package/dist/index.js +93 -93
  42. package/dist/opcua_client.d.ts +132 -132
  43. package/dist/opcua_client.js +33 -33
  44. package/dist/opcua_client.js.map +1 -1
  45. package/dist/private/client_base_impl.d.ts +169 -169
  46. package/dist/private/client_base_impl.js +1324 -1316
  47. package/dist/private/client_base_impl.js.map +1 -1
  48. package/dist/private/client_monitored_item_base_impl.d.ts +3 -3
  49. package/dist/private/client_monitored_item_base_impl.js +4 -4
  50. package/dist/private/client_monitored_item_group_impl.d.ts +53 -53
  51. package/dist/private/client_monitored_item_group_impl.js +159 -159
  52. package/dist/private/client_monitored_item_impl.d.ts +93 -93
  53. package/dist/private/client_monitored_item_impl.js +304 -304
  54. package/dist/private/client_publish_engine.d.ts +62 -62
  55. package/dist/private/client_publish_engine.js +408 -408
  56. package/dist/private/client_session_impl.d.ts +621 -621
  57. package/dist/private/client_session_impl.js +1301 -1301
  58. package/dist/private/client_subscription_impl.d.ts +93 -93
  59. package/dist/private/client_subscription_impl.js +743 -734
  60. package/dist/private/client_subscription_impl.js.map +1 -1
  61. package/dist/private/i_private_client.d.ts +18 -18
  62. package/dist/private/i_private_client.js +2 -2
  63. package/dist/private/opcua_client_impl.d.ts +169 -169
  64. package/dist/private/opcua_client_impl.js +978 -978
  65. package/dist/reconnection.d.ts +9 -9
  66. package/dist/reconnection.js +362 -362
  67. package/dist/tools/findservers.d.ts +20 -20
  68. package/dist/tools/findservers.js +61 -61
  69. package/dist/tools/read_history_server_capabilities.d.ts +6 -6
  70. package/dist/tools/read_history_server_capabilities.js +99 -99
  71. package/dist/verify.d.ts +5 -5
  72. package/dist/verify.js +134 -134
  73. package/package.json +30 -30
  74. package/source/alarms_and_conditions/client_alarm.ts +21 -1
  75. package/source/alarms_and_conditions/client_alarm_list.ts +6 -2
  76. package/source/alarms_and_conditions/client_alarm_tools.ts +32 -15
  77. package/source/alarms_and_conditions/client_tools.ts +4 -4
  78. package/source/client_base.ts +6 -3
  79. package/source/opcua_client.ts +0 -2
  80. package/source/private/client_base_impl.ts +22 -13
  81. package/source/private/client_subscription_impl.ts +8 -0
@@ -1,140 +1,153 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.installAlarmMonitoring = exports.uninstallAlarmMonitoring = void 0;
13
- const node_opcua_data_model_1 = require("node-opcua-data-model");
14
- const node_opcua_nodeid_1 = require("node-opcua-nodeid");
15
- const node_opcua_service_filter_1 = require("node-opcua-service-filter");
16
- const node_opcua_service_read_1 = require("node-opcua-service-read");
17
- const node_opcua_debug_1 = require("node-opcua-debug");
18
- const client_monitored_item_1 = require("../client_monitored_item");
19
- const client_alarm_1 = require("./client_alarm");
20
- const client_alarm_list_1 = require("./client_alarm_list");
21
- const client_alarm_tools_extractConditionFields_1 = require("./client_alarm_tools_extractConditionFields");
22
- const client_tools_1 = require("./client_tools");
23
- const doDebug = (0, node_opcua_debug_1.checkDebugFlag)(__filename);
24
- const debugLog = (0, node_opcua_debug_1.make_debugLog)(__filename);
25
- function r(_key, o) {
26
- if (o && o.dataType === "Null") {
27
- return undefined;
28
- }
29
- return o;
30
- }
31
- // ------------------------------------------------------------------------------------------------------------------------------
32
- function uninstallAlarmMonitoring(session) {
33
- return __awaiter(this, void 0, void 0, function* () {
34
- const _sessionPriv = session;
35
- if (!_sessionPriv.$clientAlarmList) {
36
- return;
37
- }
38
- const mi = _sessionPriv.$monitoredItemForAlarmList;
39
- mi.removeAllListeners();
40
- _sessionPriv.$monitoredItemForAlarmList = null;
41
- yield _sessionPriv.$subscriptionforAlarmList.terminate();
42
- _sessionPriv.$clientAlarmList = null;
43
- return;
44
- });
45
- }
46
- exports.uninstallAlarmMonitoring = uninstallAlarmMonitoring;
47
- // Release 1.04 8 OPC Unified Architecture, Part 9
48
- // 4.5 Condition state synchronization
49
- //
50
- // A Client that wishes to display the current status of Alarms and Conditions (known as a
51
- // “current Alarm display”) would use the following logic to process Refresh Event Notifications.
52
- // The Client flags all Retained Conditions as suspect on reception of the Event of the
53
- // RefreshStartEventType. The Client adds any new Events that are received during the Refresh
54
- // without flagging them as suspect. The Client also removes the suspect flag from any Retained
55
- // Conditions that are returned as part of the Refresh. When the Client receives a
56
- // RefreshEndEvent, the Client removes any remaining suspect Events, since they no longer
57
- // apply.
58
- // ------------------------------------------------------------------------------------------------------------------------------
59
- function installAlarmMonitoring(session) {
60
- return __awaiter(this, void 0, void 0, function* () {
61
- const _sessionPriv = session;
62
- // create
63
- if (_sessionPriv.$clientAlarmList) {
64
- return _sessionPriv.$clientAlarmList;
65
- }
66
- const clientAlarmList = new client_alarm_list_1.ClientAlarmList();
67
- _sessionPriv.$clientAlarmList = clientAlarmList;
68
- const request = {
69
- maxNotificationsPerPublish: 10000,
70
- priority: 6,
71
- publishingEnabled: true,
72
- requestedLifetimeCount: 10000,
73
- requestedMaxKeepAliveCount: 10,
74
- requestedPublishingInterval: 500
75
- };
76
- const subscription = yield session.createSubscription2(request);
77
- _sessionPriv.$subscriptionforAlarmList = subscription;
78
- const itemToMonitor = {
79
- attributeId: node_opcua_data_model_1.AttributeIds.EventNotifier,
80
- nodeId: (0, node_opcua_nodeid_1.resolveNodeId)("Server") // i=2253
81
- };
82
- const fields = yield (0, client_alarm_tools_extractConditionFields_1.extractConditionFields)(session, "AlarmConditionType");
83
- const eventFilter = (0, node_opcua_service_filter_1.constructEventFilter)(fields, [(0, node_opcua_nodeid_1.resolveNodeId)("AcknowledgeableConditionType")]);
84
- const monitoringParameters = {
85
- discardOldest: false,
86
- filter: eventFilter,
87
- queueSize: 10000,
88
- samplingInterval: 0
89
- };
90
- // now create a event monitored Item
91
- const event_monitoringItem = client_monitored_item_1.ClientMonitoredItem.create(subscription, itemToMonitor, monitoringParameters, node_opcua_service_read_1.TimestampsToReturn.Both);
92
- const RefreshStartEventType = (0, node_opcua_nodeid_1.resolveNodeId)("RefreshStartEventType").toString();
93
- const RefreshEndEventType = (0, node_opcua_nodeid_1.resolveNodeId)("RefreshEndEventType").toString();
94
- event_monitoringItem.on("changed", (eventFields) => {
95
- debugLog("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ---- ALARM RECEIVED");
96
- const pojo = (0, client_alarm_1.fieldsToJson)(fields, eventFields);
97
- try {
98
- if (pojo.eventType.value.toString() === RefreshStartEventType) {
99
- return;
100
- }
101
- if (pojo.eventType.value.toString() === RefreshEndEventType) {
102
- return;
103
- }
104
- if (!pojo.conditionId || !pojo.conditionId.value || pojo.conditionId.dataType === 0) {
105
- // not a acknowledgeable condition
106
- return;
107
- }
108
- clientAlarmList.update(pojo);
109
- }
110
- catch (err) {
111
- // tslint:disable-next-line: no-console
112
- console.log(JSON.stringify(pojo, r, " "));
113
- // tslint:disable-next-line: no-console
114
- console.log("Error !!", err);
115
- }
116
- // Release 1.04 8 OPC Unified Architecture, Part 9
117
- // 4.5 Condition state synchronization
118
- // RefreshRequiredEventType
119
- // Under some circumstances a Server may not be capable of ensuring the Client is fully
120
- // in sync with the current state of Condition instances. For example, if the underlying
121
- // system represented by the Server is reset or communications are lost for some period
122
- // of time the Server may need to resynchronize itself with the underlying system. In
123
- // these cases, the Server shall send an Event of the RefreshRequiredEventType to
124
- // advise the Client that a Refresh may be necessary. A Client receiving this special
125
- // Event should initiate a ConditionRefresh as noted in this clause.
126
- // TODO
127
- });
128
- try {
129
- yield (0, client_tools_1.callConditionRefresh)(subscription);
130
- }
131
- catch (err) {
132
- console.log("Server may not implement condition refresh", err.message);
133
- }
134
- _sessionPriv.$monitoredItemForAlarmList = event_monitoringItem;
135
- // also request updates
136
- return clientAlarmList;
137
- });
138
- }
139
- exports.installAlarmMonitoring = installAlarmMonitoring;
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.installAlarmMonitoring = exports.uninstallAlarmMonitoring = void 0;
13
+ const node_opcua_data_model_1 = require("node-opcua-data-model");
14
+ const node_opcua_nodeid_1 = require("node-opcua-nodeid");
15
+ const node_opcua_service_filter_1 = require("node-opcua-service-filter");
16
+ const node_opcua_service_read_1 = require("node-opcua-service-read");
17
+ const node_opcua_debug_1 = require("node-opcua-debug");
18
+ const client_alarm_1 = require("./client_alarm");
19
+ const client_alarm_list_1 = require("./client_alarm_list");
20
+ const client_alarm_tools_extractConditionFields_1 = require("./client_alarm_tools_extractConditionFields");
21
+ const client_tools_1 = require("./client_tools");
22
+ const doDebug = (0, node_opcua_debug_1.checkDebugFlag)("A&E");
23
+ const debugLog = (0, node_opcua_debug_1.make_debugLog)("A&E");
24
+ function r(_key, o) {
25
+ if (o && o.dataType === "Null") {
26
+ return undefined;
27
+ }
28
+ return o;
29
+ }
30
+ // ------------------------------------------------------------------------------------------------------------------------------
31
+ function uninstallAlarmMonitoring(session) {
32
+ return __awaiter(this, void 0, void 0, function* () {
33
+ const _sessionPriv = session;
34
+ if (!_sessionPriv.$clientAlarmList) {
35
+ return;
36
+ }
37
+ const mi = _sessionPriv.$monitoredItemForAlarmList;
38
+ mi.removeAllListeners();
39
+ _sessionPriv.$monitoredItemForAlarmList = null;
40
+ yield _sessionPriv.$subscriptionforAlarmList.terminate();
41
+ _sessionPriv.$clientAlarmList = null;
42
+ return;
43
+ });
44
+ }
45
+ exports.uninstallAlarmMonitoring = uninstallAlarmMonitoring;
46
+ // Release 1.04 8 OPC Unified Architecture, Part 9
47
+ // 4.5 Condition state synchronization
48
+ //
49
+ // A Client that wishes to display the current status of Alarms and Conditions (known as a
50
+ // “current Alarm display”) would use the following logic to process Refresh Event Notifications.
51
+ // The Client flags all Retained Conditions as suspect on reception of the Event of the
52
+ // RefreshStartEventType. The Client adds any new Events that are received during the Refresh
53
+ // without flagging them as suspect. The Client also removes the suspect flag from any Retained
54
+ // Conditions that are returned as part of the Refresh. When the Client receives a
55
+ // RefreshEndEvent, the Client removes any remaining suspect Events, since they no longer
56
+ // apply.
57
+ // ------------------------------------------------------------------------------------------------------------------------------
58
+ function installAlarmMonitoring(session) {
59
+ return __awaiter(this, void 0, void 0, function* () {
60
+ const _sessionPriv = session;
61
+ // create
62
+ if (_sessionPriv.$clientAlarmList) {
63
+ return _sessionPriv.$clientAlarmList;
64
+ }
65
+ const clientAlarmList = new client_alarm_list_1.ClientAlarmList();
66
+ _sessionPriv.$clientAlarmList = clientAlarmList;
67
+ const request = {
68
+ maxNotificationsPerPublish: 10000,
69
+ priority: 6,
70
+ publishingEnabled: true,
71
+ requestedLifetimeCount: 10000,
72
+ requestedMaxKeepAliveCount: 10,
73
+ requestedPublishingInterval: 500
74
+ };
75
+ const subscription = yield session.createSubscription2(request);
76
+ _sessionPriv.$subscriptionforAlarmList = subscription;
77
+ const itemToMonitor = {
78
+ attributeId: node_opcua_data_model_1.AttributeIds.EventNotifier,
79
+ nodeId: (0, node_opcua_nodeid_1.resolveNodeId)("Server") // i=2253
80
+ };
81
+ const fields = yield (0, client_alarm_tools_extractConditionFields_1.extractConditionFields)(session, "AlarmConditionType");
82
+ const eventFilter = (0, node_opcua_service_filter_1.constructEventFilter)(fields, [(0, node_opcua_nodeid_1.resolveNodeId)("AcknowledgeableConditionType")]);
83
+ const monitoringParameters = {
84
+ discardOldest: false,
85
+ filter: eventFilter,
86
+ queueSize: 10000,
87
+ samplingInterval: 0
88
+ };
89
+ // now create a event monitored Item
90
+ const eventMonitoringItem = yield subscription.monitor(itemToMonitor, monitoringParameters, node_opcua_service_read_1.TimestampsToReturn.Both);
91
+ const RefreshStartEventType = (0, node_opcua_nodeid_1.resolveNodeId)("RefreshStartEventType").toString();
92
+ const RefreshEndEventType = (0, node_opcua_nodeid_1.resolveNodeId)("RefreshEndEventType").toString();
93
+ const queueEvent = [];
94
+ function flushQueue() {
95
+ const q = [...queueEvent];
96
+ queueEvent.length = 0;
97
+ for (const pojo of q) {
98
+ clientAlarmList.update(pojo);
99
+ }
100
+ }
101
+ let inInit = true;
102
+ eventMonitoringItem.on("changed", (eventFields) => {
103
+ debugLog("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ---- ALARM RECEIVED");
104
+ const pojo = (0, client_alarm_1.fieldsToJson)(fields, eventFields);
105
+ try {
106
+ if (pojo.eventType.value.toString() === RefreshStartEventType) {
107
+ return;
108
+ }
109
+ if (pojo.eventType.value.toString() === RefreshEndEventType) {
110
+ return;
111
+ }
112
+ if (!pojo.conditionId || !pojo.conditionId.value || pojo.conditionId.dataType === 0) {
113
+ // not a acknowledgeable condition
114
+ return;
115
+ }
116
+ queueEvent.push(pojo);
117
+ if (queueEvent.length === 1 && !inInit) {
118
+ setTimeout(() => flushQueue(), 10);
119
+ }
120
+ }
121
+ catch (err) {
122
+ // tslint:disable-next-line: no-console
123
+ console.log(JSON.stringify(pojo, r, " "));
124
+ // tslint:disable-next-line: no-console
125
+ console.log("Error !!", err);
126
+ }
127
+ // Release 1.04 8 OPC Unified Architecture, Part 9
128
+ // 4.5 Condition state synchronization
129
+ // RefreshRequiredEventType
130
+ // Under some circumstances a Server may not be capable of ensuring the Client is fully
131
+ // in sync with the current state of Condition instances. For example, if the underlying
132
+ // system represented by the Server is reset or communications are lost for some period
133
+ // of time the Server may need to resynchronize itself with the underlying system. In
134
+ // these cases, the Server shall send an Event of the RefreshRequiredEventType to
135
+ // advise the Client that a Refresh may be necessary. A Client receiving this special
136
+ // Event should initiate a ConditionRefresh as noted in this clause.
137
+ // TODO
138
+ });
139
+ try {
140
+ yield (0, client_tools_1.callConditionRefresh)(subscription);
141
+ }
142
+ catch (err) {
143
+ console.log("Server may not implement condition refresh", err.message);
144
+ }
145
+ _sessionPriv.$monitoredItemForAlarmList = eventMonitoringItem;
146
+ setTimeout(() => flushQueue(), 10);
147
+ inInit = false;
148
+ // also request updates
149
+ return clientAlarmList;
150
+ });
151
+ }
152
+ exports.installAlarmMonitoring = installAlarmMonitoring;
140
153
  //# sourceMappingURL=client_alarm_tools.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"client_alarm_tools.js","sourceRoot":"","sources":["../../source/alarms_and_conditions/client_alarm_tools.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iEAAqD;AACrD,yDAAkD;AAClD,yEAAiE;AACjE,qEAAiF;AAGjF,uDAAiE;AAEjE,oEAA+D;AAE/D,iDAA0D;AAC1D,2DAAsD;AACtD,2GAAqF;AACrF,iDAAsD;AAEtD,MAAM,OAAO,GAAG,IAAA,iCAAc,EAAC,UAAU,CAAC,CAAC;AAC3C,MAAM,QAAQ,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AAO;iBACV;gBACD,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,mBAAmB,EAAE;oBACzD,OAAO;iBACV;gBACD,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,IAAI,IAAI,CAAC,WAAW,CAAC,QAAQ,KAAK,CAAC,EAAE;oBACjF,kCAAkC;oBAClC,OAAO;iBACV;gBACD,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;aAChC;YAAC,OAAO,GAAG,EAAE;gBACV,uCAAuC;gBACvC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;gBAC1C,uCAAuC;gBACvC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;aAChC;YAED,kDAAkD;YAClD,sCAAsC;YACtC,2BAA2B;YAC3B,uFAAuF;YACvF,yFAAyF;YACzF,uFAAuF;YACvF,qFAAqF;YACrF,iFAAiF;YACjF,qFAAqF;YACrF,oEAAoE;YACpE,OAAO;QACX,CAAC,CAAC,CAAC;QAEH,IAAI;YACA,MAAM,IAAA,mCAAoB,EAAC,YAAY,CAAC,CAAC;SAC5C;QAAC,OAAO,GAAG,EAAE;YACV,OAAO,CAAC,GAAG,CAAC,4CAA4C,EAAU,GAAI,CAAC,OAAO,CAAC,CAAC;SACnF;QACD,YAAY,CAAC,0BAA0B,GAAG,oBAAoB,CAAC;QAC/D,uBAAuB;QACvB,OAAO,eAAe,CAAC;IAC3B,CAAC;CAAA;AA1FD,wDA0FC"}
1
+ {"version":3,"file":"client_alarm_tools.js","sourceRoot":"","sources":["../../source/alarms_and_conditions/client_alarm_tools.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iEAAqD;AACrD,yDAAkD;AAClD,yEAAiE;AACjE,qEAAiF;AAGjF,uDAAiE;AAKjE,iDAA0D;AAC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AiF;YACjF,qFAAqF;YACrF,oEAAoE;YACpE,OAAO;QACX,CAAC,CAAC,CAAC;QAEH,IAAI;YACA,MAAM,IAAA,mCAAoB,EAAC,YAAY,CAAC,CAAC;SAC5C;QAAC,OAAO,GAAG,EAAE;YACV,OAAO,CAAC,GAAG,CAAC,4CAA4C,EAAU,GAAI,CAAC,OAAO,CAAC,CAAC;SACnF;QACD,YAAY,CAAC,0BAA0B,GAAG,mBAAmB,CAAC;QAE9D,UAAU,CAAC,GAAG,EAAE,CAAC,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC;QACnC,MAAM,GAAG,KAAK,CAAC;QAEf,uBAAuB;QACvB,OAAO,eAAe,CAAC;IAC3B,CAAC;CAAA;AAtGD,wDAsGC"}
@@ -1,18 +1,18 @@
1
- import { StatusCode } from "node-opcua-status-code";
2
- import { ClientSession } from "../client_session";
3
- import { EventStuff } from "./client_alarm";
4
- /**
5
- *
6
- * @param session
7
- * @param eventStuff
8
- * @param comment
9
- */
10
- export declare function acknowledgeCondition(session: ClientSession, eventStuff: EventStuff, comment: string): Promise<StatusCode>;
11
- export declare function confirmCondition(session: ClientSession, eventStuff: EventStuff, comment: string): Promise<StatusCode>;
12
- /**
13
- * Enumerate all events
14
- * @param session
15
- */
16
- export declare function findActiveConditions(session: ClientSession): Promise<EventStuff[]>;
17
- export declare function acknwoledgeAllConditions(session: ClientSession, message: string): Promise<void>;
18
- export declare function confirmAllConditions(session: ClientSession, message: string): Promise<void>;
1
+ import { StatusCode } from "node-opcua-status-code";
2
+ import { ClientSession } from "../client_session";
3
+ import { EventStuff } from "./client_alarm";
4
+ /**
5
+ *
6
+ * @param session
7
+ * @param eventStuff
8
+ * @param comment
9
+ */
10
+ export declare function acknowledgeCondition(session: ClientSession, eventStuff: EventStuff, comment: string): Promise<StatusCode>;
11
+ export declare function confirmCondition(session: ClientSession, eventStuff: EventStuff, comment: string): Promise<StatusCode>;
12
+ /**
13
+ * Enumerate all events
14
+ * @param session
15
+ */
16
+ export declare function findActiveConditions(session: ClientSession): Promise<EventStuff[]>;
17
+ export declare function acknwoledgeAllConditions(session: ClientSession, message: string): Promise<void>;
18
+ export declare function confirmAllConditions(session: ClientSession, message: string): Promise<void>;