opcua-webapi-ts 1.1.21 → 1.1.22
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.
|
@@ -14,11 +14,12 @@ const opcua_webapi_1 = require("opcua-webapi");
|
|
|
14
14
|
const common_1 = require("../../common");
|
|
15
15
|
const UaNodeBrowser_1 = require("./UaNodeBrowser");
|
|
16
16
|
class UaNodeReader {
|
|
17
|
-
constructor(client, returnDescription, returnVariable, returnMethod, returnAttributes, returnValue) {
|
|
17
|
+
constructor(client, returnDescription, returnVariable, returnMethod, returnAttributes, returnValue, referenceTypeToReturn) {
|
|
18
18
|
this._client = client;
|
|
19
19
|
this._returnDescription = (returnDescription) ? returnDescription : false;
|
|
20
20
|
this._returnAttributes = (returnAttributes) ? returnAttributes : false;
|
|
21
21
|
this._returnValue = (returnValue) ? returnValue : false;
|
|
22
|
+
this._referenceTypeToReturn = (referenceTypeToReturn) ? referenceTypeToReturn : common_1.UaNodeId.from(common_1.ReferenceTypeIds.HierarchicalReferences);
|
|
22
23
|
this._nodeClassToReturn = 0;
|
|
23
24
|
if (returnVariable)
|
|
24
25
|
this._nodeClassToReturn += opcua_webapi_1.NodeClass.Variable;
|
|
@@ -68,7 +69,7 @@ class UaNodeReader {
|
|
|
68
69
|
nodeIdsToBrowse.push(item.nodeId);
|
|
69
70
|
nodeIdsSet.add(item.nodeId.toString());
|
|
70
71
|
}
|
|
71
|
-
let nodeReferenceBrowser = new UaNodeBrowser_1.UaNodeBrowser(this._client, nodeIdsToBrowse,
|
|
72
|
+
let nodeReferenceBrowser = new UaNodeBrowser_1.UaNodeBrowser(this._client, nodeIdsToBrowse, this._referenceTypeToReturn, this._nodeClassToReturn, false);
|
|
72
73
|
yield nodeReferenceBrowser.browse();
|
|
73
74
|
let childReferences = nodeReferenceBrowser.results();
|
|
74
75
|
let childNodesToBrowse = [];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UaNode, UaNodeId, UaReference } from "../../common";
|
|
1
|
+
import { UaNode, UaNodeId, UaObject, UaReference, UaDefintionNode } from "../../common";
|
|
2
2
|
import { UaWebClient } from "../UaWebClient";
|
|
3
3
|
export declare class UaNodeReader {
|
|
4
4
|
private _client;
|
|
@@ -6,9 +6,10 @@ export declare class UaNodeReader {
|
|
|
6
6
|
private _returnDescription;
|
|
7
7
|
private _returnAttributes;
|
|
8
8
|
private _returnValue;
|
|
9
|
+
private _referenceTypeToReturn;
|
|
9
10
|
private static s_variableTypeWithoutMember;
|
|
10
11
|
private static s_variablesNameToRead;
|
|
11
|
-
constructor(client: UaWebClient, returnDescription?: boolean | null, returnVariable?: boolean | null, returnMethod?: boolean | null, returnAttributes?: boolean | null, returnValue?: boolean | null);
|
|
12
|
+
constructor(client: UaWebClient, returnDescription?: boolean | null, returnVariable?: boolean | null, returnMethod?: boolean | null, returnAttributes?: boolean | null, returnValue?: boolean | null, referenceTypeToReturn?: UaNodeId);
|
|
12
13
|
read(nodeIds: Array<UaNodeId>): Promise<Array<UaNode>>;
|
|
13
14
|
readByReferences(references: Array<UaReference>): Promise<Array<UaNode>>;
|
|
14
15
|
private _readRootNodes;
|
|
@@ -21,9 +22,9 @@ export declare class UaNodeReader {
|
|
|
21
22
|
}
|
|
22
23
|
export declare class UaObjectReader extends UaNodeReader {
|
|
23
24
|
constructor(client: UaWebClient, returnDescription?: boolean | null, returnValue?: boolean | null);
|
|
24
|
-
read(nodeIds: Array<UaNodeId>): Promise<Array<
|
|
25
|
+
read(nodeIds: Array<UaNodeId>): Promise<Array<UaObject>>;
|
|
25
26
|
}
|
|
26
27
|
export declare class UaTypeReader extends UaNodeReader {
|
|
27
28
|
constructor(client: UaWebClient);
|
|
28
|
-
read(nodeIds: Array<UaNodeId>): Promise<Array<
|
|
29
|
+
read(nodeIds: Array<UaNodeId>): Promise<Array<UaDefintionNode>>;
|
|
29
30
|
}
|
|
@@ -14,11 +14,12 @@ const opcua_webapi_1 = require("opcua-webapi");
|
|
|
14
14
|
const common_1 = require("../../common");
|
|
15
15
|
const UaNodeBrowser_1 = require("./UaNodeBrowser");
|
|
16
16
|
class UaNodeReader {
|
|
17
|
-
constructor(client, returnDescription, returnVariable, returnMethod, returnAttributes, returnValue) {
|
|
17
|
+
constructor(client, returnDescription, returnVariable, returnMethod, returnAttributes, returnValue, referenceTypeToReturn) {
|
|
18
18
|
this._client = client;
|
|
19
19
|
this._returnDescription = (returnDescription) ? returnDescription : false;
|
|
20
20
|
this._returnAttributes = (returnAttributes) ? returnAttributes : false;
|
|
21
21
|
this._returnValue = (returnValue) ? returnValue : false;
|
|
22
|
+
this._referenceTypeToReturn = (referenceTypeToReturn) ? referenceTypeToReturn : common_1.UaNodeId.from(common_1.ReferenceTypeIds.HierarchicalReferences);
|
|
22
23
|
this._nodeClassToReturn = 0;
|
|
23
24
|
if (returnVariable)
|
|
24
25
|
this._nodeClassToReturn += opcua_webapi_1.NodeClass.Variable;
|
|
@@ -68,7 +69,7 @@ class UaNodeReader {
|
|
|
68
69
|
nodeIdsToBrowse.push(item.nodeId);
|
|
69
70
|
nodeIdsSet.add(item.nodeId.toString());
|
|
70
71
|
}
|
|
71
|
-
let nodeReferenceBrowser = new UaNodeBrowser_1.UaNodeBrowser(this._client, nodeIdsToBrowse,
|
|
72
|
+
let nodeReferenceBrowser = new UaNodeBrowser_1.UaNodeBrowser(this._client, nodeIdsToBrowse, this._referenceTypeToReturn, this._nodeClassToReturn, false);
|
|
72
73
|
yield nodeReferenceBrowser.browse();
|
|
73
74
|
let childReferences = nodeReferenceBrowser.results();
|
|
74
75
|
let childNodesToBrowse = [];
|