node-opcua-address-space 2.77.0 → 2.79.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/dist/source/continuation_points/continuation_point_manager.d.ts +59 -0
- package/dist/source/continuation_points/continuation_point_manager.js +6 -6
- package/dist/source/continuation_points/continuation_point_manager.js.map +1 -1
- package/dist/source/index.d.ts +1 -0
- package/dist/source/index.js +1 -0
- package/dist/source/index.js.map +1 -1
- package/dist/source/loader/ensure_datatype_extracted.js +25 -0
- package/dist/source/loader/ensure_datatype_extracted.js.map +1 -1
- package/dist/source/loader/generateAddressSpaceRaw.d.ts +2 -1
- package/dist/source/loader/generateAddressSpaceRaw.js +2 -2
- package/dist/source/loader/generateAddressSpaceRaw.js.map +1 -1
- package/dist/source/loader/load_nodeset2.d.ts +7 -3
- package/dist/source/loader/load_nodeset2.js +66 -31
- package/dist/source/loader/load_nodeset2.js.map +1 -1
- package/dist/source/xml_writer.d.ts +5 -0
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.d.ts +1 -1
- package/dist/src/base_node_impl.d.ts +1 -0
- package/dist/src/base_node_impl.js +30 -3
- package/dist/src/base_node_impl.js.map +1 -1
- package/dist/src/base_node_private.js +5 -0
- package/dist/src/base_node_private.js.map +1 -1
- package/dist/src/historical_access/address_space_historical_data_node.js +14 -3
- package/dist/src/historical_access/address_space_historical_data_node.js.map +1 -1
- package/dist/src/index_current.d.ts +2 -1
- package/dist/src/index_current.js +3 -2
- package/dist/src/index_current.js.map +1 -1
- package/dist/src/namespace_impl.d.ts +2 -0
- package/dist/src/namespace_impl.js +11 -1
- package/dist/src/namespace_impl.js.map +1 -1
- package/dist/src/namespace_private.d.ts +1 -0
- package/dist/src/namespace_private.js.map +1 -1
- package/dist/src/nodeid_manager.d.ts +1 -0
- package/dist/src/nodeid_manager.js +14 -2
- package/dist/src/nodeid_manager.js.map +1 -1
- package/dist/src/nodeset_tools/{typedictionary_to_xml.d.ts → dump_to_bsd.d.ts} +1 -1
- package/dist/src/nodeset_tools/{typedictionary_to_xml.js → dump_to_bsd.js} +14 -5
- package/dist/src/nodeset_tools/dump_to_bsd.js.map +1 -0
- package/dist/src/nodeset_tools/nodeset_to_xml.d.ts +9 -1
- package/dist/src/nodeset_tools/nodeset_to_xml.js +220 -89
- package/dist/src/nodeset_tools/nodeset_to_xml.js.map +1 -1
- package/dist/src/tool_isSupertypeOf.js +12 -2
- package/dist/src/tool_isSupertypeOf.js.map +1 -1
- package/dist/src/ua_data_type_impl.js +10 -5
- package/dist/src/ua_data_type_impl.js.map +1 -1
- package/dist/src/ua_method_impl.d.ts +2 -1
- package/dist/src/ua_method_impl.js +9 -1
- package/dist/src/ua_method_impl.js.map +1 -1
- package/dist/src/ua_object_impl.js +8 -1
- package/dist/src/ua_object_impl.js.map +1 -1
- package/dist/src/ua_variable_impl.d.ts +5 -0
- package/dist/src/ua_variable_impl.js +36 -2
- package/dist/src/ua_variable_impl.js.map +1 -1
- package/dist/src/ua_variable_impl_ext_obj.js +1 -1
- package/dist/src/ua_variable_impl_ext_obj.js.map +1 -1
- package/distHelpers/get_mini_address_space.js +1 -1
- package/distHelpers/get_mini_address_space.js.map +1 -1
- package/distNodeJS/generate_address_space.d.ts +3 -1
- package/distNodeJS/generate_address_space.js +13 -2
- package/distNodeJS/generate_address_space.js.map +1 -1
- package/package.json +26 -26
- package/source/continuation_points/continuation_point_manager.ts +13 -12
- package/source/index.ts +1 -0
- package/source/loader/ensure_datatype_extracted.ts +38 -3
- package/source/loader/generateAddressSpaceRaw.ts +4 -3
- package/source/loader/load_nodeset2.ts +86 -33
- package/source/xml_writer.ts +3 -0
- package/source_nodejs/generate_address_space.ts +27 -5
- package/src/alarms_and_conditions/ua_limit_alarm_impl.ts +1 -1
- package/src/base_node_impl.ts +34 -3
- package/src/base_node_private.ts +6 -0
- package/src/historical_access/address_space_historical_data_node.ts +18 -3
- package/src/index_current.ts +3 -1
- package/src/namespace_impl.ts +24 -1
- package/src/namespace_private.ts +2 -0
- package/src/nodeid_manager.ts +14 -5
- package/src/nodeset_tools/{typedictionary_to_xml.ts → dump_to_bsd.ts} +24 -14
- package/src/nodeset_tools/nodeset_to_xml.ts +278 -77
- package/src/tool_isSupertypeOf.ts +14 -2
- package/src/ua_data_type_impl.ts +11 -7
- package/src/ua_method_impl.ts +9 -3
- package/src/ua_object_impl.ts +12 -2
- package/src/ua_variable_impl.ts +42 -4
- package/src/ua_variable_impl_ext_obj.ts +1 -1
- package/test_helpers/get_mini_address_space.ts +1 -1
- package/test_helpers/test_fixtures/mini.Node.Set2.xml +207 -0
- package/test_helpers/test_fixtures/nodeset_no_aliases.xml +30 -0
- package/test_helpers/test_fixtures/nodeset_no_aliases_with_aliases.xml +31 -0
- package/dist/source/helpers/check_event_clause.d.ts +0 -17
- package/dist/source/helpers/check_event_clause.js +0 -53
- package/dist/source/helpers/check_event_clause.js.map +0 -1
- package/dist/src/alarms_and_conditions/check_where_clause.d.ts +0 -4
- package/dist/src/alarms_and_conditions/check_where_clause.js +0 -110
- package/dist/src/alarms_and_conditions/check_where_clause.js.map +0 -1
- package/dist/src/alarms_and_conditions/condition_info.d.ts +0 -27
- package/dist/src/alarms_and_conditions/condition_info.js +0 -55
- package/dist/src/alarms_and_conditions/condition_info.js.map +0 -1
- package/dist/src/alarms_and_conditions/condition_snapshot.d.ts +0 -233
- package/dist/src/alarms_and_conditions/condition_snapshot.js +0 -667
- package/dist/src/alarms_and_conditions/condition_snapshot.js.map +0 -1
- package/dist/src/alarms_and_conditions/extract_event_fields.d.ts +0 -10
- package/dist/src/alarms_and_conditions/extract_event_fields.js +0 -90
- package/dist/src/alarms_and_conditions/extract_event_fields.js.map +0 -1
- package/dist/src/data_access/ua_multistate_value_discrete.d.ts +0 -51
- package/dist/src/data_access/ua_multistate_value_discrete.js +0 -250
- package/dist/src/data_access/ua_multistate_value_discrete.js.map +0 -1
- package/dist/src/data_access/ua_two_state_discrete.d.ts +0 -25
- package/dist/src/data_access/ua_two_state_discrete.js +0 -154
- package/dist/src/data_access/ua_two_state_discrete.js.map +0 -1
- package/dist/src/nodeset_tools/typedictionary_to_xml.js.map +0 -1
|
@@ -10,6 +10,7 @@ import { BaseNode, UADataType, UAObjectType, UAReference, UAReferenceType, UAVar
|
|
|
10
10
|
import { BaseNode_getCache } from "./base_node_private";
|
|
11
11
|
import { ReferenceImpl } from "./reference_impl";
|
|
12
12
|
import { BaseNodeImpl } from "./base_node_impl";
|
|
13
|
+
import { NodeClass } from "node-opcua-data-model";
|
|
13
14
|
|
|
14
15
|
const HasSubTypeNodeId = resolveNodeId("HasSubtype");
|
|
15
16
|
|
|
@@ -96,8 +97,19 @@ export type UAType = UAReferenceType | UADataType | UAObjectType | UAVariableTyp
|
|
|
96
97
|
|
|
97
98
|
export function construct_isSupertypeOf<T extends UAType>(Class: typeof BaseNodeImpl): IsSupertypeOfFunc<T> {
|
|
98
99
|
return wrap_memoize(function (this: T, baseType: T | NodeIdLike): boolean {
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
if (!(baseType instanceof Class)) {
|
|
101
|
+
throw new Error(
|
|
102
|
+
"expecting baseType to be " +
|
|
103
|
+
Class.name +
|
|
104
|
+
" but got " +
|
|
105
|
+
baseType.constructor.name +
|
|
106
|
+
" " +
|
|
107
|
+
NodeClass[(baseType as BaseNode).nodeClass]
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
if (!(this instanceof Class)) {
|
|
111
|
+
throw new Error("expecting this to be " + Class.name + " but got " + baseType.constructor.name);
|
|
112
|
+
}
|
|
101
113
|
return _slow_isSupertypeOf.call(this, Class, baseType as T);
|
|
102
114
|
}, hashBaseNode);
|
|
103
115
|
}
|
package/src/ua_data_type_impl.ts
CHANGED
|
@@ -16,12 +16,11 @@ import {
|
|
|
16
16
|
EnumDefinition,
|
|
17
17
|
EnumFieldOptions,
|
|
18
18
|
StructureDefinition,
|
|
19
|
-
StructureField,
|
|
20
19
|
StructureFieldOptions,
|
|
21
20
|
StructureType
|
|
22
21
|
} from "node-opcua-types";
|
|
23
22
|
import { DataType } from "node-opcua-variant";
|
|
24
|
-
import { UAObject, ISessionContext, UADataType, UAVariable, BaseNode
|
|
23
|
+
import { UAObject, ISessionContext, UADataType, UAVariable, BaseNode } from "node-opcua-address-space-base";
|
|
25
24
|
import { DataTypeIds } from "node-opcua-constants";
|
|
26
25
|
import { IStructuredTypeSchema } from "node-opcua-factory";
|
|
27
26
|
|
|
@@ -124,11 +123,15 @@ export class UADataTypeImpl extends BaseNodeImpl implements UADataType {
|
|
|
124
123
|
break;
|
|
125
124
|
case AttributeIds.DataTypeDefinition:
|
|
126
125
|
{
|
|
127
|
-
|
|
128
|
-
if (_definition !== null) {
|
|
129
|
-
options.value = { dataType: DataType.ExtensionObject, value: _definition };
|
|
130
|
-
} else {
|
|
126
|
+
if (this.namespace.$emulateVersion103) {
|
|
131
127
|
options.statusCode = StatusCodes.BadAttributeIdInvalid;
|
|
128
|
+
} else {
|
|
129
|
+
const _definition = this._getDefinition()?.clone();
|
|
130
|
+
if (_definition !== null) {
|
|
131
|
+
options.value = { dataType: DataType.ExtensionObject, value: _definition };
|
|
132
|
+
} else {
|
|
133
|
+
options.statusCode = StatusCodes.BadAttributeIdInvalid;
|
|
134
|
+
}
|
|
132
135
|
}
|
|
133
136
|
}
|
|
134
137
|
break;
|
|
@@ -414,6 +417,7 @@ function makeEnumDefinition(definitionFields: EnumFieldOptions[]) {
|
|
|
414
417
|
}))
|
|
415
418
|
});
|
|
416
419
|
}
|
|
420
|
+
|
|
417
421
|
function makeStructureDefinition(
|
|
418
422
|
name: string,
|
|
419
423
|
baseDataType: NodeId,
|
|
@@ -464,4 +468,4 @@ function lockReadOnlyWithWriteDetection<T>(obj: T): T {
|
|
|
464
468
|
}
|
|
465
469
|
return obj;
|
|
466
470
|
}
|
|
467
|
-
*/
|
|
471
|
+
*/
|
package/src/ua_method_impl.ts
CHANGED
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
defaultCloneFilter,
|
|
32
32
|
defaultCloneExtraInfo
|
|
33
33
|
} from "node-opcua-address-space-base";
|
|
34
|
-
import { SessionContext } from "../source";
|
|
34
|
+
import { SessionContext } from "../source/session_context";
|
|
35
35
|
import { _clone } from "./base_node_private";
|
|
36
36
|
import { _handle_hierarchy_parent } from "./namespace_impl";
|
|
37
37
|
import { BaseNodeImpl } from "./base_node_impl";
|
|
@@ -85,7 +85,13 @@ export class UAMethodImpl extends BaseNodeImpl implements UAMethod {
|
|
|
85
85
|
}
|
|
86
86
|
return true;
|
|
87
87
|
}
|
|
88
|
-
|
|
88
|
+
public getUserExecutableFlag(context: ISessionContext | null): boolean {
|
|
89
|
+
if (context && !context.checkPermission(this, PermissionType.Call)) {
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
if (!this.getExecutableFlag(context)) return false;
|
|
93
|
+
return true;
|
|
94
|
+
}
|
|
89
95
|
/**
|
|
90
96
|
*
|
|
91
97
|
* @returns true if the method is bound
|
|
@@ -107,7 +113,7 @@ export class UAMethodImpl extends BaseNodeImpl implements UAMethod {
|
|
|
107
113
|
options.statusCode = StatusCodes.Good;
|
|
108
114
|
break;
|
|
109
115
|
case AttributeIds.UserExecutable:
|
|
110
|
-
options.value = { dataType: DataType.Boolean, value: this.
|
|
116
|
+
options.value = { dataType: DataType.Boolean, value: this.getUserExecutableFlag(context) };
|
|
111
117
|
options.statusCode = StatusCodes.Good;
|
|
112
118
|
break;
|
|
113
119
|
default:
|
package/src/ua_object_impl.ts
CHANGED
|
@@ -30,11 +30,14 @@ import {
|
|
|
30
30
|
defaultCloneExtraInfo,
|
|
31
31
|
EventNotifierFlags
|
|
32
32
|
} from "node-opcua-address-space-base";
|
|
33
|
+
import { make_errorLog } from "node-opcua-debug";
|
|
33
34
|
|
|
34
35
|
import { BaseNodeImpl, InternalBaseNodeOptions } from "./base_node_impl";
|
|
35
36
|
import { _clone, ToStringBuilder, UAObject_toString } from "./base_node_private";
|
|
36
37
|
import { apply_condition_refresh, ConditionRefreshCache } from "./apply_condition_refresh";
|
|
37
38
|
|
|
39
|
+
const errorLog = make_errorLog(__filename);
|
|
40
|
+
|
|
38
41
|
export class UAObjectImpl extends BaseNodeImpl implements UAObject {
|
|
39
42
|
private _eventNotifier: EventNotifierFlags;
|
|
40
43
|
public readonly nodeClass = NodeClass.Object;
|
|
@@ -44,6 +47,14 @@ export class UAObjectImpl extends BaseNodeImpl implements UAObject {
|
|
|
44
47
|
public readonly symbolicName: string | null;
|
|
45
48
|
|
|
46
49
|
get typeDefinitionObj(): UAObjectType {
|
|
50
|
+
// istanbul ignore next
|
|
51
|
+
if (super.typeDefinitionObj.nodeClass !== NodeClass.ObjectType) {
|
|
52
|
+
const msg = `Invalid type definition node class , expecting a ObjectType got ${
|
|
53
|
+
NodeClass[super.typeDefinitionObj.nodeClass]
|
|
54
|
+
}\n${this.browseName.toString()} ${this.nodeId.toString()}`;
|
|
55
|
+
errorLog(msg);
|
|
56
|
+
throw new Error(msg);
|
|
57
|
+
}
|
|
47
58
|
return super.typeDefinitionObj as UAObjectType;
|
|
48
59
|
}
|
|
49
60
|
|
|
@@ -79,7 +90,6 @@ export class UAObjectImpl extends BaseNodeImpl implements UAObject {
|
|
|
79
90
|
}
|
|
80
91
|
|
|
81
92
|
public clone(options: CloneOptions, optionalFilter?: CloneFilter, extraInfo?: CloneExtraInfo): UAObject {
|
|
82
|
-
options = options || {};
|
|
83
93
|
options = {
|
|
84
94
|
...options,
|
|
85
95
|
eventNotifier: this.eventNotifier,
|
|
@@ -156,7 +166,7 @@ export class UAObjectImpl extends BaseNodeImpl implements UAObject {
|
|
|
156
166
|
// coerce EventType
|
|
157
167
|
eventTypeNode = addressSpace.findEventType(eventType as UAEventType) as UAEventType;
|
|
158
168
|
const baseEventType = addressSpace.findEventType("BaseEventType")!;
|
|
159
|
-
|
|
169
|
+
|
|
160
170
|
data.$eventDataSource = eventTypeNode;
|
|
161
171
|
data.sourceNode = data.sourceNode || { dataType: DataType.NodeId, value: this.nodeId };
|
|
162
172
|
|
package/src/ua_variable_impl.ts
CHANGED
|
@@ -310,6 +310,12 @@ export class UAVariableImpl extends BaseNodeImpl implements UAVariable {
|
|
|
310
310
|
public __waiting_callbacks?: any[];
|
|
311
311
|
|
|
312
312
|
get typeDefinitionObj(): UAVariableType {
|
|
313
|
+
// istanbul ignore next
|
|
314
|
+
if (super.typeDefinitionObj && super.typeDefinitionObj.nodeClass !== NodeClass.VariableType) {
|
|
315
|
+
throw new Error(
|
|
316
|
+
"Invalid type definition node class , expecting a VariableType got " + NodeClass[super.typeDefinitionObj.nodeClass]
|
|
317
|
+
);
|
|
318
|
+
}
|
|
313
319
|
return super.typeDefinitionObj as UAVariableType;
|
|
314
320
|
}
|
|
315
321
|
get typeDefinition(): NodeId {
|
|
@@ -383,6 +389,25 @@ export class UAVariableImpl extends BaseNodeImpl implements UAVariable {
|
|
|
383
389
|
return this.checkPermissionAndAccessLevelPrivate(context, PermissionType.Write, AccessLevelFlag.CurrentWrite);
|
|
384
390
|
}
|
|
385
391
|
|
|
392
|
+
public canUserReadHistory(context: ISessionContext): boolean {
|
|
393
|
+
return this.checkPermissionAndAccessLevelPrivate(context, PermissionType.ReadHistory, AccessLevelFlag.HistoryRead);
|
|
394
|
+
}
|
|
395
|
+
public canUserWriteHistorizingAttribute(context: ISessionContext): boolean {
|
|
396
|
+
if (context && !context.checkPermission(this, PermissionType.WriteHistorizing)) {
|
|
397
|
+
return false;
|
|
398
|
+
}
|
|
399
|
+
return true;
|
|
400
|
+
}
|
|
401
|
+
public canUserInsertHistory(context: ISessionContext): boolean {
|
|
402
|
+
return this.checkPermissionAndAccessLevelPrivate(context, PermissionType.InsertHistory, AccessLevelFlag.HistoryWrite);
|
|
403
|
+
}
|
|
404
|
+
public canUserModifyHistory(context: ISessionContext): boolean {
|
|
405
|
+
return this.checkPermissionAndAccessLevelPrivate(context, PermissionType.ModifyHistory, AccessLevelFlag.HistoryWrite);
|
|
406
|
+
}
|
|
407
|
+
public canUserDeleteHistory(context: ISessionContext): boolean {
|
|
408
|
+
return this.checkPermissionAndAccessLevelPrivate(context, PermissionType.DeleteHistory, AccessLevelFlag.HistoryWrite);
|
|
409
|
+
}
|
|
410
|
+
|
|
386
411
|
/**
|
|
387
412
|
*
|
|
388
413
|
*
|
|
@@ -943,6 +968,10 @@ export class UAVariableImpl extends BaseNodeImpl implements UAVariable {
|
|
|
943
968
|
if (!callback) {
|
|
944
969
|
throw new Error("Internal error");
|
|
945
970
|
}
|
|
971
|
+
|
|
972
|
+
if (!this.canUserWriteAttribute(context, writeValueOptions.attributeId!)) {
|
|
973
|
+
return callback(null, StatusCodes.BadUserAccessDenied);
|
|
974
|
+
}
|
|
946
975
|
const writeValue: WriteValue =
|
|
947
976
|
writeValueOptions instanceof WriteValue ? (writeValueOptions as WriteValue) : new WriteValue(writeValueOptions);
|
|
948
977
|
|
|
@@ -966,18 +995,20 @@ export class UAVariableImpl extends BaseNodeImpl implements UAVariable {
|
|
|
966
995
|
break;
|
|
967
996
|
case AttributeIds.Historizing:
|
|
968
997
|
if (writeValue.value!.value.dataType !== DataType.Boolean) {
|
|
969
|
-
return callback(null, StatusCodes.
|
|
998
|
+
return callback(null, StatusCodes.BadTypeMismatch);
|
|
999
|
+
}
|
|
1000
|
+
if (!this.canUserWriteHistorizingAttribute(context)) {
|
|
1001
|
+
return callback(null, StatusCodes.BadUserAccessDenied);
|
|
970
1002
|
}
|
|
971
1003
|
// if the variable has no historizing in place reject
|
|
972
|
-
if (!(
|
|
1004
|
+
if (!this.getChildByName("HA Configuration")) {
|
|
973
1005
|
return callback(null, StatusCodes.BadNotSupported);
|
|
974
1006
|
}
|
|
975
1007
|
// check if user is allowed to do that !
|
|
976
1008
|
// TODO
|
|
977
|
-
|
|
978
1009
|
this.historizing = !!writeValue.value!.value.value; // yes ! indeed !
|
|
979
|
-
|
|
980
1010
|
return callback(null, StatusCodes.Good);
|
|
1011
|
+
|
|
981
1012
|
default:
|
|
982
1013
|
super.writeAttribute(context, writeValue, callback);
|
|
983
1014
|
break;
|
|
@@ -1490,6 +1521,7 @@ export class UAVariableImpl extends BaseNodeImpl implements UAVariable {
|
|
|
1490
1521
|
if (typeof this._historyRead !== "function") {
|
|
1491
1522
|
return callback!(null, new HistoryReadResult({ statusCode: StatusCodes.BadNotReadable }));
|
|
1492
1523
|
}
|
|
1524
|
+
|
|
1493
1525
|
this._historyRead(context, historyReadDetails, indexRange, dataEncoding, continuationData, callback!);
|
|
1494
1526
|
}
|
|
1495
1527
|
|
|
@@ -1528,6 +1560,12 @@ export class UAVariableImpl extends BaseNodeImpl implements UAVariable {
|
|
|
1528
1560
|
continuationData: ContinuationData,
|
|
1529
1561
|
callback: CallbackT<HistoryReadResult>
|
|
1530
1562
|
): void {
|
|
1563
|
+
if (!this.canUserReadHistory(context)) {
|
|
1564
|
+
const result = new HistoryReadResult({
|
|
1565
|
+
statusCode: StatusCodes.BadUserAccessDenied
|
|
1566
|
+
});
|
|
1567
|
+
callback(null, result);
|
|
1568
|
+
}
|
|
1531
1569
|
const result = new HistoryReadResult({
|
|
1532
1570
|
statusCode: StatusCodes.BadHistoryOperationUnsupported
|
|
1533
1571
|
});
|
|
@@ -279,7 +279,7 @@ export function _installExtensionObjectBindingOnProperties(
|
|
|
279
279
|
}
|
|
280
280
|
|
|
281
281
|
const camelCaseName = lowerFirstLetter(field.name!);
|
|
282
|
-
assert(Object.prototype.hasOwnProperty.call(variableNode.$extensionObject, camelCaseName));
|
|
282
|
+
// assert(Object.prototype.hasOwnProperty.call(variableNode.$extensionObject, camelCaseName));
|
|
283
283
|
|
|
284
284
|
if (variableNode.$extensionObject[camelCaseName] !== undefined && basicDataType === DataType.ExtensionObject) {
|
|
285
285
|
propertyNode.bindExtensionObject(variableNode.$extensionObject[camelCaseName], { ...options, force: true });
|
|
@@ -29,7 +29,7 @@ export function getMiniAddressSpace(...args: any[]): any {
|
|
|
29
29
|
const serverNamespace = addressSpace.registerNamespace("http://MYNAMESPACE");
|
|
30
30
|
assert(serverNamespace.index === 1);
|
|
31
31
|
|
|
32
|
-
generateAddressSpace(addressSpace, get_mini_nodeset_filename(), (err?: Error) => {
|
|
32
|
+
generateAddressSpace(addressSpace, get_mini_nodeset_filename(), {}, (err?: Error) => {
|
|
33
33
|
// istanbul ignore next
|
|
34
34
|
if (err) {
|
|
35
35
|
// tslint:disable:no-console
|
|
@@ -426,6 +426,35 @@
|
|
|
426
426
|
</References>
|
|
427
427
|
<InverseName>MayBeEffectedBy</InverseName>
|
|
428
428
|
</UAReferenceType>
|
|
429
|
+
|
|
430
|
+
<UADataType NodeId="i=95" BrowseName="AccessRestrictionType">
|
|
431
|
+
<DisplayName>AccessRestrictionType</DisplayName>
|
|
432
|
+
<References>
|
|
433
|
+
<Reference ReferenceType="HasProperty">i=15035</Reference>
|
|
434
|
+
<Reference ReferenceType="HasSubtype" IsForward="false">i=5</Reference>
|
|
435
|
+
</References>
|
|
436
|
+
<Definition Name="AccessRestrictionType" IsOptionSet="true">
|
|
437
|
+
<Field Name="SigningRequired" Value="0" />
|
|
438
|
+
<Field Name="EncryptionRequired" Value="1" />
|
|
439
|
+
<Field Name="SessionRequired" Value="2" />
|
|
440
|
+
<Field Name="ApplyRestrictionsToBrowse" Value="3" />
|
|
441
|
+
</Definition>
|
|
442
|
+
</UADataType>
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
<UADataType NodeId="i=96" BrowseName="RolePermissionType">
|
|
446
|
+
<DisplayName>RolePermissionType</DisplayName>
|
|
447
|
+
<Documentation>https://reference.opcfoundation.org/v104/Core/docs/Part3/5.2.9</Documentation>
|
|
448
|
+
<References>
|
|
449
|
+
<Reference ReferenceType="HasSubtype" IsForward="false">i=22</Reference>
|
|
450
|
+
</References>
|
|
451
|
+
<Definition Name="RolePermissionType">
|
|
452
|
+
<Field Name="RoleId" DataType="i=17" />
|
|
453
|
+
<Field Name="Permissions" DataType="i=94" />
|
|
454
|
+
</Definition>
|
|
455
|
+
</UADataType>
|
|
456
|
+
|
|
457
|
+
|
|
429
458
|
<UAReferenceType NodeId="i=117" BrowseName="HasSubStateMachine">
|
|
430
459
|
<DisplayName>HasSubStateMachine</DisplayName>
|
|
431
460
|
<Description>The type for a reference to a substate for a state.</Description>
|
|
@@ -4526,4 +4555,182 @@
|
|
|
4526
4555
|
<Field Name="Opaque" Value="3" />
|
|
4527
4556
|
</Definition>
|
|
4528
4557
|
</UADataType>
|
|
4558
|
+
|
|
4559
|
+
<UAObjectType NodeId="i=11187" BrowseName="AggregateConfigurationType">
|
|
4560
|
+
<DisplayName>AggregateConfigurationType</DisplayName>
|
|
4561
|
+
<References>
|
|
4562
|
+
<Reference ReferenceType="HasProperty">i=11188</Reference>
|
|
4563
|
+
<Reference ReferenceType="HasProperty">i=11189</Reference>
|
|
4564
|
+
<Reference ReferenceType="HasProperty">i=11190</Reference>
|
|
4565
|
+
<Reference ReferenceType="HasProperty">i=11191</Reference>
|
|
4566
|
+
<Reference ReferenceType="HasSubtype" IsForward="false">i=58</Reference>
|
|
4567
|
+
</References>
|
|
4568
|
+
</UAObjectType>
|
|
4569
|
+
<UAVariable NodeId="i=11188" BrowseName="TreatUncertainAsBad" ParentNodeId="i=11187" DataType="Boolean">
|
|
4570
|
+
<DisplayName>TreatUncertainAsBad</DisplayName>
|
|
4571
|
+
<References>
|
|
4572
|
+
<Reference ReferenceType="HasTypeDefinition">i=68</Reference>
|
|
4573
|
+
<Reference ReferenceType="HasModellingRule">i=78</Reference>
|
|
4574
|
+
<Reference ReferenceType="HasProperty" IsForward="false">i=11187</Reference>
|
|
4575
|
+
</References>
|
|
4576
|
+
</UAVariable>
|
|
4577
|
+
<UAVariable NodeId="i=11189" BrowseName="PercentDataBad" ParentNodeId="i=11187" DataType="Byte">
|
|
4578
|
+
<DisplayName>PercentDataBad</DisplayName>
|
|
4579
|
+
<References>
|
|
4580
|
+
<Reference ReferenceType="HasTypeDefinition">i=68</Reference>
|
|
4581
|
+
<Reference ReferenceType="HasModellingRule">i=78</Reference>
|
|
4582
|
+
<Reference ReferenceType="HasProperty" IsForward="false">i=11187</Reference>
|
|
4583
|
+
</References>
|
|
4584
|
+
</UAVariable>
|
|
4585
|
+
<UAVariable NodeId="i=11190" BrowseName="PercentDataGood" ParentNodeId="i=11187" DataType="Byte">
|
|
4586
|
+
<DisplayName>PercentDataGood</DisplayName>
|
|
4587
|
+
<References>
|
|
4588
|
+
<Reference ReferenceType="HasTypeDefinition">i=68</Reference>
|
|
4589
|
+
<Reference ReferenceType="HasModellingRule">i=78</Reference>
|
|
4590
|
+
<Reference ReferenceType="HasProperty" IsForward="false">i=11187</Reference>
|
|
4591
|
+
</References>
|
|
4592
|
+
</UAVariable>
|
|
4593
|
+
<UAVariable NodeId="i=11191" BrowseName="UseSlopedExtrapolation" ParentNodeId="i=11187" DataType="Boolean">
|
|
4594
|
+
<DisplayName>UseSlopedExtrapolation</DisplayName>
|
|
4595
|
+
<References>
|
|
4596
|
+
<Reference ReferenceType="HasTypeDefinition">i=68</Reference>
|
|
4597
|
+
<Reference ReferenceType="HasModellingRule">i=78</Reference>
|
|
4598
|
+
<Reference ReferenceType="HasProperty" IsForward="false">i=11187</Reference>
|
|
4599
|
+
</References>
|
|
4600
|
+
</UAVariable>
|
|
4601
|
+
|
|
4602
|
+
<UAObjectType NodeId="i=2318" BrowseName="HistoricalDataConfigurationType">
|
|
4603
|
+
<DisplayName>HistoricalDataConfigurationType</DisplayName>
|
|
4604
|
+
<References>
|
|
4605
|
+
<Reference ReferenceType="HasComponent">i=3059</Reference>
|
|
4606
|
+
<Reference ReferenceType="HasComponent">i=11876</Reference>
|
|
4607
|
+
<Reference ReferenceType="HasProperty">i=2323</Reference>
|
|
4608
|
+
<Reference ReferenceType="HasProperty">i=2324</Reference>
|
|
4609
|
+
<Reference ReferenceType="HasProperty">i=2325</Reference>
|
|
4610
|
+
<Reference ReferenceType="HasProperty">i=2326</Reference>
|
|
4611
|
+
<Reference ReferenceType="HasProperty">i=2327</Reference>
|
|
4612
|
+
<Reference ReferenceType="HasProperty">i=2328</Reference>
|
|
4613
|
+
<Reference ReferenceType="HasProperty">i=11499</Reference>
|
|
4614
|
+
<Reference ReferenceType="HasProperty">i=11500</Reference>
|
|
4615
|
+
<Reference ReferenceType="HasSubtype" IsForward="false">i=58</Reference>
|
|
4616
|
+
</References>
|
|
4617
|
+
</UAObjectType>
|
|
4618
|
+
<UAVariable NodeId="i=2323" BrowseName="Stepped" ParentNodeId="i=2318" DataType="Boolean">
|
|
4619
|
+
<DisplayName>Stepped</DisplayName>
|
|
4620
|
+
<References>
|
|
4621
|
+
<Reference ReferenceType="HasTypeDefinition">i=68</Reference>
|
|
4622
|
+
<Reference ReferenceType="HasModellingRule">i=78</Reference>
|
|
4623
|
+
<Reference ReferenceType="HasProperty" IsForward="false">i=2318</Reference>
|
|
4624
|
+
</References>
|
|
4625
|
+
</UAVariable>
|
|
4626
|
+
<UAVariable NodeId="i=2324" BrowseName="Definition" ParentNodeId="i=2318" DataType="String">
|
|
4627
|
+
<DisplayName>Definition</DisplayName>
|
|
4628
|
+
<References>
|
|
4629
|
+
<Reference ReferenceType="HasTypeDefinition">i=68</Reference>
|
|
4630
|
+
<Reference ReferenceType="HasModellingRule">i=80</Reference>
|
|
4631
|
+
<Reference ReferenceType="HasProperty" IsForward="false">i=2318</Reference>
|
|
4632
|
+
</References>
|
|
4633
|
+
</UAVariable>
|
|
4634
|
+
<UAVariable NodeId="i=2325" BrowseName="MaxTimeInterval" ParentNodeId="i=2318" DataType="i=290">
|
|
4635
|
+
<DisplayName>MaxTimeInterval</DisplayName>
|
|
4636
|
+
<References>
|
|
4637
|
+
<Reference ReferenceType="HasTypeDefinition">i=68</Reference>
|
|
4638
|
+
<Reference ReferenceType="HasModellingRule">i=80</Reference>
|
|
4639
|
+
<Reference ReferenceType="HasProperty" IsForward="false">i=2318</Reference>
|
|
4640
|
+
</References>
|
|
4641
|
+
</UAVariable>
|
|
4642
|
+
<UAVariable NodeId="i=2326" BrowseName="MinTimeInterval" ParentNodeId="i=2318" DataType="i=290">
|
|
4643
|
+
<DisplayName>MinTimeInterval</DisplayName>
|
|
4644
|
+
<References>
|
|
4645
|
+
<Reference ReferenceType="HasTypeDefinition">i=68</Reference>
|
|
4646
|
+
<Reference ReferenceType="HasModellingRule">i=80</Reference>
|
|
4647
|
+
<Reference ReferenceType="HasProperty" IsForward="false">i=2318</Reference>
|
|
4648
|
+
</References>
|
|
4649
|
+
</UAVariable>
|
|
4650
|
+
<UAVariable NodeId="i=2327" BrowseName="ExceptionDeviation" ParentNodeId="i=2318" DataType="Double">
|
|
4651
|
+
<DisplayName>ExceptionDeviation</DisplayName>
|
|
4652
|
+
<References>
|
|
4653
|
+
<Reference ReferenceType="HasTypeDefinition">i=68</Reference>
|
|
4654
|
+
<Reference ReferenceType="HasModellingRule">i=80</Reference>
|
|
4655
|
+
<Reference ReferenceType="HasProperty" IsForward="false">i=2318</Reference>
|
|
4656
|
+
</References>
|
|
4657
|
+
</UAVariable>
|
|
4658
|
+
<UAVariable NodeId="i=2328" BrowseName="ExceptionDeviationFormat" ParentNodeId="i=2318" DataType="i=890">
|
|
4659
|
+
<DisplayName>ExceptionDeviationFormat</DisplayName>
|
|
4660
|
+
<References>
|
|
4661
|
+
<Reference ReferenceType="HasTypeDefinition">i=68</Reference>
|
|
4662
|
+
<Reference ReferenceType="HasModellingRule">i=80</Reference>
|
|
4663
|
+
<Reference ReferenceType="HasProperty" IsForward="false">i=2318</Reference>
|
|
4664
|
+
</References>
|
|
4665
|
+
</UAVariable>
|
|
4666
|
+
<UAVariable NodeId="i=11499" BrowseName="StartOfArchive" ParentNodeId="i=2318" DataType="i=294">
|
|
4667
|
+
<DisplayName>StartOfArchive</DisplayName>
|
|
4668
|
+
<References>
|
|
4669
|
+
<Reference ReferenceType="HasTypeDefinition">i=68</Reference>
|
|
4670
|
+
<Reference ReferenceType="HasModellingRule">i=80</Reference>
|
|
4671
|
+
<Reference ReferenceType="HasProperty" IsForward="false">i=2318</Reference>
|
|
4672
|
+
</References>
|
|
4673
|
+
</UAVariable>
|
|
4674
|
+
<UAVariable NodeId="i=11500" BrowseName="StartOfOnlineArchive" ParentNodeId="i=2318" DataType="i=294">
|
|
4675
|
+
<DisplayName>StartOfOnlineArchive</DisplayName>
|
|
4676
|
+
<References>
|
|
4677
|
+
<Reference ReferenceType="HasTypeDefinition">i=68</Reference>
|
|
4678
|
+
<Reference ReferenceType="HasModellingRule">i=80</Reference>
|
|
4679
|
+
<Reference ReferenceType="HasProperty" IsForward="false">i=2318</Reference>
|
|
4680
|
+
</References>
|
|
4681
|
+
</UAVariable>
|
|
4682
|
+
|
|
4683
|
+
<UAObject NodeId="i=3059" BrowseName="AggregateConfiguration" ParentNodeId="i=2318">
|
|
4684
|
+
<DisplayName>AggregateConfiguration</DisplayName>
|
|
4685
|
+
<References>
|
|
4686
|
+
<Reference ReferenceType="HasProperty">i=11168</Reference>
|
|
4687
|
+
<Reference ReferenceType="HasProperty">i=11169</Reference>
|
|
4688
|
+
<Reference ReferenceType="HasProperty">i=11170</Reference>
|
|
4689
|
+
<Reference ReferenceType="HasProperty">i=11171</Reference>
|
|
4690
|
+
<Reference ReferenceType="HasTypeDefinition">i=11187</Reference>
|
|
4691
|
+
<Reference ReferenceType="HasModellingRule">i=78</Reference>
|
|
4692
|
+
<Reference ReferenceType="HasComponent" IsForward="false">i=2318</Reference>
|
|
4693
|
+
</References>
|
|
4694
|
+
</UAObject>
|
|
4695
|
+
<UAVariable NodeId="i=11168" BrowseName="TreatUncertainAsBad" ParentNodeId="i=3059" DataType="Boolean">
|
|
4696
|
+
<DisplayName>TreatUncertainAsBad</DisplayName>
|
|
4697
|
+
<References>
|
|
4698
|
+
<Reference ReferenceType="HasTypeDefinition">i=68</Reference>
|
|
4699
|
+
<Reference ReferenceType="HasModellingRule">i=78</Reference>
|
|
4700
|
+
<Reference ReferenceType="HasProperty" IsForward="false">i=3059</Reference>
|
|
4701
|
+
</References>
|
|
4702
|
+
</UAVariable>
|
|
4703
|
+
<UAVariable NodeId="i=11169" BrowseName="PercentDataBad" ParentNodeId="i=3059" DataType="Byte">
|
|
4704
|
+
<DisplayName>PercentDataBad</DisplayName>
|
|
4705
|
+
<References>
|
|
4706
|
+
<Reference ReferenceType="HasTypeDefinition">i=68</Reference>
|
|
4707
|
+
<Reference ReferenceType="HasModellingRule">i=78</Reference>
|
|
4708
|
+
<Reference ReferenceType="HasProperty" IsForward="false">i=3059</Reference>
|
|
4709
|
+
</References>
|
|
4710
|
+
</UAVariable>
|
|
4711
|
+
<UAVariable NodeId="i=11170" BrowseName="PercentDataGood" ParentNodeId="i=3059" DataType="Byte">
|
|
4712
|
+
<DisplayName>PercentDataGood</DisplayName>
|
|
4713
|
+
<References>
|
|
4714
|
+
<Reference ReferenceType="HasTypeDefinition">i=68</Reference>
|
|
4715
|
+
<Reference ReferenceType="HasModellingRule">i=78</Reference>
|
|
4716
|
+
<Reference ReferenceType="HasProperty" IsForward="false">i=3059</Reference>
|
|
4717
|
+
</References>
|
|
4718
|
+
</UAVariable>
|
|
4719
|
+
<UAVariable NodeId="i=11171" BrowseName="UseSlopedExtrapolation" ParentNodeId="i=3059" DataType="Boolean">
|
|
4720
|
+
<DisplayName>UseSlopedExtrapolation</DisplayName>
|
|
4721
|
+
<References>
|
|
4722
|
+
<Reference ReferenceType="HasTypeDefinition">i=68</Reference>
|
|
4723
|
+
<Reference ReferenceType="HasModellingRule">i=78</Reference>
|
|
4724
|
+
<Reference ReferenceType="HasProperty" IsForward="false">i=3059</Reference>
|
|
4725
|
+
</References>
|
|
4726
|
+
</UAVariable>
|
|
4727
|
+
<UAObject NodeId="i=11876" BrowseName="AggregateFunctions" ParentNodeId="i=2318">
|
|
4728
|
+
<DisplayName>AggregateFunctions</DisplayName>
|
|
4729
|
+
<References>
|
|
4730
|
+
<Reference ReferenceType="HasTypeDefinition">i=61</Reference>
|
|
4731
|
+
<Reference ReferenceType="HasModellingRule">i=80</Reference>
|
|
4732
|
+
<Reference ReferenceType="HasComponent" IsForward="false">i=2318</Reference>
|
|
4733
|
+
</References>
|
|
4734
|
+
</UAObject>
|
|
4735
|
+
|
|
4529
4736
|
</UANodeSet>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
|
2
|
+
<UANodeSet xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
|
3
|
+
xmlns:uax="http://opcfoundation.org/UA/2008/02/Types.xsd">
|
|
4
|
+
<NamespaceUris>
|
|
5
|
+
<Uri>http://A</Uri>
|
|
6
|
+
</NamespaceUris>
|
|
7
|
+
<Models>
|
|
8
|
+
<Model ModelUri="http://A" PublicationDate="2021-01-01T00:00:00Z" Version="1.00">
|
|
9
|
+
<RequiredModel ModelUri="http://opcfoundation.org/UA/" Version="1.03" PublicationDate="2013-12-02T00:00:00Z" />
|
|
10
|
+
</Model>
|
|
11
|
+
</Models>
|
|
12
|
+
<UAVariable DataType="UInt64" ParentNodeId="ns=0;i=2253" NodeId="ns=1;i=1000" BrowseName="1:VariableWithUInt64" AccessLevel="3">
|
|
13
|
+
<DisplayName>NominalParts</DisplayName>
|
|
14
|
+
<References>
|
|
15
|
+
<Reference ReferenceType="HasTypeDefinition">i=68</Reference>
|
|
16
|
+
</References>
|
|
17
|
+
<Value>
|
|
18
|
+
<uax:UInt64>1234567890</uax:UInt64>
|
|
19
|
+
</Value>
|
|
20
|
+
</UAVariable>
|
|
21
|
+
<UAVariable DataType="Int64" ParentNodeId="ns=0;i=2253" NodeId="ns=1;i=1001" BrowseName="1:VariableWithInt64" AccessLevel="3">
|
|
22
|
+
<DisplayName>NominalParts</DisplayName>
|
|
23
|
+
<References>
|
|
24
|
+
<Reference ReferenceType="HasTypeDefinition">i=68</Reference>
|
|
25
|
+
</References>
|
|
26
|
+
<Value>
|
|
27
|
+
<uax:Int64>-1234567890</uax:Int64>
|
|
28
|
+
</Value>
|
|
29
|
+
</UAVariable>
|
|
30
|
+
</UANodeSet>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
|
2
|
+
<UANodeSet xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
|
3
|
+
xmlns:uax="http://opcfoundation.org/UA/2008/02/Types.xsd">
|
|
4
|
+
<NamespaceUris>
|
|
5
|
+
<Uri>http://A</Uri>
|
|
6
|
+
</NamespaceUris>
|
|
7
|
+
<Models>
|
|
8
|
+
<Model ModelUri="http://A" PublicationDate="2021-01-01T00:00:00Z" Version="1.00">
|
|
9
|
+
<RequiredModel ModelUri="http://opcfoundation.org/UA/" Version="1.03" PublicationDate="2013-12-02T00:00:00Z" />
|
|
10
|
+
</Model>
|
|
11
|
+
</Models>
|
|
12
|
+
<Aliases></Aliases>
|
|
13
|
+
<UAVariable DataType="UInt64" ParentNodeId="ns=0;i=2253" NodeId="ns=1;i=1000" BrowseName="1:VariableWithUInt64" AccessLevel="3">
|
|
14
|
+
<DisplayName>NominalParts</DisplayName>
|
|
15
|
+
<References>
|
|
16
|
+
<Reference ReferenceType="HasTypeDefinition">i=68</Reference>
|
|
17
|
+
</References>
|
|
18
|
+
<Value>
|
|
19
|
+
<uax:UInt64>1234567890</uax:UInt64>
|
|
20
|
+
</Value>
|
|
21
|
+
</UAVariable>
|
|
22
|
+
<UAVariable DataType="Int64" ParentNodeId="ns=0;i=2253" NodeId="ns=1;i=1001" BrowseName="1:VariableWithInt64" AccessLevel="3">
|
|
23
|
+
<DisplayName>NominalParts</DisplayName>
|
|
24
|
+
<References>
|
|
25
|
+
<Reference ReferenceType="HasTypeDefinition">i=68</Reference>
|
|
26
|
+
</References>
|
|
27
|
+
<Value>
|
|
28
|
+
<uax:Int64>-1234567890</uax:Int64>
|
|
29
|
+
</Value>
|
|
30
|
+
</UAVariable>
|
|
31
|
+
</UANodeSet>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { SimpleAttributeOperand } from "node-opcua-service-filter";
|
|
2
|
-
import { StatusCode } from "node-opcua-status-code";
|
|
3
|
-
import { BaseNode, UAObjectType } from "node-opcua-address-space-base";
|
|
4
|
-
/**
|
|
5
|
-
* @method checkSelectClause
|
|
6
|
-
* @param parentNode
|
|
7
|
-
* @param selectClause
|
|
8
|
-
* @return {Array<StatusCode>}
|
|
9
|
-
*/
|
|
10
|
-
export declare function checkSelectClause(parentNode: BaseNode, selectClause: SimpleAttributeOperand): StatusCode;
|
|
11
|
-
/**
|
|
12
|
-
* @method checkSelectClauses
|
|
13
|
-
* @param eventTypeNode
|
|
14
|
-
* @param selectClauses
|
|
15
|
-
* @return an array of StatusCode
|
|
16
|
-
*/
|
|
17
|
-
export declare function checkSelectClauses(eventTypeNode: UAObjectType, selectClauses: SimpleAttributeOperand[]): StatusCode[];
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.checkSelectClauses = exports.checkSelectClause = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* @module node-opcua-address-space
|
|
6
|
-
*/
|
|
7
|
-
// tslint:disable:no-console
|
|
8
|
-
const node_opcua_data_model_1 = require("node-opcua-data-model");
|
|
9
|
-
const node_opcua_service_translate_browse_path_1 = require("node-opcua-service-translate-browse-path");
|
|
10
|
-
const node_opcua_status_code_1 = require("node-opcua-status-code");
|
|
11
|
-
/**
|
|
12
|
-
* @method checkSelectClause
|
|
13
|
-
* @param parentNode
|
|
14
|
-
* @param selectClause
|
|
15
|
-
* @return {Array<StatusCode>}
|
|
16
|
-
*/
|
|
17
|
-
function checkSelectClause(parentNode, selectClause) {
|
|
18
|
-
//
|
|
19
|
-
const addressSpace = parentNode.addressSpace;
|
|
20
|
-
// istanbul ignore next
|
|
21
|
-
if (selectClause.typeDefinitionId.isEmpty()) {
|
|
22
|
-
return node_opcua_status_code_1.StatusCodes.Good;
|
|
23
|
-
}
|
|
24
|
-
const eventTypeNode = addressSpace.findEventType(selectClause.typeDefinitionId);
|
|
25
|
-
if (!eventTypeNode || !(eventTypeNode.nodeClass === node_opcua_data_model_1.NodeClass.ObjectType)) {
|
|
26
|
-
// xx console.log("eventTypeNode = ",selectClause.typeDefinitionId.toString());
|
|
27
|
-
// xx console.log("eventTypeNode = ",eventTypeNode);
|
|
28
|
-
// istanbul ignore next
|
|
29
|
-
if (eventTypeNode) {
|
|
30
|
-
console.log(eventTypeNode.toString());
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
// istanbul ignore next
|
|
34
|
-
if (eventTypeNode.nodeClass !== node_opcua_data_model_1.NodeClass.ObjectType) {
|
|
35
|
-
throw new Error("Expecting a ObjectType");
|
|
36
|
-
}
|
|
37
|
-
// navigate to the innerNode specified by the browsePath [ QualifiedName]
|
|
38
|
-
const browsePath = (0, node_opcua_service_translate_browse_path_1.constructBrowsePathFromQualifiedName)(eventTypeNode, selectClause.browsePath);
|
|
39
|
-
const browsePathResult = addressSpace.browsePath(browsePath);
|
|
40
|
-
return browsePathResult.statusCode;
|
|
41
|
-
}
|
|
42
|
-
exports.checkSelectClause = checkSelectClause;
|
|
43
|
-
/**
|
|
44
|
-
* @method checkSelectClauses
|
|
45
|
-
* @param eventTypeNode
|
|
46
|
-
* @param selectClauses
|
|
47
|
-
* @return an array of StatusCode
|
|
48
|
-
*/
|
|
49
|
-
function checkSelectClauses(eventTypeNode, selectClauses) {
|
|
50
|
-
return selectClauses.map(checkSelectClause.bind(null, eventTypeNode));
|
|
51
|
-
}
|
|
52
|
-
exports.checkSelectClauses = checkSelectClauses;
|
|
53
|
-
//# sourceMappingURL=check_event_clause.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"check_event_clause.js","sourceRoot":"","sources":["../../../source/helpers/check_event_clause.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,4BAA4B;AAC5B,iEAAkD;AAElD,uGAAgG;AAChG,mEAAiE;AAGjE;;;;;GAKG;AACH,SAAgB,iBAAiB,CAAC,UAAoB,EAAE,YAAoC;IACxF,EAAE;IACF,MAAM,YAAY,GAAG,UAAU,CAAC,YAAY,CAAC;IAE7C,uBAAuB;IACvB,IAAI,YAAY,CAAC,gBAAgB,CAAC,OAAO,EAAE,EAAE;QACzC,OAAO,oCAAW,CAAC,IAAI,CAAC;KAC3B;IACD,MAAM,aAAa,GAAG,YAAY,CAAC,aAAa,CAAC,YAAY,CAAC,gBAAgB,CAAE,CAAC;IAEjF,IAAI,CAAC,aAAa,IAAI,CAAC,CAAC,aAAa,CAAC,SAAS,KAAK,iCAAS,CAAC,UAAU,CAAC,EAAE;QACvE,+EAA+E;QAC/E,oDAAoD;QACpD,uBAAuB;QACvB,IAAI,aAAa,EAAE;YACf,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC,CAAC;SACzC;KACJ;IAED,uBAAuB;IACvB,IAAI,aAAa,CAAC,SAAS,KAAK,iCAAS,CAAC,UAAU,EAAE;QAClD,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;KAC7C;IAED,yEAAyE;IACzE,MAAM,UAAU,GAAG,IAAA,+EAAoC,EAAC,aAAa,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;IAChG,MAAM,gBAAgB,GAAG,YAAY,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IAC7D,OAAO,gBAAgB,CAAC,UAAU,CAAC;AACvC,CAAC;AA5BD,8CA4BC;AAED;;;;;GAKG;AACH,SAAgB,kBAAkB,CAAC,aAA2B,EAAE,aAAuC;IACnG,OAAO,aAAa,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC;AAC1E,CAAC;AAFD,gDAEC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { ContentFilter } from "node-opcua-types";
|
|
2
|
-
import { IAddressSpace, IEventData, ISessionContext } from "node-opcua-address-space-base";
|
|
3
|
-
export declare function __checkWhereClause(addressSpace: IAddressSpace, sessionContext: ISessionContext, whereClause: ContentFilter, index: number, eventData: IEventData): boolean;
|
|
4
|
-
export declare function checkWhereClause(addressSpace: IAddressSpace, sessionContext: ISessionContext, whereClause: ContentFilter, eventData: IEventData): boolean;
|