opcua-webapi-ts 1.1.5 → 1.1.7

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.
Files changed (29) hide show
  1. package/dist/cjs/client/utils/UaDataTypeDictionary.js +38 -91
  2. package/dist/cjs/client/utils/UaNodeReader.js +459 -530
  3. package/dist/cjs/client/utils/UaObjectTypeDictionary.js +37 -29
  4. package/dist/cjs/client/utils/UaReferenceTypeDictionary.js +37 -29
  5. package/dist/cjs/common/nodes/UaDataType.js +35 -34
  6. package/dist/cjs/common/nodes/UaMethod.js +2 -2
  7. package/dist/cjs/common/nodes/UaObject.js +1 -1
  8. package/dist/cjs/common/nodes/UaVariable.js +10 -6
  9. package/dist/cjs/common/types/UaReference.js +59 -0
  10. package/dist/cjs/common/types/index.js +1 -1
  11. package/dist/client/utils/UaDataTypeDictionary.d.ts +3 -6
  12. package/dist/client/utils/UaDataTypeDictionary.js +38 -91
  13. package/dist/client/utils/UaNodeReader.d.ts +45 -73
  14. package/dist/client/utils/UaNodeReader.js +459 -530
  15. package/dist/client/utils/UaObjectTypeDictionary.d.ts +3 -3
  16. package/dist/client/utils/UaObjectTypeDictionary.js +37 -29
  17. package/dist/client/utils/UaReferenceTypeDictionary.d.ts +3 -3
  18. package/dist/client/utils/UaReferenceTypeDictionary.js +37 -29
  19. package/dist/common/nodes/UaDataType.d.ts +2 -2
  20. package/dist/common/nodes/UaDataType.js +35 -34
  21. package/dist/common/nodes/UaMethod.js +2 -2
  22. package/dist/common/nodes/UaObject.js +1 -1
  23. package/dist/common/nodes/UaVariable.d.ts +5 -4
  24. package/dist/common/nodes/UaVariable.js +10 -6
  25. package/dist/common/types/UaReference.d.ts +23 -0
  26. package/dist/common/types/UaReference.js +59 -0
  27. package/dist/common/types/index.d.ts +1 -1
  28. package/dist/common/types/index.js +1 -1
  29. package/package.json +1 -1
@@ -1,88 +1,60 @@
1
- import { UaLocalizedText, UaNode, UaNodeId, UaLink } from "../../common";
1
+ import { UaNode, UaNodeId, UaReference } from "../../common";
2
2
  import { UaWebClient } from "../UaWebClient";
