node-opcua-address-space 2.175.2 → 2.175.3
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/src/nodeset_tools/construct_namespace_dependency.js +3 -1
- package/dist/src/nodeset_tools/construct_namespace_dependency.js.map +1 -1
- package/dist/src/ua_variable_impl.js +10 -15
- package/dist/src/ua_variable_impl.js.map +1 -1
- package/dist/tsconfig_base.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/src/nodeset_tools/construct_namespace_dependency.ts +3 -1
- package/src/ua_variable_impl.ts +10 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-opcua-address-space",
|
|
3
|
-
"version": "2.175.
|
|
3
|
+
"version": "2.175.3",
|
|
4
4
|
"description": "pure nodejs OPCUA SDK - module address-space",
|
|
5
5
|
"main": "./dist/src/index_current.js",
|
|
6
6
|
"types": "./dist/source/index.d.ts",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"node-opcua-extension-object": "2.175.1",
|
|
38
38
|
"node-opcua-factory": "2.175.1",
|
|
39
39
|
"node-opcua-nodeid": "2.175.1",
|
|
40
|
-
"node-opcua-nodeset-ua": "2.175.
|
|
40
|
+
"node-opcua-nodeset-ua": "2.175.3",
|
|
41
41
|
"node-opcua-numeric-range": "2.175.1",
|
|
42
42
|
"node-opcua-object-registry": "2.175.1",
|
|
43
43
|
"node-opcua-pseudo-session": "2.175.2",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"humanize": "0.0.9",
|
|
60
60
|
"node-opcua-benchmarker": "2.175.1",
|
|
61
61
|
"node-opcua-leak-detector": "2.175.1",
|
|
62
|
-
"node-opcua-nodesets": "2.175.
|
|
62
|
+
"node-opcua-nodesets": "2.175.3",
|
|
63
63
|
"node-opcua-packet-analyzer": "2.175.1",
|
|
64
64
|
"node-opcua-schemas": "2.175.2",
|
|
65
65
|
"node-opcua-service-filter": "2.175.2",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"internet of things"
|
|
81
81
|
],
|
|
82
82
|
"homepage": "http://node-opcua.github.io/",
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "31f407d4ad2712b7bf2882d4dc70085f598b0fcd",
|
|
84
84
|
"files": [
|
|
85
85
|
"dist",
|
|
86
86
|
"distHelpers",
|
|
@@ -71,13 +71,15 @@ export function _recomputeRequiredModelsFromTypes(namespace: INamespace, cache?:
|
|
|
71
71
|
|
|
72
72
|
const namespaceIndex = dataType.namespace;
|
|
73
73
|
consider(namespaceIndex);
|
|
74
|
+
// mark the dataType as visited *before* exploring its fields: a structure may refer to
|
|
75
|
+
// itself (directly or through a cycle), and marking it afterwards would recurse forever
|
|
76
|
+
_visitedDataType.add(dataType.toString());
|
|
74
77
|
if (dataTypeNode.isStructure()) {
|
|
75
78
|
const definition = dataTypeNode.getStructureDefinition();
|
|
76
79
|
for (const field of definition.fields || []) {
|
|
77
80
|
exploreDataTypeField(field);
|
|
78
81
|
}
|
|
79
82
|
}
|
|
80
|
-
_visitedDataType.add(dataType.toString());
|
|
81
83
|
}
|
|
82
84
|
|
|
83
85
|
function exploreExtensionObject(e: ExtensionObject) {
|
package/src/ua_variable_impl.ts
CHANGED
|
@@ -758,26 +758,23 @@ export class UAVariableImpl<T extends UAVariableEvents & ListenerSignature<T>
|
|
|
758
758
|
dataValue.value = variant1;
|
|
759
759
|
|
|
760
760
|
if (dataValue.value.dataType === DataType.ExtensionObject) {
|
|
761
|
+
// early, detailed diagnostics on a malformed extension object (the actual throw
|
|
762
|
+
// happens below in _internal_set_dataValue).
|
|
761
763
|
const valueIsCorrect = this.checkExtensionObjectIsCorrect(dataValue.value.value);
|
|
762
764
|
if (!valueIsCorrect) {
|
|
763
765
|
errorLog("setValueFromSource Invalid value !");
|
|
764
766
|
errorLog(this.toString());
|
|
765
767
|
errorLog(dataValue.toString());
|
|
766
|
-
this.checkExtensionObjectIsCorrect(dataValue.value.value);
|
|
767
768
|
}
|
|
768
|
-
// ----------------------------------
|
|
769
|
-
if (this.$extensionObject || this.$$extensionObjectArray) {
|
|
770
|
-
// we have an extension object already bound to this node
|
|
771
|
-
// the client is asking us to replace the object entirely by a new one
|
|
772
|
-
// const ext = dataValue.value.value;
|
|
773
|
-
this._internal_set_dataValue(dataValue);
|
|
774
|
-
return;
|
|
775
|
-
} else {
|
|
776
|
-
this.$dataValue = dataValue;
|
|
777
|
-
}
|
|
778
|
-
} else {
|
|
779
|
-
this._internal_set_dataValue(dataValue);
|
|
780
769
|
}
|
|
770
|
+
// Route every value - scalar or ExtensionObject - through _internal_set_dataValue.
|
|
771
|
+
// This guarantees the change is consistently propagated to observers (historian,
|
|
772
|
+
// monitored items) and, when the node is a bound extension object (or a bound
|
|
773
|
+
// sub-structure child), cascaded through the proxy field setters by the overridden
|
|
774
|
+
// _inner_replace_dataValue. Previously ExtensionObject values were special-cased with a
|
|
775
|
+
// silent "this.$dataValue = dataValue" assignment that skipped notification for plain
|
|
776
|
+
// (unbound) extension object variables and threw on bound sub-structure children.
|
|
777
|
+
this._internal_set_dataValue(dataValue);
|
|
781
778
|
} catch (err) {
|
|
782
779
|
errorLog("UAVariable#setValueFromString Error : ", this.browseName.toString(), this.nodeId.toString());
|
|
783
780
|
errorLog((err as Error).message);
|