opcua-webapi-ts 1.1.22 → 1.1.24
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/UaDataTypeDictionary.js +1 -1
- package/dist/cjs/client/utils/UaModelling.js +2 -2
- package/dist/cjs/client/utils/UaNodeBrowser.js +7 -36
- package/dist/cjs/client/utils/UaNodeReader.js +120 -76
- package/dist/cjs/client/utils/UaNodeSerializer.js +166 -0
- package/dist/cjs/client/utils/UaObjectTypeDictionary.js +1 -1
- package/dist/cjs/client/utils/UaReferenceTypeDictionary.js +1 -1
- package/dist/cjs/client/utils/index.js +1 -0
- package/dist/cjs/common/nodes/UaMethod.js +22 -0
- package/dist/cjs/common/nodes/UaNode.js +0 -13
- package/dist/cjs/common/nodes/UaObject.js +4 -4
- package/dist/cjs/common/nodes/UaObjectType.js +3 -5
- package/dist/cjs/common/nodes/UaVariable.js +14 -7
- package/dist/client/utils/UaDataTypeDictionary.js +1 -1
- package/dist/client/utils/UaModelling.js +2 -2
- package/dist/client/utils/UaNodeBrowser.d.ts +3 -8
- package/dist/client/utils/UaNodeBrowser.js +7 -36
- package/dist/client/utils/UaNodeReader.d.ts +15 -8
- package/dist/client/utils/UaNodeReader.js +120 -76
- package/dist/client/utils/UaNodeSerializer.d.ts +14 -0
- package/dist/client/utils/UaNodeSerializer.js +166 -0
- package/dist/client/utils/UaObjectTypeDictionary.js +1 -1
- package/dist/client/utils/UaReferenceTypeDictionary.js +1 -1
- package/dist/client/utils/index.d.ts +1 -0
- package/dist/client/utils/index.js +1 -0
- package/dist/common/nodes/UaMethod.d.ts +1 -0
- package/dist/common/nodes/UaMethod.js +22 -0
- package/dist/common/nodes/UaNode.d.ts +0 -5
- package/dist/common/nodes/UaNode.js +0 -13
- package/dist/common/nodes/UaObject.js +4 -4
- package/dist/common/nodes/UaObjectType.js +3 -5
- package/dist/common/nodes/UaVariable.d.ts +4 -1
- package/dist/common/nodes/UaVariable.js +14 -7
- package/package.json +1 -1
|
@@ -49,9 +49,9 @@ class UaObject extends _1.UaInstanceNode {
|
|
|
49
49
|
return ret;
|
|
50
50
|
}
|
|
51
51
|
toJson() {
|
|
52
|
-
let
|
|
52
|
+
let members = [];
|
|
53
53
|
for (let item of this._children) {
|
|
54
|
-
|
|
54
|
+
members.push(item.toJson());
|
|
55
55
|
}
|
|
56
56
|
let ret = {
|
|
57
57
|
nodeId: this._nodeId.toString(),
|
|
@@ -60,8 +60,8 @@ class UaObject extends _1.UaInstanceNode {
|
|
|
60
60
|
displayName: this._displayName.text,
|
|
61
61
|
description: (this._description) ? this._description.text : undefined,
|
|
62
62
|
typeDefinitionId: this._typeDefinitionId.toString(),
|
|
63
|
-
eventNotifier: this._eventNotifier,
|
|
64
|
-
|
|
63
|
+
eventNotifier: (this._eventNotifier != 0) ? this._eventNotifier : undefined,
|
|
64
|
+
members: (members.length != 0) ? members : undefined
|
|
65
65
|
};
|
|
66
66
|
return ret;
|
|
67
67
|
}
|
|
@@ -48,11 +48,9 @@ class UaObjectType extends _1.UaDefintionNode {
|
|
|
48
48
|
this._isObjectMemberRead = value;
|
|
49
49
|
}
|
|
50
50
|
toJson() {
|
|
51
|
-
let
|
|
51
|
+
let members = [];
|
|
52
52
|
for (let item of this._children) {
|
|
53
|
-
|
|
54
|
-
continue;
|
|
55
|
-
children.push(item.toJson());
|
|
53
|
+
members.push(item.toJson());
|
|
56
54
|
}
|
|
57
55
|
let ret = {
|
|
58
56
|
nodeId: this._nodeId.toString(),
|
|
@@ -61,7 +59,7 @@ class UaObjectType extends _1.UaDefintionNode {
|
|
|
61
59
|
displayName: this._displayName.text,
|
|
62
60
|
description: (this._description) ? this._description.text : undefined,
|
|
63
61
|
isAbstract: this._isAbstract,
|
|
64
|
-
|
|
62
|
+
members: (members.length != 0) ? members : undefined
|
|
65
63
|
};
|
|
66
64
|
return ret;
|
|
67
65
|
}
|
|
@@ -9,6 +9,7 @@ export declare class UaVariable extends UaInstanceNode {
|
|
|
9
9
|
private _userAccessLevel;
|
|
10
10
|
private _historizing;
|
|
11
11
|
private _dataValue;
|
|
12
|
+
private _isProperty;
|
|
12
13
|
constructor(nodeId: UaNodeId, browseName: string, displayName: UaLocalizedText, dataType: UaNodeId, valueRank: number, accessLevel: number, userAccessLevel: number, historizing: boolean, typeDefinitionId: UaNodeId);
|
|
13
14
|
get nodeClass(): NodeClass;
|
|
14
15
|
get dataType(): UaNodeId;
|
|
@@ -16,10 +17,12 @@ export declare class UaVariable extends UaInstanceNode {
|
|
|
16
17
|
get accessLevel(): number;
|
|
17
18
|
get userAccessLevel(): number;
|
|
18
19
|
get historizing(): boolean;
|
|
20
|
+
get typeDefinitionId(): UaNodeId;
|
|
19
21
|
get value(): UaVariant | null;
|
|
20
22
|
get dataValue(): UaDataValue | null;
|
|
21
23
|
set dataValue(value: UaDataValue);
|
|
22
|
-
get
|
|
24
|
+
get isProperty(): boolean;
|
|
25
|
+
set isProperty(value: boolean);
|
|
23
26
|
addMember(node: UaVariable): void;
|
|
24
27
|
get variableMembers(): Array<UaVariable>;
|
|
25
28
|
toJson(): any;
|
|
@@ -13,6 +13,7 @@ class UaVariable extends _1.UaInstanceNode {
|
|
|
13
13
|
this._historizing = historizing;
|
|
14
14
|
this._typeDefinitionId = typeDefinitionId;
|
|
15
15
|
this._dataValue = null;
|
|
16
|
+
this._isProperty = false;
|
|
16
17
|
}
|
|
17
18
|
get nodeClass() {
|
|
18
19
|
return opcua_webapi_1.NodeClass.Variable;
|
|
@@ -32,6 +33,9 @@ class UaVariable extends _1.UaInstanceNode {
|
|
|
32
33
|
get historizing() {
|
|
33
34
|
return this._historizing;
|
|
34
35
|
}
|
|
36
|
+
get typeDefinitionId() {
|
|
37
|
+
return this._typeDefinitionId;
|
|
38
|
+
}
|
|
35
39
|
get value() {
|
|
36
40
|
return (this._dataValue && this._dataValue.statusCode.isGood()) ? this._dataValue.value : null;
|
|
37
41
|
}
|
|
@@ -41,8 +45,11 @@ class UaVariable extends _1.UaInstanceNode {
|
|
|
41
45
|
set dataValue(value) {
|
|
42
46
|
this._dataValue = value;
|
|
43
47
|
}
|
|
44
|
-
get
|
|
45
|
-
return this.
|
|
48
|
+
get isProperty() {
|
|
49
|
+
return this._isProperty;
|
|
50
|
+
}
|
|
51
|
+
set isProperty(value) {
|
|
52
|
+
this._isProperty = value;
|
|
46
53
|
}
|
|
47
54
|
addMember(node) {
|
|
48
55
|
this._children.push(node);
|
|
@@ -55,11 +62,11 @@ class UaVariable extends _1.UaInstanceNode {
|
|
|
55
62
|
return ret;
|
|
56
63
|
}
|
|
57
64
|
toJson() {
|
|
58
|
-
let
|
|
65
|
+
let members = [];
|
|
59
66
|
for (let item of this._children) {
|
|
60
67
|
if (item.nodeClass != opcua_webapi_1.NodeClass.Variable)
|
|
61
68
|
continue;
|
|
62
|
-
|
|
69
|
+
members.push(item.toJson());
|
|
63
70
|
}
|
|
64
71
|
let ret = {
|
|
65
72
|
nodeId: this._nodeId.toString(),
|
|
@@ -68,11 +75,11 @@ class UaVariable extends _1.UaInstanceNode {
|
|
|
68
75
|
displayName: this._displayName.text,
|
|
69
76
|
typeDefinitionId: this._typeDefinitionId.toString(),
|
|
70
77
|
dataType: this._dataType.toString(),
|
|
71
|
-
valueRank: this._valueRank,
|
|
78
|
+
valueRank: (this._valueRank != 0) ? this._valueRank : undefined,
|
|
72
79
|
accessLevel: this._accessLevel,
|
|
73
|
-
historizing: this._historizing,
|
|
80
|
+
historizing: (this._historizing) ? true : undefined,
|
|
74
81
|
value: this._dataValue ? this._dataValue.value.value : undefined,
|
|
75
|
-
|
|
82
|
+
members: (members.length != 0) ? members : undefined
|
|
76
83
|
};
|
|
77
84
|
return ret;
|
|
78
85
|
}
|