node-opcua-address-space 2.185.0 → 2.186.1
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/api/loader/make_xml_extension_object_parser.ts +6 -6
- package/api/loader/nodeset_image_codec.ts +3 -2
- package/api/loader/nodeset_record_applier.ts +2 -0
- package/dist/api/loader/make_xml_extension_object_parser.js +6 -6
- package/dist/api/loader/make_xml_extension_object_parser.js.map +1 -1
- package/dist/api/loader/nodeset_image_codec.d.ts.map +1 -1
- package/dist/api/loader/nodeset_image_codec.js +3 -2
- package/dist/api/loader/nodeset_image_codec.js.map +1 -1
- package/dist/api/loader/nodeset_record_applier.d.ts.map +1 -1
- package/dist/api/loader/nodeset_record_applier.js +2 -0
- package/dist/api/loader/nodeset_record_applier.js.map +1 -1
- package/dist/impl/base_node_impl.d.ts +8 -0
- package/dist/impl/base_node_impl.d.ts.map +1 -1
- package/dist/impl/base_node_impl.js +10 -0
- package/dist/impl/base_node_impl.js.map +1 -1
- package/dist/impl/event_data.js +2 -2
- package/dist/impl/event_data.js.map +1 -1
- package/dist/impl/nodeid_manager.d.ts.map +1 -1
- package/dist/impl/nodeid_manager.js +10 -3
- package/dist/impl/nodeid_manager.js.map +1 -1
- package/dist/impl/nodeset_tools/nodeset_to_records.d.ts.map +1 -1
- package/dist/impl/nodeset_tools/nodeset_to_records.js +9 -3
- package/dist/impl/nodeset_tools/nodeset_to_records.js.map +1 -1
- package/dist/impl/nodeset_tools/nodeset_to_xml.d.ts.map +1 -1
- package/dist/impl/nodeset_tools/nodeset_to_xml.js +11 -0
- package/dist/impl/nodeset_tools/nodeset_to_xml.js.map +1 -1
- package/dist/impl/ua_data_type_impl.d.ts.map +1 -1
- package/dist/impl/ua_data_type_impl.js +2 -1
- package/dist/impl/ua_data_type_impl.js.map +1 -1
- package/dist/tsconfig_base.tsbuildinfo +1 -1
- package/impl/base_node_impl.ts +14 -0
- package/impl/event_data.ts +2 -2
- package/impl/nodeid_manager.ts +10 -3
- package/impl/nodeset_tools/nodeset_to_records.ts +9 -3
- package/impl/nodeset_tools/nodeset_to_xml.ts +11 -0
- package/impl/ua_data_type_impl.ts +2 -1
- package/package.json +31 -31
package/impl/base_node_impl.ts
CHANGED
|
@@ -180,6 +180,10 @@ export interface InternalBaseNodeOptions {
|
|
|
180
180
|
rolePermissions?: RolePermissionTypeOptions[];
|
|
181
181
|
/** "Draft" or "Deprecated" as the nodeset declared it; see BaseNode.releaseStatus */
|
|
182
182
|
releaseStatus?: "Draft" | "Deprecated";
|
|
183
|
+
/** the `<Documentation>` link as the nodeset declared it; see BaseNode.nodesetDocumentation */
|
|
184
|
+
nodesetDocumentation?: string;
|
|
185
|
+
/** the `<Category>` elements as the nodeset declared them; see BaseNode.nodesetCategory */
|
|
186
|
+
nodesetCategory?: string[];
|
|
183
187
|
/** the AccessRestrictions as declared, whatever this loader applies; see BaseNode */
|
|
184
188
|
declaredAccessRestrictions?: string;
|
|
185
189
|
}
|
|
@@ -225,6 +229,10 @@ export abstract class BaseNodeImpl<T extends BaseNodeEvents & ListenerSignature<
|
|
|
225
229
|
/** see BaseNode.releaseStatus; only set when the nodeset declared one, so that it costs
|
|
226
230
|
* nothing on the overwhelming majority of nodes, which are Released */
|
|
227
231
|
public releaseStatus?: "Draft" | "Deprecated";
|
|
232
|
+
/** see BaseNode.nodesetDocumentation; only set when the nodeset declared one */
|
|
233
|
+
public nodesetDocumentation?: string;
|
|
234
|
+
/** see BaseNode.nodesetCategory; only set when the nodeset declared at least one */
|
|
235
|
+
public nodesetCategory?: string[];
|
|
228
236
|
/** see BaseNode.declaredAccessRestrictions */
|
|
229
237
|
public declaredAccessRestrictions?: string;
|
|
230
238
|
private _accessRestrictions?: AccessRestrictionsFlag;
|
|
@@ -445,6 +453,12 @@ export abstract class BaseNodeImpl<T extends BaseNodeEvents & ListenerSignature<
|
|
|
445
453
|
if (options.releaseStatus) {
|
|
446
454
|
this.releaseStatus = options.releaseStatus;
|
|
447
455
|
}
|
|
456
|
+
if (options.nodesetDocumentation) {
|
|
457
|
+
this.nodesetDocumentation = options.nodesetDocumentation;
|
|
458
|
+
}
|
|
459
|
+
if (options.nodesetCategory && options.nodesetCategory.length > 0) {
|
|
460
|
+
this.nodesetCategory = [...options.nodesetCategory];
|
|
461
|
+
}
|
|
448
462
|
if (options.parentNodeId) {
|
|
449
463
|
_private._declaredParentNodeId =
|
|
450
464
|
options.parentNodeId instanceof NodeId
|
package/impl/event_data.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { assert } from "node-opcua-assert";
|
|
|
7
7
|
import { coerceExpandedNodeId, NodeId, sameNodeId } from "node-opcua-nodeid";
|
|
8
8
|
import { StatusCodes } from "node-opcua-status-code";
|
|
9
9
|
import { type BrowsePath, BrowsePathResult } from "node-opcua-types";
|
|
10
|
-
import { lowerFirstLetter } from "node-opcua-utils";
|
|
10
|
+
import { lowerFirstLetter, setOwnProperty } from "node-opcua-utils";
|
|
11
11
|
import { Variant, type VariantLike } from "node-opcua-variant";
|
|
12
12
|
import type { EventField } from "./event_layout.js";
|
|
13
13
|
|
|
@@ -49,7 +49,7 @@ export class EventData implements IEventData {
|
|
|
49
49
|
/** the value of one field of the layout */
|
|
50
50
|
public _setField(field: EventField, variant: VariantLike): void {
|
|
51
51
|
const value = Variant.coerce(variant);
|
|
52
|
-
(this as Record<string, unknown
|
|
52
|
+
setOwnProperty(this as Record<string, unknown>, field.lowerName, value);
|
|
53
53
|
if (!this.#sharedPaths) {
|
|
54
54
|
this.#pathToNodeId.set(field.fullBrowsePath, field.node.nodeId);
|
|
55
55
|
}
|
package/impl/nodeid_manager.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { assert } from "node-opcua-assert";
|
|
|
3
3
|
import { NodeClass, type QualifiedName, type QualifiedNameOptions } from "node-opcua-data-model";
|
|
4
4
|
import { make_debugLog, make_warningLog } from "node-opcua-debug";
|
|
5
5
|
import { makeNodeId, NodeId, type NodeIdLike, NodeIdType, resolveNodeId, sameNodeId } from "node-opcua-nodeid";
|
|
6
|
+
import { setOwnProperty } from "node-opcua-utils";
|
|
6
7
|
import { BaseNodeImpl } from "./base_node_impl.js";
|
|
7
8
|
import { type ReferenceImpl, resolveReferenceType } from "./reference_impl.js";
|
|
8
9
|
|
|
@@ -146,7 +147,7 @@ export class NodeIdManager {
|
|
|
146
147
|
NodeClass
|
|
147
148
|
][];
|
|
148
149
|
for (const [name, value, nodeClass] of symbols2) {
|
|
149
|
-
this._cacheSymbolicName
|
|
150
|
+
setOwnProperty(this._cacheSymbolicName, name, [value, nodeClass]);
|
|
150
151
|
this._cacheSymbolicNameRev.add(value);
|
|
151
152
|
}
|
|
152
153
|
}
|
|
@@ -209,7 +210,10 @@ export class NodeIdManager {
|
|
|
209
210
|
}
|
|
210
211
|
const nodeId = this._constructNodeId(options);
|
|
211
212
|
if (nodeId.identifierType === NodeIdType.NUMERIC && !cached) {
|
|
212
|
-
this._cacheSymbolicName
|
|
213
|
+
setOwnProperty(this._cacheSymbolicName, fullName, [
|
|
214
|
+
nodeId.value as number,
|
|
215
|
+
options.nodeClass || NodeClass.Unspecified
|
|
216
|
+
]);
|
|
213
217
|
this._cacheSymbolicNameRev.add(nodeId.value as number);
|
|
214
218
|
}
|
|
215
219
|
return nodeId;
|
|
@@ -228,7 +232,10 @@ export class NodeIdManager {
|
|
|
228
232
|
}
|
|
229
233
|
const fullName = compose(fullParentName, prepareName(options.browseName));
|
|
230
234
|
if (!this._cacheSymbolicName[fullName]) {
|
|
231
|
-
this._cacheSymbolicName
|
|
235
|
+
setOwnProperty(this._cacheSymbolicName, fullName, [
|
|
236
|
+
nodeId.value as number,
|
|
237
|
+
options.nodeClass || NodeClass.Unspecified
|
|
238
|
+
]);
|
|
232
239
|
this._cacheSymbolicNameRev.add(nodeId.value as number);
|
|
233
240
|
}
|
|
234
241
|
}
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
type StructureDefinition,
|
|
46
46
|
StructureType
|
|
47
47
|
} from "node-opcua-types";
|
|
48
|
-
import { isNullOrUndefined } from "node-opcua-utils";
|
|
48
|
+
import { isNullOrUndefined, setOwnProperty } from "node-opcua-utils";
|
|
49
49
|
import { DataType, Variant, VariantArrayType, type VariantOptions } from "node-opcua-variant";
|
|
50
50
|
import XMLWriter from "xml-writer";
|
|
51
51
|
import { makeDefinitionMap } from "../../api/loader/decode_xml_extension_object.js";
|
|
@@ -274,14 +274,14 @@ class RecordExporter {
|
|
|
274
274
|
if (nodeV.dataType && nodeV.dataType.value !== 0) {
|
|
275
275
|
const dataTypeName = this.b(this.resolveDataTypeName(nodeV.dataType));
|
|
276
276
|
if (dataTypeName && !aliases[dataTypeName]) {
|
|
277
|
-
aliases
|
|
277
|
+
setOwnProperty(aliases, dataTypeName, this.t(nodeV.dataType));
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
281
|
for (const reference of node.allReferences()) {
|
|
282
282
|
const key = this.b(getReferenceType(reference).browseName);
|
|
283
283
|
// the XML export overwrites a reference-type alias each time it meets it; same value every time
|
|
284
|
-
aliases
|
|
284
|
+
setOwnProperty(aliases, key, this.t(reference.referenceType));
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
287
|
|
|
@@ -366,6 +366,12 @@ class RecordExporter {
|
|
|
366
366
|
if (node.releaseStatus) {
|
|
367
367
|
record.releaseStatus = node.releaseStatus;
|
|
368
368
|
}
|
|
369
|
+
if (node.nodesetCategory && node.nodesetCategory.length > 0) {
|
|
370
|
+
record.category = [...node.nodesetCategory];
|
|
371
|
+
}
|
|
372
|
+
if (node.nodesetDocumentation) {
|
|
373
|
+
record.documentation = node.nodesetDocumentation;
|
|
374
|
+
}
|
|
369
375
|
const parentNode = this.parentOf(node);
|
|
370
376
|
if (parentNode && parentNode.nodeId.namespace <= node.nodeId.namespace) {
|
|
371
377
|
record.parentNodeId = this.t(parentNode.nodeId);
|
|
@@ -88,6 +88,16 @@ function _dumpDescription(xw: XmlWriter, node: { description?: LocalizedText }):
|
|
|
88
88
|
xw.startElement("Description").text(desc).endElement();
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
+
// what the working group filed the node under and where the specification defines it: nothing
|
|
92
|
+
// in the address space acts on either, but the document said them
|
|
93
|
+
function _dumpCategoryAndDocumentation(xw: XmlWriter, node: BaseNode): void {
|
|
94
|
+
for (const category of node.nodesetCategory ?? []) {
|
|
95
|
+
xw.startElement("Category").text(category).endElement();
|
|
96
|
+
}
|
|
97
|
+
if (node.nodesetDocumentation) {
|
|
98
|
+
xw.startElement("Documentation").text(node.nodesetDocumentation).endElement();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
91
101
|
|
|
92
102
|
function hasHigherPriorityThan(namespaceIndex1: number, namespaceIndex2: number, priorityTable: number[]) {
|
|
93
103
|
const order1 = priorityTable[namespaceIndex1];
|
|
@@ -757,6 +767,7 @@ function _dumpRolePermissions(xw: XmlWriter, node: BaseNode) {
|
|
|
757
767
|
function dumpCommonElements(xw: XmlWriter, node: BaseNode) {
|
|
758
768
|
_dumpDisplayName(xw, node);
|
|
759
769
|
_dumpDescription(xw, node);
|
|
770
|
+
_dumpCategoryAndDocumentation(xw, node);
|
|
760
771
|
_dumpReferences(xw, node);
|
|
761
772
|
_dumpRolePermissions(xw, node);
|
|
762
773
|
}
|
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
type StructureFieldOptions,
|
|
22
22
|
StructureType
|
|
23
23
|
} from "node-opcua-types";
|
|
24
|
+
import { setOwnProperty } from "node-opcua-utils";
|
|
24
25
|
import { DataType } from "node-opcua-variant";
|
|
25
26
|
import type { ExtensionObjectConstructorFuncWithSchema } from "../api/interfaces/extension_object_constructor.js";
|
|
26
27
|
import { SessionContext } from "../api/session_context.js";
|
|
@@ -279,7 +280,7 @@ export class UADataTypeImpl extends BaseNodeImpl implements UADataType {
|
|
|
279
280
|
valueIndex: {}
|
|
280
281
|
};
|
|
281
282
|
for (const e of definition) {
|
|
282
|
-
indexes.nameIndex
|
|
283
|
+
setOwnProperty(indexes.nameIndex, e.name, e);
|
|
283
284
|
indexes.valueIndex[e.value] = e;
|
|
284
285
|
}
|
|
285
286
|
return indexes;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-opcua-address-space",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.186.1",
|
|
5
5
|
"description": "pure nodejs OPCUA SDK - module address-space",
|
|
6
6
|
"main": "./dist/api/index.js",
|
|
7
7
|
"types": "./dist/api/index.d.ts",
|
|
@@ -23,48 +23,48 @@
|
|
|
23
23
|
"@types/semver": "7.8.0",
|
|
24
24
|
"chalk": "4.1.2",
|
|
25
25
|
"dequeue": "^1.0.5",
|
|
26
|
-
"node-opcua-address-space-base": "2.
|
|
26
|
+
"node-opcua-address-space-base": "2.186.1",
|
|
27
27
|
"node-opcua-assert": "2.184.0",
|
|
28
|
-
"node-opcua-basic-types": "2.
|
|
29
|
-
"node-opcua-binary-stream": "2.
|
|
30
|
-
"node-opcua-client-dynamic-extension-object": "2.
|
|
28
|
+
"node-opcua-basic-types": "2.186.1",
|
|
29
|
+
"node-opcua-binary-stream": "2.186.1",
|
|
30
|
+
"node-opcua-client-dynamic-extension-object": "2.186.1",
|
|
31
31
|
"node-opcua-constants": "2.185.0",
|
|
32
32
|
"node-opcua-crypto": "6.0.0",
|
|
33
|
-
"node-opcua-data-access": "2.
|
|
34
|
-
"node-opcua-data-model": "2.
|
|
35
|
-
"node-opcua-data-value": "2.
|
|
36
|
-
"node-opcua-date-time": "2.
|
|
33
|
+
"node-opcua-data-access": "2.186.1",
|
|
34
|
+
"node-opcua-data-model": "2.186.1",
|
|
35
|
+
"node-opcua-data-value": "2.186.1",
|
|
36
|
+
"node-opcua-date-time": "2.186.1",
|
|
37
37
|
"node-opcua-debug": "2.184.0",
|
|
38
|
-
"node-opcua-enum": "2.
|
|
39
|
-
"node-opcua-extension-object": "2.
|
|
40
|
-
"node-opcua-factory": "2.
|
|
41
|
-
"node-opcua-nodeid": "2.
|
|
42
|
-
"node-opcua-nodeset-ua": "2.
|
|
43
|
-
"node-opcua-numeric-range": "2.
|
|
38
|
+
"node-opcua-enum": "2.186.1",
|
|
39
|
+
"node-opcua-extension-object": "2.186.1",
|
|
40
|
+
"node-opcua-factory": "2.186.1",
|
|
41
|
+
"node-opcua-nodeid": "2.186.1",
|
|
42
|
+
"node-opcua-nodeset-ua": "2.186.1",
|
|
43
|
+
"node-opcua-numeric-range": "2.186.1",
|
|
44
44
|
"node-opcua-object-registry": "2.184.0",
|
|
45
|
-
"node-opcua-pseudo-session": "2.
|
|
46
|
-
"node-opcua-service-browse": "2.
|
|
47
|
-
"node-opcua-service-call": "2.
|
|
48
|
-
"node-opcua-service-history": "2.
|
|
49
|
-
"node-opcua-service-translate-browse-path": "2.
|
|
50
|
-
"node-opcua-service-write": "2.
|
|
51
|
-
"node-opcua-status-code": "2.
|
|
52
|
-
"node-opcua-types": "2.
|
|
53
|
-
"node-opcua-utils": "2.
|
|
54
|
-
"node-opcua-variant": "2.
|
|
55
|
-
"node-opcua-xml2json": "2.
|
|
45
|
+
"node-opcua-pseudo-session": "2.186.1",
|
|
46
|
+
"node-opcua-service-browse": "2.186.1",
|
|
47
|
+
"node-opcua-service-call": "2.186.1",
|
|
48
|
+
"node-opcua-service-history": "2.186.1",
|
|
49
|
+
"node-opcua-service-translate-browse-path": "2.186.1",
|
|
50
|
+
"node-opcua-service-write": "2.186.1",
|
|
51
|
+
"node-opcua-status-code": "2.186.1",
|
|
52
|
+
"node-opcua-types": "2.186.1",
|
|
53
|
+
"node-opcua-utils": "2.186.1",
|
|
54
|
+
"node-opcua-variant": "2.186.1",
|
|
55
|
+
"node-opcua-xml2json": "2.186.1",
|
|
56
56
|
"semver": "^7.8.5",
|
|
57
57
|
"thenify-ex": "4.4.0",
|
|
58
58
|
"xml-writer": "^1.7.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"humanize": "0.0.9",
|
|
62
|
-
"node-opcua-benchmarker": "2.
|
|
62
|
+
"node-opcua-benchmarker": "2.186.1",
|
|
63
63
|
"node-opcua-leak-detector": "2.184.1",
|
|
64
64
|
"node-opcua-nodesets": "2.185.0",
|
|
65
|
-
"node-opcua-packet-analyzer": "2.
|
|
66
|
-
"node-opcua-schemas": "2.
|
|
67
|
-
"node-opcua-service-filter": "2.
|
|
65
|
+
"node-opcua-packet-analyzer": "2.186.1",
|
|
66
|
+
"node-opcua-schemas": "2.186.1",
|
|
67
|
+
"node-opcua-service-filter": "2.186.1",
|
|
68
68
|
"node-opcua-test-fixtures": "2.184.0",
|
|
69
69
|
"node-opcua-test-helpers": "2.184.0"
|
|
70
70
|
},
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"internet of things"
|
|
84
84
|
],
|
|
85
85
|
"homepage": "http://node-opcua.github.io/",
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "c4b15b4ca645101b2d656a75b2ea9a8a843d25b5",
|
|
87
87
|
"files": [
|
|
88
88
|
"dist",
|
|
89
89
|
"distHelpers",
|