opcua-webapi-ts 1.1.0 → 1.1.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/dist/cjs/client/utils/UaNodeReader.js +13 -13
- package/dist/cjs/client/utils/UaObjectTypeDictionary.js +1 -1
- package/dist/cjs/common/types/UaLink.js +9 -1
- package/dist/client/utils/UaNodeReader.js +13 -13
- package/dist/client/utils/UaObjectTypeDictionary.js +1 -1
- package/dist/common/types/UaLink.d.ts +6 -1
- package/dist/common/types/UaLink.js +9 -1
- package/package.json +1 -1
|
@@ -56,7 +56,7 @@ class UaNodeReaderBase {
|
|
|
56
56
|
for (let item of currentResult.references) {
|
|
57
57
|
let nodeId = item.nodeId.getNodeId();
|
|
58
58
|
let typeDefinition = (_a = item.typeDefinition) === null || _a === void 0 ? void 0 : _a.getNodeId();
|
|
59
|
-
if (null == nodeId || null
|
|
59
|
+
if (null == nodeId || null === typeDefinition)
|
|
60
60
|
continue;
|
|
61
61
|
this._browseResults.push({
|
|
62
62
|
fromNodeId: currentNode.nodeId,
|
|
@@ -575,7 +575,7 @@ class UaNodeLinkReader {
|
|
|
575
575
|
};
|
|
576
576
|
ret.set(item.fromNodeId.toString(), result);
|
|
577
577
|
}
|
|
578
|
-
result.links.push(new common_1.UaLink(item.nodeId, item.nodeClass, item.referenceTypeId, item.isForward));
|
|
578
|
+
result.links.push(new common_1.UaLink(item.nodeId, item.nodeClass, item.browseName, item.displayName, item.referenceTypeId, item.isForward));
|
|
579
579
|
}
|
|
580
580
|
return [...ret.values()];
|
|
581
581
|
}
|
|
@@ -587,7 +587,7 @@ class UaNodeLinkReader {
|
|
|
587
587
|
let nodesToBrowse = this._nodesToBrowse.splice(0, 50);
|
|
588
588
|
let browseDescriptions = [];
|
|
589
589
|
for (let item of nodesToBrowse) {
|
|
590
|
-
let browseDescription = new common_1.UaBrowseDescription(item, opcua_webapi_1.BrowseDirection.Both, common_1.UaNodeId.from(common_1.ReferenceTypeIds.NonHierarchicalReferences), true, opcua_webapi_1.NodeClass.Object
|
|
590
|
+
let browseDescription = new common_1.UaBrowseDescription(item, opcua_webapi_1.BrowseDirection.Both, common_1.UaNodeId.from(common_1.ReferenceTypeIds.NonHierarchicalReferences), true, opcua_webapi_1.NodeClass.Object, 63);
|
|
591
591
|
browseDescriptions.push(browseDescription);
|
|
592
592
|
}
|
|
593
593
|
let results = yield client.browse(browseDescriptions, 50);
|
|
@@ -599,15 +599,15 @@ class UaNodeLinkReader {
|
|
|
599
599
|
for (let item of currentResult.references) {
|
|
600
600
|
let nodeId = item.nodeId.getNodeId();
|
|
601
601
|
let typeDefinition = (_a = item.typeDefinition) === null || _a === void 0 ? void 0 : _a.getNodeId();
|
|
602
|
-
if (null == nodeId || null
|
|
602
|
+
if (null == nodeId || null === typeDefinition)
|
|
603
603
|
continue;
|
|
604
604
|
this._browseResults.push({
|
|
605
605
|
fromNodeId: currentNodeId,
|
|
606
606
|
nodeId: nodeId,
|
|
607
|
-
nodeClass: item.nodeClass,
|
|
608
|
-
browseName: item.browseName,
|
|
609
|
-
displayName: item.displayName,
|
|
610
|
-
referenceTypeId: item.referenceTypeId,
|
|
607
|
+
nodeClass: (item.nodeClass) ? item.nodeClass : opcua_webapi_1.NodeClass.Unspecified,
|
|
608
|
+
browseName: (item.browseName) ? item.browseName : "",
|
|
609
|
+
displayName: (item.displayName) ? item.displayName : common_1.UaLocalizedText.nullText,
|
|
610
|
+
referenceTypeId: (item.referenceTypeId) ? item.referenceTypeId : common_1.UaNodeId.nullNodeId,
|
|
611
611
|
isForward: item.isForward,
|
|
612
612
|
typeDefinitionId: typeDefinition
|
|
613
613
|
});
|
|
@@ -638,15 +638,15 @@ class UaNodeLinkReader {
|
|
|
638
638
|
for (let item of currentResult.references) {
|
|
639
639
|
let nodeId = item.nodeId.getNodeId();
|
|
640
640
|
let typeDefinition = (_a = item.typeDefinition) === null || _a === void 0 ? void 0 : _a.getNodeId();
|
|
641
|
-
if (null == nodeId || null
|
|
641
|
+
if (null == nodeId || null === typeDefinition)
|
|
642
642
|
continue;
|
|
643
643
|
this._browseResults.push({
|
|
644
644
|
fromNodeId: currentNodeId,
|
|
645
645
|
nodeId: nodeId,
|
|
646
|
-
nodeClass: item.nodeClass,
|
|
647
|
-
browseName: item.browseName,
|
|
648
|
-
displayName: item.displayName,
|
|
649
|
-
referenceTypeId: item.referenceTypeId,
|
|
646
|
+
nodeClass: (item.nodeClass) ? item.nodeClass : opcua_webapi_1.NodeClass.Unspecified,
|
|
647
|
+
browseName: (item.browseName) ? item.browseName : "",
|
|
648
|
+
displayName: (item.displayName) ? item.displayName : common_1.UaLocalizedText.nullText,
|
|
649
|
+
referenceTypeId: (item.referenceTypeId) ? item.referenceTypeId : common_1.UaNodeId.nullNodeId,
|
|
650
650
|
isForward: item.isForward,
|
|
651
651
|
typeDefinitionId: typeDefinition
|
|
652
652
|
});
|
|
@@ -38,7 +38,7 @@ class UaObjectTypeDictionary {
|
|
|
38
38
|
let nodeIds = this._remainingNodesToBrowse.splice(0, 15);
|
|
39
39
|
let nodesToBrowse = [];
|
|
40
40
|
for (let item of nodeIds) {
|
|
41
|
-
let browseDescription = new common_1.UaBrowseDescription(item, opcua_webapi_1.BrowseDirection.Forward, new common_1.UaNodeId(common_1.ReferenceTypeIds.HasSubtype), false, opcua_webapi_1.NodeClass.ObjectType,
|
|
41
|
+
let browseDescription = new common_1.UaBrowseDescription(item, opcua_webapi_1.BrowseDirection.Forward, new common_1.UaNodeId(common_1.ReferenceTypeIds.HasSubtype), false, opcua_webapi_1.NodeClass.ObjectType, 63);
|
|
42
42
|
nodesToBrowse.push(browseDescription);
|
|
43
43
|
}
|
|
44
44
|
let results = yield client.browse(nodesToBrowse);
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UaLink = void 0;
|
|
4
4
|
class UaLink {
|
|
5
|
-
constructor(targetId, nodeClass, referenceTypeId, isForward) {
|
|
5
|
+
constructor(targetId, nodeClass, browseName, displayName, referenceTypeId, isForward) {
|
|
6
6
|
this._targetId = targetId;
|
|
7
|
+
this._browseName = browseName;
|
|
8
|
+
this._displayName = displayName;
|
|
7
9
|
this._nodeClass = nodeClass;
|
|
8
10
|
this._referenceTypeId = referenceTypeId;
|
|
9
11
|
this._isForward = isForward;
|
|
@@ -11,6 +13,12 @@ class UaLink {
|
|
|
11
13
|
get targetId() {
|
|
12
14
|
return this._targetId;
|
|
13
15
|
}
|
|
16
|
+
get browseName() {
|
|
17
|
+
return this._browseName;
|
|
18
|
+
}
|
|
19
|
+
get displayName() {
|
|
20
|
+
return this._displayName;
|
|
21
|
+
}
|
|
14
22
|
get nodeClass() {
|
|
15
23
|
return this._nodeClass;
|
|
16
24
|
}
|
|
@@ -56,7 +56,7 @@ class UaNodeReaderBase {
|
|
|
56
56
|
for (let item of currentResult.references) {
|
|
57
57
|
let nodeId = item.nodeId.getNodeId();
|
|
58
58
|
let typeDefinition = (_a = item.typeDefinition) === null || _a === void 0 ? void 0 : _a.getNodeId();
|
|
59
|
-
if (null == nodeId || null
|
|
59
|
+
if (null == nodeId || null === typeDefinition)
|
|
60
60
|
continue;
|
|
61
61
|
this._browseResults.push({
|
|
62
62
|
fromNodeId: currentNode.nodeId,
|
|
@@ -575,7 +575,7 @@ class UaNodeLinkReader {
|
|
|
575
575
|
};
|
|
576
576
|
ret.set(item.fromNodeId.toString(), result);
|
|
577
577
|
}
|
|
578
|
-
result.links.push(new common_1.UaLink(item.nodeId, item.nodeClass, item.referenceTypeId, item.isForward));
|
|
578
|
+
result.links.push(new common_1.UaLink(item.nodeId, item.nodeClass, item.browseName, item.displayName, item.referenceTypeId, item.isForward));
|
|
579
579
|
}
|
|
580
580
|
return [...ret.values()];
|
|
581
581
|
}
|
|
@@ -587,7 +587,7 @@ class UaNodeLinkReader {
|
|
|
587
587
|
let nodesToBrowse = this._nodesToBrowse.splice(0, 50);
|
|
588
588
|
let browseDescriptions = [];
|
|
589
589
|
for (let item of nodesToBrowse) {
|
|
590
|
-
let browseDescription = new common_1.UaBrowseDescription(item, opcua_webapi_1.BrowseDirection.Both, common_1.UaNodeId.from(common_1.ReferenceTypeIds.NonHierarchicalReferences), true, opcua_webapi_1.NodeClass.Object
|
|
590
|
+
let browseDescription = new common_1.UaBrowseDescription(item, opcua_webapi_1.BrowseDirection.Both, common_1.UaNodeId.from(common_1.ReferenceTypeIds.NonHierarchicalReferences), true, opcua_webapi_1.NodeClass.Object, 63);
|
|
591
591
|
browseDescriptions.push(browseDescription);
|
|
592
592
|
}
|
|
593
593
|
let results = yield client.browse(browseDescriptions, 50);
|
|
@@ -599,15 +599,15 @@ class UaNodeLinkReader {
|
|
|
599
599
|
for (let item of currentResult.references) {
|
|
600
600
|
let nodeId = item.nodeId.getNodeId();
|
|
601
601
|
let typeDefinition = (_a = item.typeDefinition) === null || _a === void 0 ? void 0 : _a.getNodeId();
|
|
602
|
-
if (null == nodeId || null
|
|
602
|
+
if (null == nodeId || null === typeDefinition)
|
|
603
603
|
continue;
|
|
604
604
|
this._browseResults.push({
|
|
605
605
|
fromNodeId: currentNodeId,
|
|
606
606
|
nodeId: nodeId,
|
|
607
|
-
nodeClass: item.nodeClass,
|
|
608
|
-
browseName: item.browseName,
|
|
609
|
-
displayName: item.displayName,
|
|
610
|
-
referenceTypeId: item.referenceTypeId,
|
|
607
|
+
nodeClass: (item.nodeClass) ? item.nodeClass : opcua_webapi_1.NodeClass.Unspecified,
|
|
608
|
+
browseName: (item.browseName) ? item.browseName : "",
|
|
609
|
+
displayName: (item.displayName) ? item.displayName : common_1.UaLocalizedText.nullText,
|
|
610
|
+
referenceTypeId: (item.referenceTypeId) ? item.referenceTypeId : common_1.UaNodeId.nullNodeId,
|
|
611
611
|
isForward: item.isForward,
|
|
612
612
|
typeDefinitionId: typeDefinition
|
|
613
613
|
});
|
|
@@ -638,15 +638,15 @@ class UaNodeLinkReader {
|
|
|
638
638
|
for (let item of currentResult.references) {
|
|
639
639
|
let nodeId = item.nodeId.getNodeId();
|
|
640
640
|
let typeDefinition = (_a = item.typeDefinition) === null || _a === void 0 ? void 0 : _a.getNodeId();
|
|
641
|
-
if (null == nodeId || null
|
|
641
|
+
if (null == nodeId || null === typeDefinition)
|
|
642
642
|
continue;
|
|
643
643
|
this._browseResults.push({
|
|
644
644
|
fromNodeId: currentNodeId,
|
|
645
645
|
nodeId: nodeId,
|
|
646
|
-
nodeClass: item.nodeClass,
|
|
647
|
-
browseName: item.browseName,
|
|
648
|
-
displayName: item.displayName,
|
|
649
|
-
referenceTypeId: item.referenceTypeId,
|
|
646
|
+
nodeClass: (item.nodeClass) ? item.nodeClass : opcua_webapi_1.NodeClass.Unspecified,
|
|
647
|
+
browseName: (item.browseName) ? item.browseName : "",
|
|
648
|
+
displayName: (item.displayName) ? item.displayName : common_1.UaLocalizedText.nullText,
|
|
649
|
+
referenceTypeId: (item.referenceTypeId) ? item.referenceTypeId : common_1.UaNodeId.nullNodeId,
|
|
650
650
|
isForward: item.isForward,
|
|
651
651
|
typeDefinitionId: typeDefinition
|
|
652
652
|
});
|
|
@@ -38,7 +38,7 @@ class UaObjectTypeDictionary {
|
|
|
38
38
|
let nodeIds = this._remainingNodesToBrowse.splice(0, 15);
|
|
39
39
|
let nodesToBrowse = [];
|
|
40
40
|
for (let item of nodeIds) {
|
|
41
|
-
let browseDescription = new common_1.UaBrowseDescription(item, opcua_webapi_1.BrowseDirection.Forward, new common_1.UaNodeId(common_1.ReferenceTypeIds.HasSubtype), false, opcua_webapi_1.NodeClass.ObjectType,
|
|
41
|
+
let browseDescription = new common_1.UaBrowseDescription(item, opcua_webapi_1.BrowseDirection.Forward, new common_1.UaNodeId(common_1.ReferenceTypeIds.HasSubtype), false, opcua_webapi_1.NodeClass.ObjectType, 63);
|
|
42
42
|
nodesToBrowse.push(browseDescription);
|
|
43
43
|
}
|
|
44
44
|
let results = yield client.browse(nodesToBrowse);
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
+
import { UaLocalizedText } from "./UaLocalizedText";
|
|
1
2
|
import { UaNodeId } from "./UaNodeId";
|
|
2
3
|
export declare class UaLink {
|
|
3
4
|
private _targetId;
|
|
4
5
|
private _nodeClass;
|
|
6
|
+
private _browseName;
|
|
7
|
+
private _displayName;
|
|
5
8
|
private _referenceTypeId;
|
|
6
9
|
private _isForward;
|
|
7
|
-
constructor(targetId: UaNodeId, nodeClass: number, referenceTypeId: UaNodeId, isForward: boolean);
|
|
10
|
+
constructor(targetId: UaNodeId, nodeClass: number, browseName: string, displayName: UaLocalizedText, referenceTypeId: UaNodeId, isForward: boolean);
|
|
8
11
|
get targetId(): UaNodeId;
|
|
12
|
+
get browseName(): string;
|
|
13
|
+
get displayName(): UaLocalizedText;
|
|
9
14
|
get nodeClass(): number;
|
|
10
15
|
get referenceTypeId(): UaNodeId;
|
|
11
16
|
get isForward(): boolean;
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UaLink = void 0;
|
|
4
4
|
class UaLink {
|
|
5
|
-
constructor(targetId, nodeClass, referenceTypeId, isForward) {
|
|
5
|
+
constructor(targetId, nodeClass, browseName, displayName, referenceTypeId, isForward) {
|
|
6
6
|
this._targetId = targetId;
|
|
7
|
+
this._browseName = browseName;
|
|
8
|
+
this._displayName = displayName;
|
|
7
9
|
this._nodeClass = nodeClass;
|
|
8
10
|
this._referenceTypeId = referenceTypeId;
|
|
9
11
|
this._isForward = isForward;
|
|
@@ -11,6 +13,12 @@ class UaLink {
|
|
|
11
13
|
get targetId() {
|
|
12
14
|
return this._targetId;
|
|
13
15
|
}
|
|
16
|
+
get browseName() {
|
|
17
|
+
return this._browseName;
|
|
18
|
+
}
|
|
19
|
+
get displayName() {
|
|
20
|
+
return this._displayName;
|
|
21
|
+
}
|
|
14
22
|
get nodeClass() {
|
|
15
23
|
return this._nodeClass;
|
|
16
24
|
}
|