3
- type NodeToBrowse = {
3
+ export type BrowseReferenceResult = {
4
4
  nodeId: UaNodeId;
5
- nodeClassToReturn: number;
5
+ references: Array<UaReference>;
6
6
  };
7
- type CpToBrowse = {
8
- nodeId: UaNodeId;
9
- continuationPoint: string;
10
- };
11
- type BrowseResult = {
12
- fromNodeId: UaNodeId;
13
- nodeId: UaNodeId;
14
- nodeClass: number;
15
- browseName: string;
16
- displayName: UaLocalizedText;
17
- referenceTypeId: UaNodeId;
18
- isForward?: boolean;
19
- typeDefinitionId?: UaNodeId;
20
- };
21
- type ReadResult = {
22
- parentId: UaNodeId;
23
- node: UaNode;
24
- };
25
- export type ReadChildResult = {
7
+ export type ReadChildNodeResult = {
26
8
  nodeId: UaNodeId;
27
9
  children: Array<UaNode>;
28
10
  };
29
- export type ReadLinkResult = {
30
- nodeId: UaNodeId;
31
- links: Array<UaLink>;
32
- };
33
- export declare abstract class UaNodeReaderBase {
34
- protected _finished: boolean;
35
- protected _nodesToBrowse: Array<NodeToBrowse>;
36
- protected _continuationPointToBrowse: Array<CpToBrowse>;
37
- protected _browseResults: Array<BrowseResult>;
38
- protected _readResults: Map<string, ReadResult>;
39
- protected _nodeClassToReturn: number;
40
- protected _returnDescription: boolean;
41
- private static s_variableTypeWithoutMember;
42
- private static s_variableNameToReadValue;
43
- constructor(returnDescription: boolean, returnVariables: boolean, returnMethod: boolean);
44
- protected _browseNodes(client: UaWebClient): Promise<void>;
45
- protected _browseContinuationPoints(client: UaWebClient): Promise<void>;
46
- protected _readNodes(client: UaWebClient): Promise<void>;
47
- protected _buildNodeTree(): void;
48
- private _readTypes;
49
- private _readObjects;
50
- private _readVariables;
51
- private _readMethods;
52
- private _updateNodesToBrowse;
53
- }
54
- export declare class UaNodeReader extends UaNodeReaderBase {
55
- private _nodeIds;
56
- private _isRootNodeRead;
57
- constructor(nodeIds: Array<UaNodeId>, returnDescription?: boolean | null, returnVariables?: boolean | null, returnMethod?: boolean | null);
58
- readAll(client: UaWebClient): Promise<void>;
59
- read(client: UaWebClient): Promise<void>;
60
- isFinish(): boolean;
61
- getResults(): Array<UaNode>;
62
- private _readRootNodes;
63
- }
64
- export declare class UaNodeChildReader extends UaNodeReaderBase {
65
- private _nodeIds;
66
- constructor(nodeIds: Array<UaNodeId>, returnDescription?: boolean | null, returnVariables?: boolean | null, returnMethod?: boolean | null);
67
- readAll(client: UaWebClient): Promise<void>;
68
- read(client: UaWebClient): Promise<void>;
69
- isFinish(): boolean;
70
- getResults(): Array<ReadChildResult>;
71
- }
72
- export declare class UaNodeLinkReader {
11
+ export declare class UaNodeReferenceBrowser {
73
12
  private _nodesToBrowse;
74
13
  private _continuationPointToBrowse;
75
- private _browseResults;
14
+ private _referenceType;
15
+ private _nodeClassToReturn;
76
16
  private _returnDescription;
17
+ private _maxNodesPerBrowse;
18
+ private _maxReferencesPerNode;
77
19
  private _readResults;
78
- constructor(nodeIds: Array<UaNodeId>, returnDescription?: boolean | null);
79
- readAll(client: UaWebClient): Promise<void>;
80
- read(client: UaWebClient): Promise<void>;
20
+ constructor(nodeIds: Array<UaNodeId>, referenceType: UaNodeId, nodeClassToReturn: number, returnDescription: boolean, maxNodesPerBrowse?: number | null, maxReferencesPerNode?: number | null);
21
+ browse(client: UaWebClient): Promise<void>;
22
+ browseOnce(client: UaWebClient): Promise<void>;
23
+ results(): Array<BrowseReferenceResult>;
81
24
  isFinish(): boolean;
82
- getResults(): Array<ReadLinkResult>;
83
25
  private _browseNodes;
84
26
  private _browseContinuationPoints;
85
- private _buildResults;
86
27
  private _readDescriptions;
87
28
  }
88
- export {};
29
+ export declare class UaChildBrowser extends UaNodeReferenceBrowser {
30
+ constructor(nodeIds: Array<UaNodeId>, returnDescription?: boolean);
31
+ }
32
+ export declare class UaLinkBrowser extends UaNodeReferenceBrowser {
33
+ constructor(nodeIds: Array<UaNodeId>, returnDescription?: boolean);
34
+ }
35
+ export declare class UaNodeReader {
36
+ private _nodeClassToReturn;
37
+ private _returnDescription;
38
+ private _returnAttributes;
39
+ private _returnValue;
40
+ private static s_variableTypeWithoutMember;
41
+ private static s_variablesNameToRead;
42
+ constructor(returnDescription?: boolean | null, returnVariable?: boolean | null, returnMethod?: boolean | null, returnAttributes?: boolean | null, returnValue?: boolean | null);
43
+ read(nodeIds: Array<UaNodeId>, client: UaWebClient): Promise<Array<UaNode>>;
44
+ readByReferences(references: Array<UaReference>, client: UaWebClient): Promise<Array<UaNode>>;
45
+ private _readRootNodes;
46
+ private _readNodes;
47
+ private _readTypes;
48
+ private _readObjects;
49
+ private _readVariables;
50
+ private _readMethods;
51
+ private _buildNodeTree;
52
+ }
53
+ export declare class UaObjectReader extends UaNodeReader {
54
+ constructor(returnDescription?: boolean | null, returnValue?: boolean | null);
55
+ read(nodeIds: Array<UaNodeId>, client: UaWebClient): Promise<Array<UaNode>>;
56
+ }
57
+ export declare class UaTypeReader extends UaNodeReader {
58
+ constructor();
59
+ read(nodeIds: Array<UaNodeId>, client: UaWebClient): Promise<Array<UaNode>>;
60
+ }