node-opcua-address-space 2.175.2 → 2.175.6
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/loader/load_nodeset2.js +2 -1
- package/dist/source/loader/load_nodeset2.js.map +1 -1
- 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/nodeset_tools/nodeset_to_xml.js +7 -0
- package/dist/src/nodeset_tools/nodeset_to_xml.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 +37 -37
- package/source/loader/load_nodeset2.ts +2 -1
- package/src/nodeset_tools/construct_namespace_dependency.ts +3 -1
- package/src/nodeset_tools/nodeset_to_xml.ts +7 -0
- 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.6",
|
|
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",
|
|
@@ -21,48 +21,48 @@
|
|
|
21
21
|
"@types/semver": "7.7.1",
|
|
22
22
|
"chalk": "4.1.2",
|
|
23
23
|
"dequeue": "^1.0.5",
|
|
24
|
-
"node-opcua-address-space-base": "2.175.
|
|
25
|
-
"node-opcua-assert": "2.175.
|
|
26
|
-
"node-opcua-basic-types": "2.175.
|
|
27
|
-
"node-opcua-binary-stream": "2.175.
|
|
28
|
-
"node-opcua-client-dynamic-extension-object": "2.175.
|
|
24
|
+
"node-opcua-address-space-base": "2.175.6",
|
|
25
|
+
"node-opcua-assert": "2.175.6",
|
|
26
|
+
"node-opcua-basic-types": "2.175.6",
|
|
27
|
+
"node-opcua-binary-stream": "2.175.6",
|
|
28
|
+
"node-opcua-client-dynamic-extension-object": "2.175.6",
|
|
29
29
|
"node-opcua-constants": "2.175.1",
|
|
30
|
-
"node-opcua-crypto": "5.
|
|
31
|
-
"node-opcua-data-access": "2.175.
|
|
32
|
-
"node-opcua-data-model": "2.175.
|
|
33
|
-
"node-opcua-data-value": "2.175.
|
|
34
|
-
"node-opcua-date-time": "2.175.
|
|
35
|
-
"node-opcua-debug": "2.175.
|
|
36
|
-
"node-opcua-enum": "2.175.
|
|
37
|
-
"node-opcua-extension-object": "2.175.
|
|
38
|
-
"node-opcua-factory": "2.175.
|
|
39
|
-
"node-opcua-nodeid": "2.175.
|
|
40
|
-
"node-opcua-nodeset-ua": "2.175.
|
|
41
|
-
"node-opcua-numeric-range": "2.175.
|
|
42
|
-
"node-opcua-object-registry": "2.175.
|
|
43
|
-
"node-opcua-pseudo-session": "2.175.
|
|
44
|
-
"node-opcua-service-browse": "2.175.
|
|
45
|
-
"node-opcua-service-call": "2.175.
|
|
46
|
-
"node-opcua-service-history": "2.175.
|
|
47
|
-
"node-opcua-service-translate-browse-path": "2.175.
|
|
48
|
-
"node-opcua-service-write": "2.175.
|
|
49
|
-
"node-opcua-status-code": "2.175.
|
|
50
|
-
"node-opcua-types": "2.175.
|
|
51
|
-
"node-opcua-utils": "2.175.
|
|
52
|
-
"node-opcua-variant": "2.175.
|
|
53
|
-
"node-opcua-xml2json": "2.175.
|
|
30
|
+
"node-opcua-crypto": "5.4.0",
|
|
31
|
+
"node-opcua-data-access": "2.175.6",
|
|
32
|
+
"node-opcua-data-model": "2.175.6",
|
|
33
|
+
"node-opcua-data-value": "2.175.6",
|
|
34
|
+
"node-opcua-date-time": "2.175.6",
|
|
35
|
+
"node-opcua-debug": "2.175.6",
|
|
36
|
+
"node-opcua-enum": "2.175.6",
|
|
37
|
+
"node-opcua-extension-object": "2.175.6",
|
|
38
|
+
"node-opcua-factory": "2.175.6",
|
|
39
|
+
"node-opcua-nodeid": "2.175.6",
|
|
40
|
+
"node-opcua-nodeset-ua": "2.175.6",
|
|
41
|
+
"node-opcua-numeric-range": "2.175.6",
|
|
42
|
+
"node-opcua-object-registry": "2.175.6",
|
|
43
|
+
"node-opcua-pseudo-session": "2.175.6",
|
|
44
|
+
"node-opcua-service-browse": "2.175.6",
|
|
45
|
+
"node-opcua-service-call": "2.175.6",
|
|
46
|
+
"node-opcua-service-history": "2.175.6",
|
|
47
|
+
"node-opcua-service-translate-browse-path": "2.175.6",
|
|
48
|
+
"node-opcua-service-write": "2.175.6",
|
|
49
|
+
"node-opcua-status-code": "2.175.6",
|
|
50
|
+
"node-opcua-types": "2.175.6",
|
|
51
|
+
"node-opcua-utils": "2.175.6",
|
|
52
|
+
"node-opcua-variant": "2.175.6",
|
|
53
|
+
"node-opcua-xml2json": "2.175.6",
|
|
54
54
|
"semver": "^7.8.5",
|
|
55
55
|
"thenify-ex": "4.4.0",
|
|
56
56
|
"xml-writer": "^1.7.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"humanize": "0.0.9",
|
|
60
|
-
"node-opcua-benchmarker": "2.175.
|
|
61
|
-
"node-opcua-leak-detector": "2.175.
|
|
62
|
-
"node-opcua-nodesets": "2.175.
|
|
63
|
-
"node-opcua-packet-analyzer": "2.175.
|
|
64
|
-
"node-opcua-schemas": "2.175.
|
|
65
|
-
"node-opcua-service-filter": "2.175.
|
|
60
|
+
"node-opcua-benchmarker": "2.175.6",
|
|
61
|
+
"node-opcua-leak-detector": "2.175.6",
|
|
62
|
+
"node-opcua-nodesets": "2.175.3",
|
|
63
|
+
"node-opcua-packet-analyzer": "2.175.6",
|
|
64
|
+
"node-opcua-schemas": "2.175.6",
|
|
65
|
+
"node-opcua-service-filter": "2.175.6",
|
|
66
66
|
"node-opcua-test-fixtures": "2.175.1"
|
|
67
67
|
},
|
|
68
68
|
"author": "Etienne Rossignon",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"internet of things"
|
|
81
81
|
],
|
|
82
82
|
"homepage": "http://node-opcua.github.io/",
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "e233d906138995583f42359831d1908e3cb005e7",
|
|
84
84
|
"files": [
|
|
85
85
|
"dist",
|
|
86
86
|
"distHelpers",
|
|
@@ -699,7 +699,7 @@ function makeNodeSetParserEngine(addressSpace: IAddressSpace, options: NodeSetLo
|
|
|
699
699
|
valueRank,
|
|
700
700
|
arrayDimensions: valueRank <= 0 ? null : stringToUInt32Array(attrs.ArrayDimensions),
|
|
701
701
|
minimumSamplingInterval: attrs.MinimumSamplingInterval ? parseInt(attrs.MinimumSamplingInterval, 10) : 0,
|
|
702
|
-
historizing:
|
|
702
|
+
historizing: coerceBoolean(attrs.Historizing),
|
|
703
703
|
nodeId,
|
|
704
704
|
accessLevel: accessLevel,
|
|
705
705
|
userAccessLevel: accessLevel // convertAccessLevel(attrs.UserAccessLevel || attrs.AccessLevel);
|
|
@@ -822,6 +822,7 @@ function makeNodeSetParserEngine(addressSpace: IAddressSpace, options: NodeSetLo
|
|
|
822
822
|
valueRank,
|
|
823
823
|
arrayDimensions: valueRank <= 0 ? null : stringToUInt32Array(attrs.ArrayDimensions),
|
|
824
824
|
minimumSamplingInterval: attrs.MinimumSamplingInterval ? parseInt(attrs.MinimumSamplingInterval, 10) : 0,
|
|
825
|
+
// UAVariableType has no Historizing attribute in the XSD: keep it false
|
|
825
826
|
historizing: false,
|
|
826
827
|
nodeId: convertToNodeId(attrs.NodeId) || null
|
|
827
828
|
};
|
|
@@ -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) {
|
|
@@ -845,6 +845,13 @@ function dumpCommonAttributes(xw: XmlWriter, node: BaseNode) {
|
|
|
845
845
|
xw.writeAttribute("MinimumSamplingInterval", minimumSamplingInterval);
|
|
846
846
|
}
|
|
847
847
|
}
|
|
848
|
+
// Historizing exists in the XSD on UAVariable only: UAVariableType is restricted to
|
|
849
|
+
// DataType/ValueRank/ArrayDimensions. UAVariableTypeImpl nevertheless owns a `historizing`
|
|
850
|
+
// property, so the node class must be tested here rather than the presence of the property.
|
|
851
|
+
// false being the default, the attribute is only emitted when it is set.
|
|
852
|
+
if (node.nodeClass === NodeClass.Variable && (node as UAVariable).historizing) {
|
|
853
|
+
xw.writeAttribute("Historizing", "true");
|
|
854
|
+
}
|
|
848
855
|
}
|
|
849
856
|
|
|
850
857
|
function dumpCommonElements(xw: XmlWriter, node: BaseNode) {
|
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);
|