node-opcua-server 2.73.1 → 2.76.0
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.
- package/LICENSE +3 -1
- package/dist/base_server.d.ts +110 -110
- package/dist/base_server.js +473 -473
- package/dist/factory.d.ts +12 -12
- package/dist/factory.js +23 -23
- package/dist/filter/check_where_clause_on_address_space.d.ts +3 -0
- package/dist/filter/check_where_clause_on_address_space.js +23 -0
- package/dist/filter/check_where_clause_on_address_space.js.map +1 -0
- package/dist/filter/extract_event_fields.d.ts +10 -0
- package/dist/filter/extract_event_fields.js +18 -0
- package/dist/filter/extract_event_fields.js.map +1 -0
- package/dist/helper.d.ts +10 -10
- package/dist/helper.js +75 -75
- package/dist/history_server_capabilities.d.ts +35 -35
- package/dist/history_server_capabilities.js +43 -43
- package/dist/i_channel_data.d.ts +13 -13
- package/dist/i_channel_data.js +2 -2
- package/dist/i_register_server_manager.d.ts +16 -16
- package/dist/i_register_server_manager.js +2 -2
- package/dist/i_server_side_publish_engine.d.ts +36 -36
- package/dist/i_server_side_publish_engine.js +49 -49
- package/dist/i_socket_data.d.ts +11 -11
- package/dist/i_socket_data.js +2 -2
- package/dist/index.d.ts +16 -16
- package/dist/index.js +32 -32
- package/dist/monitored_item.d.ts +177 -177
- package/dist/monitored_item.js +1001 -999
- package/dist/monitored_item.js.map +1 -1
- package/dist/node_sampler.d.ts +3 -3
- package/dist/node_sampler.js +75 -75
- package/dist/opcua_server.d.ts +747 -650
- package/dist/opcua_server.js +2431 -2394
- package/dist/opcua_server.js.map +1 -1
- package/dist/queue.d.ts +11 -11
- package/dist/queue.js +71 -71
- package/dist/register_server_manager.d.ts +96 -96
- package/dist/register_server_manager.js +584 -584
- package/dist/register_server_manager_hidden.d.ts +17 -17
- package/dist/register_server_manager_hidden.js +27 -27
- package/dist/register_server_manager_mdns_only.d.ts +22 -22
- package/dist/register_server_manager_mdns_only.js +55 -55
- package/dist/server_capabilities.d.ts +148 -148
- package/dist/server_capabilities.js +92 -92
- package/dist/server_end_point.d.ts +183 -183
- package/dist/server_end_point.js +817 -817
- package/dist/server_engine.d.ts +317 -317
- package/dist/server_engine.js +1716 -1716
- package/dist/server_publish_engine.d.ts +113 -112
- package/dist/server_publish_engine.js +541 -535
- package/dist/server_publish_engine.js.map +1 -1
- package/dist/server_publish_engine_for_orphan_subscriptions.d.ts +16 -16
- package/dist/server_publish_engine_for_orphan_subscriptions.js +51 -51
- package/dist/server_session.d.ts +182 -182
- package/dist/server_session.js +739 -739
- package/dist/server_subscription.d.ts +421 -421
- package/dist/server_subscription.js +1346 -1345
- package/dist/server_subscription.js.map +1 -1
- package/dist/sessions_compatible_for_transfer.d.ts +2 -2
- package/dist/sessions_compatible_for_transfer.js +39 -39
- package/dist/user_manager.d.ts +32 -32
- package/dist/user_manager.js +74 -74
- package/dist/user_manager_ua.d.ts +3 -3
- package/dist/user_manager_ua.js +39 -39
- package/dist/validate_filter.d.ts +5 -5
- package/dist/validate_filter.js +60 -60
- package/package.json +50 -51
- package/source/filter/check_where_clause_on_address_space.ts +29 -0
- package/source/filter/extract_event_fields.ts +21 -0
- package/source/monitored_item.ts +5 -11
- package/source/opcua_server.ts +175 -36
- package/source/server_publish_engine.ts +24 -19
- package/source/server_subscription.ts +11 -10
package/dist/validate_filter.js
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateFilter = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* @module node-opcua-server
|
|
6
|
-
*/
|
|
7
|
-
const node_opcua_assert_1 = require("node-opcua-assert");
|
|
8
|
-
const node_opcua_data_model_1 = require("node-opcua-data-model");
|
|
9
|
-
const node_opcua_data_model_2 = require("node-opcua-data-model");
|
|
10
|
-
const node_opcua_nodeid_1 = require("node-opcua-nodeid");
|
|
11
|
-
const node_opcua_service_filter_1 = require("node-opcua-service-filter");
|
|
12
|
-
const node_opcua_service_subscription_1 = require("node-opcua-service-subscription");
|
|
13
|
-
const node_opcua_status_code_1 = require("node-opcua-status-code");
|
|
14
|
-
function __validateDataChangeFilter(filter, itemToMonitor, node) {
|
|
15
|
-
(0, node_opcua_assert_1.assert)(itemToMonitor.attributeId === node_opcua_data_model_1.AttributeIds.Value);
|
|
16
|
-
if (node.nodeClass !== node_opcua_data_model_2.NodeClass.Variable) {
|
|
17
|
-
return node_opcua_status_code_1.StatusCodes.BadNodeIdInvalid;
|
|
18
|
-
}
|
|
19
|
-
(0, node_opcua_assert_1.assert)(node.nodeClass === node_opcua_data_model_2.NodeClass.Variable);
|
|
20
|
-
// if node is not Numerical=> DataChangeFilter
|
|
21
|
-
(0, node_opcua_assert_1.assert)(node.dataType instanceof node_opcua_nodeid_1.NodeId);
|
|
22
|
-
const dataType = node.addressSpace.findDataType(node.dataType);
|
|
23
|
-
const dataTypeNumber = node.addressSpace.findDataType("Number");
|
|
24
|
-
if (filter.deadbandType !== node_opcua_service_subscription_1.DeadbandType.None) {
|
|
25
|
-
if (!dataType.isSupertypeOf(dataTypeNumber)) {
|
|
26
|
-
return node_opcua_status_code_1.StatusCodes.BadFilterNotAllowed;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
if (filter.deadbandType === node_opcua_service_subscription_1.DeadbandType.Percent) {
|
|
30
|
-
if (filter.deadbandValue < 0 || filter.deadbandValue > 100) {
|
|
31
|
-
return node_opcua_status_code_1.StatusCodes.BadDeadbandFilterInvalid;
|
|
32
|
-
}
|
|
33
|
-
// node must also have a valid euRange
|
|
34
|
-
if (!node.euRange) {
|
|
35
|
-
// tslint:disable:no-console
|
|
36
|
-
console.log(" node has no euRange ! Dead band Percent cannot be used on node " + node.nodeId.toString());
|
|
37
|
-
return node_opcua_status_code_1.StatusCodes.BadMonitoredItemFilterUnsupported;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return node_opcua_status_code_1.StatusCodes.Good;
|
|
41
|
-
}
|
|
42
|
-
function validateFilter(filter, itemToMonitor, node) {
|
|
43
|
-
// handle filter information
|
|
44
|
-
if (filter && filter instanceof node_opcua_service_filter_1.EventFilter && itemToMonitor.attributeId !== node_opcua_data_model_1.AttributeIds.EventNotifier) {
|
|
45
|
-
// invalid filter on Event
|
|
46
|
-
return node_opcua_status_code_1.StatusCodes.BadFilterNotAllowed;
|
|
47
|
-
}
|
|
48
|
-
if (filter && filter instanceof node_opcua_service_filter_1.DataChangeFilter && itemToMonitor.attributeId !== node_opcua_data_model_1.AttributeIds.Value) {
|
|
49
|
-
// invalid DataChange filter on non Value Attribute
|
|
50
|
-
return node_opcua_status_code_1.StatusCodes.BadFilterNotAllowed;
|
|
51
|
-
}
|
|
52
|
-
if (filter && itemToMonitor.attributeId !== node_opcua_data_model_1.AttributeIds.EventNotifier && itemToMonitor.attributeId !== node_opcua_data_model_1.AttributeIds.Value) {
|
|
53
|
-
return node_opcua_status_code_1.StatusCodes.BadFilterNotAllowed;
|
|
54
|
-
}
|
|
55
|
-
if (filter instanceof node_opcua_service_filter_1.DataChangeFilter) {
|
|
56
|
-
return __validateDataChangeFilter(filter, itemToMonitor, node);
|
|
57
|
-
}
|
|
58
|
-
return node_opcua_status_code_1.StatusCodes.Good;
|
|
59
|
-
}
|
|
60
|
-
exports.validateFilter = validateFilter;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateFilter = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* @module node-opcua-server
|
|
6
|
+
*/
|
|
7
|
+
const node_opcua_assert_1 = require("node-opcua-assert");
|
|
8
|
+
const node_opcua_data_model_1 = require("node-opcua-data-model");
|
|
9
|
+
const node_opcua_data_model_2 = require("node-opcua-data-model");
|
|
10
|
+
const node_opcua_nodeid_1 = require("node-opcua-nodeid");
|
|
11
|
+
const node_opcua_service_filter_1 = require("node-opcua-service-filter");
|
|
12
|
+
const node_opcua_service_subscription_1 = require("node-opcua-service-subscription");
|
|
13
|
+
const node_opcua_status_code_1 = require("node-opcua-status-code");
|
|
14
|
+
function __validateDataChangeFilter(filter, itemToMonitor, node) {
|
|
15
|
+
(0, node_opcua_assert_1.assert)(itemToMonitor.attributeId === node_opcua_data_model_1.AttributeIds.Value);
|
|
16
|
+
if (node.nodeClass !== node_opcua_data_model_2.NodeClass.Variable) {
|
|
17
|
+
return node_opcua_status_code_1.StatusCodes.BadNodeIdInvalid;
|
|
18
|
+
}
|
|
19
|
+
(0, node_opcua_assert_1.assert)(node.nodeClass === node_opcua_data_model_2.NodeClass.Variable);
|
|
20
|
+
// if node is not Numerical=> DataChangeFilter
|
|
21
|
+
(0, node_opcua_assert_1.assert)(node.dataType instanceof node_opcua_nodeid_1.NodeId);
|
|
22
|
+
const dataType = node.addressSpace.findDataType(node.dataType);
|
|
23
|
+
const dataTypeNumber = node.addressSpace.findDataType("Number");
|
|
24
|
+
if (filter.deadbandType !== node_opcua_service_subscription_1.DeadbandType.None) {
|
|
25
|
+
if (!dataType.isSupertypeOf(dataTypeNumber)) {
|
|
26
|
+
return node_opcua_status_code_1.StatusCodes.BadFilterNotAllowed;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
if (filter.deadbandType === node_opcua_service_subscription_1.DeadbandType.Percent) {
|
|
30
|
+
if (filter.deadbandValue < 0 || filter.deadbandValue > 100) {
|
|
31
|
+
return node_opcua_status_code_1.StatusCodes.BadDeadbandFilterInvalid;
|
|
32
|
+
}
|
|
33
|
+
// node must also have a valid euRange
|
|
34
|
+
if (!node.euRange) {
|
|
35
|
+
// tslint:disable:no-console
|
|
36
|
+
console.log(" node has no euRange ! Dead band Percent cannot be used on node " + node.nodeId.toString());
|
|
37
|
+
return node_opcua_status_code_1.StatusCodes.BadMonitoredItemFilterUnsupported;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return node_opcua_status_code_1.StatusCodes.Good;
|
|
41
|
+
}
|
|
42
|
+
function validateFilter(filter, itemToMonitor, node) {
|
|
43
|
+
// handle filter information
|
|
44
|
+
if (filter && filter instanceof node_opcua_service_filter_1.EventFilter && itemToMonitor.attributeId !== node_opcua_data_model_1.AttributeIds.EventNotifier) {
|
|
45
|
+
// invalid filter on Event
|
|
46
|
+
return node_opcua_status_code_1.StatusCodes.BadFilterNotAllowed;
|
|
47
|
+
}
|
|
48
|
+
if (filter && filter instanceof node_opcua_service_filter_1.DataChangeFilter && itemToMonitor.attributeId !== node_opcua_data_model_1.AttributeIds.Value) {
|
|
49
|
+
// invalid DataChange filter on non Value Attribute
|
|
50
|
+
return node_opcua_status_code_1.StatusCodes.BadFilterNotAllowed;
|
|
51
|
+
}
|
|
52
|
+
if (filter && itemToMonitor.attributeId !== node_opcua_data_model_1.AttributeIds.EventNotifier && itemToMonitor.attributeId !== node_opcua_data_model_1.AttributeIds.Value) {
|
|
53
|
+
return node_opcua_status_code_1.StatusCodes.BadFilterNotAllowed;
|
|
54
|
+
}
|
|
55
|
+
if (filter instanceof node_opcua_service_filter_1.DataChangeFilter) {
|
|
56
|
+
return __validateDataChangeFilter(filter, itemToMonitor, node);
|
|
57
|
+
}
|
|
58
|
+
return node_opcua_status_code_1.StatusCodes.Good;
|
|
59
|
+
}
|
|
60
|
+
exports.validateFilter = validateFilter;
|
|
61
61
|
//# sourceMappingURL=validate_filter.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-opcua-server",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.76.0",
|
|
4
4
|
"description": "pure nodejs OPCUA SDK - module -server",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "tsc -b",
|
|
@@ -13,62 +13,61 @@
|
|
|
13
13
|
"types": "./dist/index.d.ts",
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@ster5/global-mutex": "^1.2.0",
|
|
16
|
-
"@types/underscore": "^1.11.4",
|
|
17
16
|
"async": "^3.2.4",
|
|
17
|
+
"chalk": "4.1.2",
|
|
18
18
|
"dequeue": "^1.0.5",
|
|
19
19
|
"lodash": "4.17.21",
|
|
20
|
-
"node-opcua-address-space": "2.
|
|
21
|
-
"node-opcua-
|
|
22
|
-
"node-opcua-
|
|
23
|
-
"node-opcua-
|
|
24
|
-
"node-opcua-
|
|
25
|
-
"node-opcua-
|
|
26
|
-
"node-opcua-client
|
|
27
|
-
"node-opcua-
|
|
28
|
-
"node-opcua-
|
|
20
|
+
"node-opcua-address-space": "2.76.0",
|
|
21
|
+
"node-opcua-address-space-base": "2.76.0",
|
|
22
|
+
"node-opcua-assert": "2.76.0",
|
|
23
|
+
"node-opcua-basic-types": "2.76.0",
|
|
24
|
+
"node-opcua-binary-stream": "2.76.0",
|
|
25
|
+
"node-opcua-certificate-manager": "2.76.0",
|
|
26
|
+
"node-opcua-client": "2.76.0",
|
|
27
|
+
"node-opcua-client-dynamic-extension-object": "2.76.0",
|
|
28
|
+
"node-opcua-common": "2.76.0",
|
|
29
|
+
"node-opcua-constants": "2.74.0",
|
|
29
30
|
"node-opcua-crypto": "^1.11.0",
|
|
30
|
-
"node-opcua-data-access": "2.
|
|
31
|
-
"node-opcua-data-model": "2.
|
|
32
|
-
"node-opcua-data-value": "2.
|
|
33
|
-
"node-opcua-date-time": "2.
|
|
34
|
-
"node-opcua-debug": "2.
|
|
35
|
-
"node-opcua-
|
|
36
|
-
"node-opcua-
|
|
37
|
-
"node-opcua-
|
|
38
|
-
"node-opcua-
|
|
39
|
-
"node-opcua-
|
|
40
|
-
"node-opcua-
|
|
41
|
-
"node-opcua-
|
|
42
|
-
"node-opcua-
|
|
43
|
-
"node-opcua-
|
|
44
|
-
"node-opcua-
|
|
45
|
-
"node-opcua-
|
|
46
|
-
"node-opcua-service-
|
|
47
|
-
"node-opcua-service-
|
|
48
|
-
"node-opcua-service-
|
|
49
|
-
"node-opcua-service-
|
|
50
|
-
"node-opcua-service-
|
|
51
|
-
"node-opcua-service-
|
|
52
|
-
"node-opcua-service-node
|
|
53
|
-
"node-opcua-service-
|
|
54
|
-
"node-opcua-service-
|
|
55
|
-
"node-opcua-service-
|
|
56
|
-
"node-opcua-service-
|
|
57
|
-
"node-opcua-service-
|
|
58
|
-
"node-opcua-
|
|
59
|
-
"node-opcua-
|
|
60
|
-
"node-opcua-
|
|
61
|
-
"node-opcua-
|
|
62
|
-
"
|
|
63
|
-
"node-opcua-types": "2.73.1",
|
|
64
|
-
"node-opcua-utils": "2.71.0",
|
|
65
|
-
"node-opcua-variant": "2.73.1"
|
|
31
|
+
"node-opcua-data-access": "2.76.0",
|
|
32
|
+
"node-opcua-data-model": "2.76.0",
|
|
33
|
+
"node-opcua-data-value": "2.76.0",
|
|
34
|
+
"node-opcua-date-time": "2.76.0",
|
|
35
|
+
"node-opcua-debug": "2.76.0",
|
|
36
|
+
"node-opcua-extension-object": "2.76.0",
|
|
37
|
+
"node-opcua-factory": "2.76.0",
|
|
38
|
+
"node-opcua-hostname": "2.76.0",
|
|
39
|
+
"node-opcua-nodeid": "2.76.0",
|
|
40
|
+
"node-opcua-nodesets": "2.74.0",
|
|
41
|
+
"node-opcua-numeric-range": "2.76.0",
|
|
42
|
+
"node-opcua-object-registry": "2.76.0",
|
|
43
|
+
"node-opcua-secure-channel": "2.76.0",
|
|
44
|
+
"node-opcua-service-browse": "2.76.0",
|
|
45
|
+
"node-opcua-service-call": "2.76.0",
|
|
46
|
+
"node-opcua-service-discovery": "2.76.0",
|
|
47
|
+
"node-opcua-service-endpoints": "2.76.0",
|
|
48
|
+
"node-opcua-service-filter": "2.76.0",
|
|
49
|
+
"node-opcua-service-history": "2.76.0",
|
|
50
|
+
"node-opcua-service-node-management": "2.76.0",
|
|
51
|
+
"node-opcua-service-query": "2.76.0",
|
|
52
|
+
"node-opcua-service-read": "2.76.0",
|
|
53
|
+
"node-opcua-service-register-node": "2.76.0",
|
|
54
|
+
"node-opcua-service-secure-channel": "2.76.0",
|
|
55
|
+
"node-opcua-service-session": "2.76.0",
|
|
56
|
+
"node-opcua-service-subscription": "2.76.0",
|
|
57
|
+
"node-opcua-service-translate-browse-path": "2.76.0",
|
|
58
|
+
"node-opcua-service-write": "2.76.0",
|
|
59
|
+
"node-opcua-status-code": "2.76.0",
|
|
60
|
+
"node-opcua-types": "2.76.0",
|
|
61
|
+
"node-opcua-utils": "2.76.0",
|
|
62
|
+
"node-opcua-variant": "2.76.0",
|
|
63
|
+
"thenify": "^3.3.1"
|
|
66
64
|
},
|
|
67
65
|
"devDependencies": {
|
|
68
|
-
"node-opcua-leak-detector": "2.
|
|
69
|
-
"node-opcua-test-helpers": "2.
|
|
66
|
+
"node-opcua-leak-detector": "2.76.0",
|
|
67
|
+
"node-opcua-test-helpers": "2.74.0",
|
|
70
68
|
"should": "^13.2.3",
|
|
71
|
-
"sinon": "^14.0.0"
|
|
69
|
+
"sinon": "^14.0.0",
|
|
70
|
+
"underscore": "^1.13.4"
|
|
72
71
|
},
|
|
73
72
|
"author": "Etienne Rossignon",
|
|
74
73
|
"license": "MIT",
|
|
@@ -85,5 +84,5 @@
|
|
|
85
84
|
"internet of things"
|
|
86
85
|
],
|
|
87
86
|
"homepage": "http://node-opcua.github.io/",
|
|
88
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "75d9b8cf894c8fbadf77d2c4a48a730d055465e7"
|
|
89
88
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { IAddressSpace, ISessionContext, IEventData } from "node-opcua-address-space-base";
|
|
2
|
+
import { checkFilter } from "node-opcua-service-filter";
|
|
3
|
+
import { FilterContextOnAddressSpace } from "node-opcua-service-filter";
|
|
4
|
+
import { ContentFilter } from "node-opcua-types";
|
|
5
|
+
|
|
6
|
+
export function checkWhereClauseOnAdressSpace(
|
|
7
|
+
addressSpace: IAddressSpace,
|
|
8
|
+
sessionContext: ISessionContext,
|
|
9
|
+
whereClause: ContentFilter,
|
|
10
|
+
eventData: IEventData
|
|
11
|
+
): boolean {
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
// const filterContext: FilterContext = {
|
|
15
|
+
// addressSpace,
|
|
16
|
+
// sessionContext,
|
|
17
|
+
// rootNode: eventData.$eventDataSource!,
|
|
18
|
+
// extractValue(operand: FilterOperand) {
|
|
19
|
+
// if (operand instanceof SimpleAttributeOperand) {
|
|
20
|
+
// return extractEventFields(filterContext.sessionContext, [operand], eventData)[0];
|
|
21
|
+
// } else {
|
|
22
|
+
// return new Variant({ dataType: DataType.Null });
|
|
23
|
+
// }
|
|
24
|
+
// }
|
|
25
|
+
// };
|
|
26
|
+
const filterContext = new FilterContextOnAddressSpace(sessionContext, eventData);
|
|
27
|
+
|
|
28
|
+
return checkFilter(filterContext, whereClause);
|
|
29
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IEventData, ISessionContext } from "node-opcua-address-space-base";
|
|
2
|
+
import { extractEventFieldsBase } from "node-opcua-service-filter";
|
|
3
|
+
import { FilterContextOnAddressSpace } from "node-opcua-service-filter";
|
|
4
|
+
import { SimpleAttributeOperand } from "node-opcua-types";
|
|
5
|
+
import { Variant } from "node-opcua-variant";
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @method extractEventFields
|
|
10
|
+
* extract a array of eventFields from a event node, matching the selectClauses
|
|
11
|
+
* @param selectClauses
|
|
12
|
+
* @param eventData : a pseudo Node that provides a browse Method and a readValue(nodeId)
|
|
13
|
+
*/
|
|
14
|
+
export function extractEventFields(
|
|
15
|
+
sessionContext: ISessionContext,
|
|
16
|
+
selectClauses: SimpleAttributeOperand[],
|
|
17
|
+
eventData: IEventData
|
|
18
|
+
): Variant[] {
|
|
19
|
+
const context = new FilterContextOnAddressSpace(sessionContext, eventData);
|
|
20
|
+
return extractEventFieldsBase(context, selectClauses);
|
|
21
|
+
}
|
package/source/monitored_item.ts
CHANGED
|
@@ -4,16 +4,9 @@
|
|
|
4
4
|
import { EventEmitter } from "events";
|
|
5
5
|
import * as chalk from "chalk";
|
|
6
6
|
import { assert } from "node-opcua-assert";
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
extractEventFields,
|
|
11
|
-
makeAttributeEventName,
|
|
12
|
-
SessionContext,
|
|
13
|
-
UAVariable,
|
|
14
|
-
checkWhereClause,
|
|
15
|
-
AddressSpace
|
|
16
|
-
} from "node-opcua-address-space";
|
|
7
|
+
import { BaseNode, IEventData, makeAttributeEventName, SessionContext, UAVariable, AddressSpace } from "node-opcua-address-space";
|
|
8
|
+
|
|
9
|
+
import { extractEventFields } from "node-opcua-service-filter";
|
|
17
10
|
import { DateTime, UInt32 } from "node-opcua-basic-types";
|
|
18
11
|
import { NodeClass, QualifiedNameOptions } from "node-opcua-data-model";
|
|
19
12
|
import { AttributeIds } from "node-opcua-data-model";
|
|
@@ -61,6 +54,7 @@ import { sameVariant, Variant } from "node-opcua-variant";
|
|
|
61
54
|
|
|
62
55
|
import { appendToTimer, removeFromTimer } from "./node_sampler";
|
|
63
56
|
import { validateFilter } from "./validate_filter";
|
|
57
|
+
import { checkWhereClauseOnAdressSpace } from "./filter/check_where_clause_on_address_space";
|
|
64
58
|
|
|
65
59
|
export type QueueItem = MonitoredItemNotification | EventFieldList;
|
|
66
60
|
|
|
@@ -925,7 +919,7 @@ export class MonitoredItem extends EventEmitter {
|
|
|
925
919
|
|
|
926
920
|
const addressSpace: AddressSpace = eventData.$eventDataSource?.addressSpace as AddressSpace;
|
|
927
921
|
|
|
928
|
-
if (!
|
|
922
|
+
if (!checkWhereClauseOnAdressSpace(addressSpace, SessionContext.defaultContext, this.filter.whereClause, eventData)) {
|
|
929
923
|
return;
|
|
930
924
|
}
|
|
931
925
|
|