node-opcua-address-space 2.187.1 → 2.187.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/impl/_mandatory_child_or_requested_optional_filter.d.ts +6 -3
- package/dist/impl/_mandatory_child_or_requested_optional_filter.d.ts.map +1 -1
- package/dist/impl/_mandatory_child_or_requested_optional_filter.js +7 -4
- package/dist/impl/_mandatory_child_or_requested_optional_filter.js.map +1 -1
- package/dist/impl/base_node_private.d.ts.map +1 -1
- package/dist/impl/base_node_private.js +12 -0
- package/dist/impl/base_node_private.js.map +1 -1
- package/dist/tsconfig_base.tsbuildinfo +1 -1
- package/impl/_mandatory_child_or_requested_optional_filter.ts +7 -4
- package/impl/base_node_private.ts +13 -0
- package/package.json +2 -2
|
@@ -26,9 +26,12 @@ export class MandatoryChildOrRequestedOptionalFilter implements CloneFilter {
|
|
|
26
26
|
private readonly references: UAReference[];
|
|
27
27
|
private readonly copyAlsoAllOptionals: boolean = false;
|
|
28
28
|
/**
|
|
29
|
-
* the clone is an instance declaration of a type (instantiate() inside a type): the
|
|
30
|
-
* placeholders its type
|
|
31
|
-
* (OPC 10000-100 DI
|
|
29
|
+
* the clone is an instance declaration of a type (instantiate() inside a type): it takes the
|
|
30
|
+
* placeholders of its type that `optionals` requests, and only those. The ModelCompiler emits
|
|
31
|
+
* a placeholder in an instance declaration when the design declares it (OPC 10000-100 DI
|
|
32
|
+
* DeviceType/DeviceTypeImage/<ImageIdentifier>), not every placeholder of the member's type
|
|
33
|
+
* (DI TopologyElementType/Identification carries no <GroupIdentifier>). An instance never
|
|
34
|
+
* takes one.
|
|
32
35
|
*/
|
|
33
36
|
private readonly keepPlaceholders: boolean = false;
|
|
34
37
|
|
|
@@ -86,7 +89,7 @@ export class MandatoryChildOrRequestedOptionalFilter implements CloneFilter {
|
|
|
86
89
|
return this.copyAlsoAllOptionals || (node.browseName?.name || "") in this.optionalsMap;
|
|
87
90
|
case "OptionalPlaceholder":
|
|
88
91
|
case "MandatoryPlaceholder":
|
|
89
|
-
return this.keepPlaceholders;
|
|
92
|
+
return this.keepPlaceholders && (node.browseName?.name || "") in this.optionalsMap;
|
|
90
93
|
default:
|
|
91
94
|
return false; // ignored
|
|
92
95
|
}
|
|
@@ -590,6 +590,19 @@ function _merge_base_declaration(
|
|
|
590
590
|
// c8 ignore next
|
|
591
591
|
doTrace && traceLog(extraInfo.pad(), "merging base declaration ", fullPath2(baseDeclaration), " into ", fullPath2(clonedNode));
|
|
592
592
|
_register_existing_children(baseDeclaration, clonedNode, extraInfo);
|
|
593
|
+
// a member the clone already reaches without aggregating it (OPC 30500 LADS: Operational
|
|
594
|
+
// organizes its state machine's Stop) is present as well: cloned again from the base
|
|
595
|
+
// declaration, it was a second Stop, or "already registered" with symbolic names
|
|
596
|
+
const aggregates = clonedNode.addressSpace.findReferenceType("Aggregates");
|
|
597
|
+
for (const reference of clonedNode.findReferencesEx("HierarchicalReferences", BrowseDirection.Forward)) {
|
|
598
|
+
const referenceType = clonedNode.addressSpace.findReferenceType(reference.referenceType);
|
|
599
|
+
if (!referenceType || (aggregates && referenceType.isSubtypeOf(aggregates))) continue;
|
|
600
|
+
const member = reference.node ?? clonedNode.addressSpace.findNode(reference.nodeId);
|
|
601
|
+
if (member)
|
|
602
|
+
browseNameMap.add(
|
|
603
|
+
`${clonedNode.nodeId.toString()}(${clonedNode.browseName.toString()})/${member.browseName.toString()}`
|
|
604
|
+
);
|
|
605
|
+
}
|
|
593
606
|
_clone_hierarchical_references(
|
|
594
607
|
baseDeclaration as UAObject | UAVariable | UAMethod,
|
|
595
608
|
clonedNode as UAObject | UAVariable | UAMethod,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-opcua-address-space",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.187.
|
|
4
|
+
"version": "2.187.3",
|
|
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",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"internet of things"
|
|
85
85
|
],
|
|
86
86
|
"homepage": "http://node-opcua.github.io/",
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "126ee937fe6d49403b6a5a8b84e01d5869be91ab",
|
|
88
88
|
"files": [
|
|
89
89
|
"dist",
|
|
90
90
|
"distHelpers",
|