node-opcua-data-model 2.73.1 → 2.76.0
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/LICENSE +3 -1
- package/dist/BrowseDirection.d.ts +18 -18
- package/dist/BrowseDirection.js +36 -36
- package/dist/_make_flag.d.ts +1 -1
- package/dist/_make_flag.js +25 -25
- package/dist/access_level.d.ts +24 -24
- package/dist/access_level.js +85 -85
- package/dist/access_level_ex.d.ts +34 -34
- package/dist/access_level_ex.js +82 -82
- package/dist/access_restrictions.d.ts +9 -9
- package/dist/access_restrictions.js +36 -36
- package/dist/attributeIds.d.ts +1 -1
- package/dist/attributeIds.js +7 -7
- package/dist/data_encoding.d.ts +6 -6
- package/dist/data_encoding.js +21 -21
- package/dist/diagnostic_info.d.ts +69 -69
- package/dist/diagnostic_info.js +327 -327
- package/dist/index.d.ts +17 -17
- package/dist/index.js +33 -33
- package/dist/localized_text.d.ts +24 -24
- package/dist/localized_text.js +151 -151
- package/dist/node_class_mask.d.ts +14 -14
- package/dist/node_class_mask.js +44 -44
- package/dist/nodeclass.d.ts +16 -16
- package/dist/nodeclass.js +25 -25
- package/dist/permission_flag.d.ts +112 -112
- package/dist/permission_flag.js +162 -162
- package/dist/qualified_name.d.ts +45 -45
- package/dist/qualified_name.js +136 -136
- package/dist/result_mask.d.ts +18 -18
- package/dist/result_mask.js +30 -30
- package/dist/time_zone.d.ts +3 -3
- package/dist/time_zone.js +18 -18
- package/dist/write_mask.d.ts +31 -31
- package/dist/write_mask.js +40 -40
- package/package.json +11 -13
package/dist/nodeclass.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.schemaEnumNodeClass = exports.NodeClass = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* @module node-opcua-data-model
|
|
6
|
-
*/
|
|
7
|
-
const node_opcua_factory_1 = require("node-opcua-factory");
|
|
8
|
-
var NodeClass;
|
|
9
|
-
(function (NodeClass) {
|
|
10
|
-
NodeClass[NodeClass["Unspecified"] = 0] = "Unspecified";
|
|
11
|
-
NodeClass[NodeClass["Object"] = 1] = "Object";
|
|
12
|
-
NodeClass[NodeClass["Variable"] = 2] = "Variable";
|
|
13
|
-
NodeClass[NodeClass["Method"] = 4] = "Method";
|
|
14
|
-
NodeClass[NodeClass["ObjectType"] = 8] = "ObjectType";
|
|
15
|
-
NodeClass[NodeClass["VariableType"] = 16] = "VariableType";
|
|
16
|
-
NodeClass[NodeClass["ReferenceType"] = 32] = "ReferenceType";
|
|
17
|
-
NodeClass[NodeClass["DataType"] = 64] = "DataType";
|
|
18
|
-
NodeClass[NodeClass["View"] = 128] = "View"; // The node is a view.
|
|
19
|
-
})(NodeClass = exports.NodeClass || (exports.NodeClass = {}));
|
|
20
|
-
exports.schemaEnumNodeClass = {
|
|
21
|
-
name: "NodeClass",
|
|
22
|
-
documentation: "A mask specifying the class of the node.",
|
|
23
|
-
enumValues: NodeClass
|
|
24
|
-
};
|
|
25
|
-
(0, node_opcua_factory_1.registerEnumeration)(exports.schemaEnumNodeClass);
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.schemaEnumNodeClass = exports.NodeClass = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* @module node-opcua-data-model
|
|
6
|
+
*/
|
|
7
|
+
const node_opcua_factory_1 = require("node-opcua-factory");
|
|
8
|
+
var NodeClass;
|
|
9
|
+
(function (NodeClass) {
|
|
10
|
+
NodeClass[NodeClass["Unspecified"] = 0] = "Unspecified";
|
|
11
|
+
NodeClass[NodeClass["Object"] = 1] = "Object";
|
|
12
|
+
NodeClass[NodeClass["Variable"] = 2] = "Variable";
|
|
13
|
+
NodeClass[NodeClass["Method"] = 4] = "Method";
|
|
14
|
+
NodeClass[NodeClass["ObjectType"] = 8] = "ObjectType";
|
|
15
|
+
NodeClass[NodeClass["VariableType"] = 16] = "VariableType";
|
|
16
|
+
NodeClass[NodeClass["ReferenceType"] = 32] = "ReferenceType";
|
|
17
|
+
NodeClass[NodeClass["DataType"] = 64] = "DataType";
|
|
18
|
+
NodeClass[NodeClass["View"] = 128] = "View"; // The node is a view.
|
|
19
|
+
})(NodeClass = exports.NodeClass || (exports.NodeClass = {}));
|
|
20
|
+
exports.schemaEnumNodeClass = {
|
|
21
|
+
name: "NodeClass",
|
|
22
|
+
documentation: "A mask specifying the class of the node.",
|
|
23
|
+
enumValues: NodeClass
|
|
24
|
+
};
|
|
25
|
+
(0, node_opcua_factory_1.registerEnumeration)(exports.schemaEnumNodeClass);
|
|
26
26
|
//# sourceMappingURL=nodeclass.js.map
|
|
@@ -1,112 +1,112 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* https://reference.opcfoundation.org/v104/Core/docs/Part3/8.55/
|
|
3
|
-
*/
|
|
4
|
-
export declare enum PermissionFlag {
|
|
5
|
-
None = 0,
|
|
6
|
-
/**
|
|
7
|
-
* The Client is allowed to see the references to and from the Node.
|
|
8
|
-
* This implies that the Client is able to Read to Attributes other than the Value or the RolePermissions Attribute.
|
|
9
|
-
* This Permission is valid for all NodeClasses.
|
|
10
|
-
*/
|
|
11
|
-
Browse = 1,
|
|
12
|
-
/**
|
|
13
|
-
* The Client is allowed to read the RolePermissions Attribute.
|
|
14
|
-
* This Permission is valid for all NodeClasses.
|
|
15
|
-
*/
|
|
16
|
-
ReadRolePermissions = 2,
|
|
17
|
-
/**
|
|
18
|
-
* The Client is allowed to write to Attributes other than the Value,
|
|
19
|
-
* Historizing or RolePermissions Attribute if the WriteMask indicates that
|
|
20
|
-
* the Attribute is writeable.
|
|
21
|
-
* This bit affects the value of a UserWriteMask Attribute.
|
|
22
|
-
* This Permission is valid for all NodeClasses.
|
|
23
|
-
*/
|
|
24
|
-
WriteAttribute = 4,
|
|
25
|
-
/**
|
|
26
|
-
* The Client is allowed to write to the RolePermissions Attribute if the WriteMask
|
|
27
|
-
* indicates that the Attribute is writeable.
|
|
28
|
-
* This bit affects the value of the UserWriteMask Attribute.
|
|
29
|
-
* This Permission is valid for all NodeClasses.
|
|
30
|
-
*/
|
|
31
|
-
WriteRolePermissions = 8,
|
|
32
|
-
/**
|
|
33
|
-
* The Client is allowed to write to the Historizing Attributes if the WriteMask indicates that the Attribute is writeable.
|
|
34
|
-
* This bit affects the value of the UserWriteMask Attribute.
|
|
35
|
-
* This Permission is only valid for Variables.
|
|
36
|
-
*/
|
|
37
|
-
WriteHistorizing = 16,
|
|
38
|
-
/**
|
|
39
|
-
* The Client is allowed to read the Value Attribute.
|
|
40
|
-
* This bit affects the CurrentRead bit of the UserAccessLevel Attribute.
|
|
41
|
-
* This Permission is only valid for Variables.
|
|
42
|
-
*/
|
|
43
|
-
Read = 32,
|
|
44
|
-
/**
|
|
45
|
-
* The Client is allowed to write the Value Attribute.
|
|
46
|
-
* This bit affects the CurrentWrite bit of the UserAccessLevel Attribute.
|
|
47
|
-
* This Permission is only valid for Variables.
|
|
48
|
-
*/
|
|
49
|
-
Write = 64,
|
|
50
|
-
/**
|
|
51
|
-
* The Client is allowed to read the history associated with a Node.
|
|
52
|
-
* This bit affects the HistoryRead bit of the UserAccessLevel Attribute.
|
|
53
|
-
* This Permission is only valid for Variables, Objects or Views.
|
|
54
|
-
*/
|
|
55
|
-
ReadHistory = 128,
|
|
56
|
-
/**
|
|
57
|
-
* The Client is allowed to insert the history associated with a Node.
|
|
58
|
-
* This bit affects the HistoryWrite bit of the UserAccessLevel Attribute.
|
|
59
|
-
* This Permission is only valid for Variables, Objects or Views.
|
|
60
|
-
*/
|
|
61
|
-
InsertHistory = 256,
|
|
62
|
-
/**
|
|
63
|
-
* The Client is allowed to modify the history associated with a Node.
|
|
64
|
-
* This bit affects the HistoryWrite bit of the UserAccessLevel Attribute.
|
|
65
|
-
* This Permission is only valid for Variables, Objects or Views.
|
|
66
|
-
*/
|
|
67
|
-
ModifyHistory = 512,
|
|
68
|
-
/**
|
|
69
|
-
* The Client is allowed to delete the history associated with a Node.
|
|
70
|
-
* This bit affects the HistoryWrite bit of the UserAccessLevel Attribute.
|
|
71
|
-
* This Permission is only valid for Variables, Objects or Views.
|
|
72
|
-
*/
|
|
73
|
-
DeleteHistory = 1024,
|
|
74
|
-
/**
|
|
75
|
-
* A Client only receives an Event if this bit is set on the Node identified
|
|
76
|
-
* by the EventTypeId field and on the Node identified by the SourceNode field.
|
|
77
|
-
* This Permission is only valid for EventType Nodes or SourceNodes.
|
|
78
|
-
*/
|
|
79
|
-
ReceiveEvents = 2048,
|
|
80
|
-
/**
|
|
81
|
-
* The Client is allowed to call the Method if this bit is set on the Object or
|
|
82
|
-
* ObjectType Node passed in the Call request and the Method Instance associated
|
|
83
|
-
* with that Object or ObjectType.
|
|
84
|
-
* This bit affects the UserExecutable Attribute when set on Method Node.
|
|
85
|
-
* This Permission is only valid for Objects, ObjectType or Methods.
|
|
86
|
-
*/
|
|
87
|
-
Call = 4096,
|
|
88
|
-
/**
|
|
89
|
-
* The Client is allowed to add references to the Node.
|
|
90
|
-
* This Permission is valid for all NodeClasses.
|
|
91
|
-
*/
|
|
92
|
-
AddReference = 8192,
|
|
93
|
-
/**
|
|
94
|
-
* The Client is allowed to remove references from the Node.
|
|
95
|
-
* This Permission is valid for all NodeClasses.
|
|
96
|
-
*/
|
|
97
|
-
RemoveReference = 16384,
|
|
98
|
-
/**
|
|
99
|
-
* The Client is allowed to delete the Node.
|
|
100
|
-
* This Permission is valid for all NodeClasses.
|
|
101
|
-
*/
|
|
102
|
-
DeleteNode = 32768,
|
|
103
|
-
/**
|
|
104
|
-
* The Client is allowed to add Nodes to the Namespace.
|
|
105
|
-
* This Permission is only used in the DefaultRolePermissions and
|
|
106
|
-
* DefaultUserRolePermissions Properties of a NamespaceMetadata Object
|
|
107
|
-
*/
|
|
108
|
-
AddNode = 65536
|
|
109
|
-
}
|
|
110
|
-
export declare const allPermissions: number;
|
|
111
|
-
export declare function makePermissionFlag(str: string | number | null): number;
|
|
112
|
-
export declare function permissionFlagToString(permissionFlag: PermissionFlag): string;
|
|
1
|
+
/**
|
|
2
|
+
* https://reference.opcfoundation.org/v104/Core/docs/Part3/8.55/
|
|
3
|
+
*/
|
|
4
|
+
export declare enum PermissionFlag {
|
|
5
|
+
None = 0,
|
|
6
|
+
/**
|
|
7
|
+
* The Client is allowed to see the references to and from the Node.
|
|
8
|
+
* This implies that the Client is able to Read to Attributes other than the Value or the RolePermissions Attribute.
|
|
9
|
+
* This Permission is valid for all NodeClasses.
|
|
10
|
+
*/
|
|
11
|
+
Browse = 1,
|
|
12
|
+
/**
|
|
13
|
+
* The Client is allowed to read the RolePermissions Attribute.
|
|
14
|
+
* This Permission is valid for all NodeClasses.
|
|
15
|
+
*/
|
|
16
|
+
ReadRolePermissions = 2,
|
|
17
|
+
/**
|
|
18
|
+
* The Client is allowed to write to Attributes other than the Value,
|
|
19
|
+
* Historizing or RolePermissions Attribute if the WriteMask indicates that
|
|
20
|
+
* the Attribute is writeable.
|
|
21
|
+
* This bit affects the value of a UserWriteMask Attribute.
|
|
22
|
+
* This Permission is valid for all NodeClasses.
|
|
23
|
+
*/
|
|
24
|
+
WriteAttribute = 4,
|
|
25
|
+
/**
|
|
26
|
+
* The Client is allowed to write to the RolePermissions Attribute if the WriteMask
|
|
27
|
+
* indicates that the Attribute is writeable.
|
|
28
|
+
* This bit affects the value of the UserWriteMask Attribute.
|
|
29
|
+
* This Permission is valid for all NodeClasses.
|
|
30
|
+
*/
|
|
31
|
+
WriteRolePermissions = 8,
|
|
32
|
+
/**
|
|
33
|
+
* The Client is allowed to write to the Historizing Attributes if the WriteMask indicates that the Attribute is writeable.
|
|
34
|
+
* This bit affects the value of the UserWriteMask Attribute.
|
|
35
|
+
* This Permission is only valid for Variables.
|
|
36
|
+
*/
|
|
37
|
+
WriteHistorizing = 16,
|
|
38
|
+
/**
|
|
39
|
+
* The Client is allowed to read the Value Attribute.
|
|
40
|
+
* This bit affects the CurrentRead bit of the UserAccessLevel Attribute.
|
|
41
|
+
* This Permission is only valid for Variables.
|
|
42
|
+
*/
|
|
43
|
+
Read = 32,
|
|
44
|
+
/**
|
|
45
|
+
* The Client is allowed to write the Value Attribute.
|
|
46
|
+
* This bit affects the CurrentWrite bit of the UserAccessLevel Attribute.
|
|
47
|
+
* This Permission is only valid for Variables.
|
|
48
|
+
*/
|
|
49
|
+
Write = 64,
|
|
50
|
+
/**
|
|
51
|
+
* The Client is allowed to read the history associated with a Node.
|
|
52
|
+
* This bit affects the HistoryRead bit of the UserAccessLevel Attribute.
|
|
53
|
+
* This Permission is only valid for Variables, Objects or Views.
|
|
54
|
+
*/
|
|
55
|
+
ReadHistory = 128,
|
|
56
|
+
/**
|
|
57
|
+
* The Client is allowed to insert the history associated with a Node.
|
|
58
|
+
* This bit affects the HistoryWrite bit of the UserAccessLevel Attribute.
|
|
59
|
+
* This Permission is only valid for Variables, Objects or Views.
|
|
60
|
+
*/
|
|
61
|
+
InsertHistory = 256,
|
|
62
|
+
/**
|
|
63
|
+
* The Client is allowed to modify the history associated with a Node.
|
|
64
|
+
* This bit affects the HistoryWrite bit of the UserAccessLevel Attribute.
|
|
65
|
+
* This Permission is only valid for Variables, Objects or Views.
|
|
66
|
+
*/
|
|
67
|
+
ModifyHistory = 512,
|
|
68
|
+
/**
|
|
69
|
+
* The Client is allowed to delete the history associated with a Node.
|
|
70
|
+
* This bit affects the HistoryWrite bit of the UserAccessLevel Attribute.
|
|
71
|
+
* This Permission is only valid for Variables, Objects or Views.
|
|
72
|
+
*/
|
|
73
|
+
DeleteHistory = 1024,
|
|
74
|
+
/**
|
|
75
|
+
* A Client only receives an Event if this bit is set on the Node identified
|
|
76
|
+
* by the EventTypeId field and on the Node identified by the SourceNode field.
|
|
77
|
+
* This Permission is only valid for EventType Nodes or SourceNodes.
|
|
78
|
+
*/
|
|
79
|
+
ReceiveEvents = 2048,
|
|
80
|
+
/**
|
|
81
|
+
* The Client is allowed to call the Method if this bit is set on the Object or
|
|
82
|
+
* ObjectType Node passed in the Call request and the Method Instance associated
|
|
83
|
+
* with that Object or ObjectType.
|
|
84
|
+
* This bit affects the UserExecutable Attribute when set on Method Node.
|
|
85
|
+
* This Permission is only valid for Objects, ObjectType or Methods.
|
|
86
|
+
*/
|
|
87
|
+
Call = 4096,
|
|
88
|
+
/**
|
|
89
|
+
* The Client is allowed to add references to the Node.
|
|
90
|
+
* This Permission is valid for all NodeClasses.
|
|
91
|
+
*/
|
|
92
|
+
AddReference = 8192,
|
|
93
|
+
/**
|
|
94
|
+
* The Client is allowed to remove references from the Node.
|
|
95
|
+
* This Permission is valid for all NodeClasses.
|
|
96
|
+
*/
|
|
97
|
+
RemoveReference = 16384,
|
|
98
|
+
/**
|
|
99
|
+
* The Client is allowed to delete the Node.
|
|
100
|
+
* This Permission is valid for all NodeClasses.
|
|
101
|
+
*/
|
|
102
|
+
DeleteNode = 32768,
|
|
103
|
+
/**
|
|
104
|
+
* The Client is allowed to add Nodes to the Namespace.
|
|
105
|
+
* This Permission is only used in the DefaultRolePermissions and
|
|
106
|
+
* DefaultUserRolePermissions Properties of a NamespaceMetadata Object
|
|
107
|
+
*/
|
|
108
|
+
AddNode = 65536
|
|
109
|
+
}
|
|
110
|
+
export declare const allPermissions: number;
|
|
111
|
+
export declare function makePermissionFlag(str: string | number | null): number;
|
|
112
|
+
export declare function permissionFlagToString(permissionFlag: PermissionFlag): string;
|
package/dist/permission_flag.js
CHANGED
|
@@ -1,163 +1,163 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.permissionFlagToString = exports.makePermissionFlag = exports.allPermissions = exports.PermissionFlag = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* @module node-opcua-data-model
|
|
6
|
-
*/
|
|
7
|
-
const _make_flag_1 = require("./_make_flag");
|
|
8
|
-
/**
|
|
9
|
-
* https://reference.opcfoundation.org/v104/Core/docs/Part3/8.55/
|
|
10
|
-
*/
|
|
11
|
-
// same as PermissionType in node-opcua-types
|
|
12
|
-
var PermissionFlag;
|
|
13
|
-
(function (PermissionFlag) {
|
|
14
|
-
PermissionFlag[PermissionFlag["None"] = 0] = "None";
|
|
15
|
-
/**
|
|
16
|
-
* The Client is allowed to see the references to and from the Node.
|
|
17
|
-
* This implies that the Client is able to Read to Attributes other than the Value or the RolePermissions Attribute.
|
|
18
|
-
* This Permission is valid for all NodeClasses.
|
|
19
|
-
*/
|
|
20
|
-
PermissionFlag[PermissionFlag["Browse"] = 1] = "Browse";
|
|
21
|
-
/**
|
|
22
|
-
* The Client is allowed to read the RolePermissions Attribute.
|
|
23
|
-
* This Permission is valid for all NodeClasses.
|
|
24
|
-
*/
|
|
25
|
-
PermissionFlag[PermissionFlag["ReadRolePermissions"] = 2] = "ReadRolePermissions";
|
|
26
|
-
/**
|
|
27
|
-
* The Client is allowed to write to Attributes other than the Value,
|
|
28
|
-
* Historizing or RolePermissions Attribute if the WriteMask indicates that
|
|
29
|
-
* the Attribute is writeable.
|
|
30
|
-
* This bit affects the value of a UserWriteMask Attribute.
|
|
31
|
-
* This Permission is valid for all NodeClasses.
|
|
32
|
-
*/
|
|
33
|
-
PermissionFlag[PermissionFlag["WriteAttribute"] = 4] = "WriteAttribute";
|
|
34
|
-
/**
|
|
35
|
-
* The Client is allowed to write to the RolePermissions Attribute if the WriteMask
|
|
36
|
-
* indicates that the Attribute is writeable.
|
|
37
|
-
* This bit affects the value of the UserWriteMask Attribute.
|
|
38
|
-
* This Permission is valid for all NodeClasses.
|
|
39
|
-
*/
|
|
40
|
-
PermissionFlag[PermissionFlag["WriteRolePermissions"] = 8] = "WriteRolePermissions";
|
|
41
|
-
/**
|
|
42
|
-
* The Client is allowed to write to the Historizing Attributes if the WriteMask indicates that the Attribute is writeable.
|
|
43
|
-
* This bit affects the value of the UserWriteMask Attribute.
|
|
44
|
-
* This Permission is only valid for Variables.
|
|
45
|
-
*/
|
|
46
|
-
PermissionFlag[PermissionFlag["WriteHistorizing"] = 16] = "WriteHistorizing";
|
|
47
|
-
/**
|
|
48
|
-
* The Client is allowed to read the Value Attribute.
|
|
49
|
-
* This bit affects the CurrentRead bit of the UserAccessLevel Attribute.
|
|
50
|
-
* This Permission is only valid for Variables.
|
|
51
|
-
*/
|
|
52
|
-
PermissionFlag[PermissionFlag["Read"] = 32] = "Read";
|
|
53
|
-
/**
|
|
54
|
-
* The Client is allowed to write the Value Attribute.
|
|
55
|
-
* This bit affects the CurrentWrite bit of the UserAccessLevel Attribute.
|
|
56
|
-
* This Permission is only valid for Variables.
|
|
57
|
-
*/
|
|
58
|
-
PermissionFlag[PermissionFlag["Write"] = 64] = "Write";
|
|
59
|
-
/**
|
|
60
|
-
* The Client is allowed to read the history associated with a Node.
|
|
61
|
-
* This bit affects the HistoryRead bit of the UserAccessLevel Attribute.
|
|
62
|
-
* This Permission is only valid for Variables, Objects or Views.
|
|
63
|
-
*/
|
|
64
|
-
PermissionFlag[PermissionFlag["ReadHistory"] = 128] = "ReadHistory";
|
|
65
|
-
/**
|
|
66
|
-
* The Client is allowed to insert the history associated with a Node.
|
|
67
|
-
* This bit affects the HistoryWrite bit of the UserAccessLevel Attribute.
|
|
68
|
-
* This Permission is only valid for Variables, Objects or Views.
|
|
69
|
-
*/
|
|
70
|
-
PermissionFlag[PermissionFlag["InsertHistory"] = 256] = "InsertHistory";
|
|
71
|
-
/**
|
|
72
|
-
* The Client is allowed to modify the history associated with a Node.
|
|
73
|
-
* This bit affects the HistoryWrite bit of the UserAccessLevel Attribute.
|
|
74
|
-
* This Permission is only valid for Variables, Objects or Views.
|
|
75
|
-
*/
|
|
76
|
-
PermissionFlag[PermissionFlag["ModifyHistory"] = 512] = "ModifyHistory";
|
|
77
|
-
/**
|
|
78
|
-
* The Client is allowed to delete the history associated with a Node.
|
|
79
|
-
* This bit affects the HistoryWrite bit of the UserAccessLevel Attribute.
|
|
80
|
-
* This Permission is only valid for Variables, Objects or Views.
|
|
81
|
-
*/
|
|
82
|
-
PermissionFlag[PermissionFlag["DeleteHistory"] = 1024] = "DeleteHistory";
|
|
83
|
-
/**
|
|
84
|
-
* A Client only receives an Event if this bit is set on the Node identified
|
|
85
|
-
* by the EventTypeId field and on the Node identified by the SourceNode field.
|
|
86
|
-
* This Permission is only valid for EventType Nodes or SourceNodes.
|
|
87
|
-
*/
|
|
88
|
-
PermissionFlag[PermissionFlag["ReceiveEvents"] = 2048] = "ReceiveEvents";
|
|
89
|
-
/**
|
|
90
|
-
* The Client is allowed to call the Method if this bit is set on the Object or
|
|
91
|
-
* ObjectType Node passed in the Call request and the Method Instance associated
|
|
92
|
-
* with that Object or ObjectType.
|
|
93
|
-
* This bit affects the UserExecutable Attribute when set on Method Node.
|
|
94
|
-
* This Permission is only valid for Objects, ObjectType or Methods.
|
|
95
|
-
*/
|
|
96
|
-
PermissionFlag[PermissionFlag["Call"] = 4096] = "Call";
|
|
97
|
-
/**
|
|
98
|
-
* The Client is allowed to add references to the Node.
|
|
99
|
-
* This Permission is valid for all NodeClasses.
|
|
100
|
-
*/
|
|
101
|
-
PermissionFlag[PermissionFlag["AddReference"] = 8192] = "AddReference";
|
|
102
|
-
/**
|
|
103
|
-
* The Client is allowed to remove references from the Node.
|
|
104
|
-
* This Permission is valid for all NodeClasses.
|
|
105
|
-
*/
|
|
106
|
-
PermissionFlag[PermissionFlag["RemoveReference"] = 16384] = "RemoveReference";
|
|
107
|
-
/**
|
|
108
|
-
* The Client is allowed to delete the Node.
|
|
109
|
-
* This Permission is valid for all NodeClasses.
|
|
110
|
-
*/
|
|
111
|
-
PermissionFlag[PermissionFlag["DeleteNode"] = 32768] = "DeleteNode";
|
|
112
|
-
/**
|
|
113
|
-
* The Client is allowed to add Nodes to the Namespace.
|
|
114
|
-
* This Permission is only used in the DefaultRolePermissions and
|
|
115
|
-
* DefaultUserRolePermissions Properties of a NamespaceMetadata Object
|
|
116
|
-
*/
|
|
117
|
-
PermissionFlag[PermissionFlag["AddNode"] = 65536] = "AddNode";
|
|
118
|
-
})(PermissionFlag = exports.PermissionFlag || (exports.PermissionFlag = {}));
|
|
119
|
-
exports.allPermissions = PermissionFlag.Browse |
|
|
120
|
-
PermissionFlag.Browse |
|
|
121
|
-
PermissionFlag.ReadRolePermissions |
|
|
122
|
-
PermissionFlag.WriteAttribute |
|
|
123
|
-
PermissionFlag.WriteRolePermissions |
|
|
124
|
-
PermissionFlag.WriteHistorizing |
|
|
125
|
-
PermissionFlag.Read |
|
|
126
|
-
PermissionFlag.Write |
|
|
127
|
-
PermissionFlag.ReadHistory |
|
|
128
|
-
PermissionFlag.InsertHistory |
|
|
129
|
-
PermissionFlag.ModifyHistory |
|
|
130
|
-
PermissionFlag.DeleteHistory |
|
|
131
|
-
PermissionFlag.ReceiveEvents |
|
|
132
|
-
PermissionFlag.Call |
|
|
133
|
-
PermissionFlag.AddReference |
|
|
134
|
-
PermissionFlag.RemoveReference |
|
|
135
|
-
PermissionFlag.DeleteNode |
|
|
136
|
-
PermissionFlag.AddNode;
|
|
137
|
-
// @example
|
|
138
|
-
// makePermissionFlag("ReceiveEvents | RemoveReference");
|
|
139
|
-
function makePermissionFlag(str) {
|
|
140
|
-
if (str === "All") {
|
|
141
|
-
return exports.allPermissions;
|
|
142
|
-
}
|
|
143
|
-
return (0, _make_flag_1._make_flag)(str, PermissionFlag.None, PermissionFlag);
|
|
144
|
-
}
|
|
145
|
-
exports.makePermissionFlag = makePermissionFlag;
|
|
146
|
-
function permissionFlagToString(permissionFlag) {
|
|
147
|
-
const retVal = [];
|
|
148
|
-
for (const [key, value] of Object.entries(PermissionFlag)) {
|
|
149
|
-
const numKey = parseInt(key, 10);
|
|
150
|
-
if (numKey.toString() !== key || numKey === 0) {
|
|
151
|
-
continue;
|
|
152
|
-
}
|
|
153
|
-
if ((permissionFlag & numKey) === numKey) {
|
|
154
|
-
retVal.push(value);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
if (retVal.length === 0) {
|
|
158
|
-
retVal.push("None");
|
|
159
|
-
}
|
|
160
|
-
return retVal.join(" | ");
|
|
161
|
-
}
|
|
162
|
-
exports.permissionFlagToString = permissionFlagToString;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.permissionFlagToString = exports.makePermissionFlag = exports.allPermissions = exports.PermissionFlag = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* @module node-opcua-data-model
|
|
6
|
+
*/
|
|
7
|
+
const _make_flag_1 = require("./_make_flag");
|
|
8
|
+
/**
|
|
9
|
+
* https://reference.opcfoundation.org/v104/Core/docs/Part3/8.55/
|
|
10
|
+
*/
|
|
11
|
+
// same as PermissionType in node-opcua-types
|
|
12
|
+
var PermissionFlag;
|
|
13
|
+
(function (PermissionFlag) {
|
|
14
|
+
PermissionFlag[PermissionFlag["None"] = 0] = "None";
|
|
15
|
+
/**
|
|
16
|
+
* The Client is allowed to see the references to and from the Node.
|
|
17
|
+
* This implies that the Client is able to Read to Attributes other than the Value or the RolePermissions Attribute.
|
|
18
|
+
* This Permission is valid for all NodeClasses.
|
|
19
|
+
*/
|
|
20
|
+
PermissionFlag[PermissionFlag["Browse"] = 1] = "Browse";
|
|
21
|
+
/**
|
|
22
|
+
* The Client is allowed to read the RolePermissions Attribute.
|
|
23
|
+
* This Permission is valid for all NodeClasses.
|
|
24
|
+
*/
|
|
25
|
+
PermissionFlag[PermissionFlag["ReadRolePermissions"] = 2] = "ReadRolePermissions";
|
|
26
|
+
/**
|
|
27
|
+
* The Client is allowed to write to Attributes other than the Value,
|
|
28
|
+
* Historizing or RolePermissions Attribute if the WriteMask indicates that
|
|
29
|
+
* the Attribute is writeable.
|
|
30
|
+
* This bit affects the value of a UserWriteMask Attribute.
|
|
31
|
+
* This Permission is valid for all NodeClasses.
|
|
32
|
+
*/
|
|
33
|
+
PermissionFlag[PermissionFlag["WriteAttribute"] = 4] = "WriteAttribute";
|
|
34
|
+
/**
|
|
35
|
+
* The Client is allowed to write to the RolePermissions Attribute if the WriteMask
|
|
36
|
+
* indicates that the Attribute is writeable.
|
|
37
|
+
* This bit affects the value of the UserWriteMask Attribute.
|
|
38
|
+
* This Permission is valid for all NodeClasses.
|
|
39
|
+
*/
|
|
40
|
+
PermissionFlag[PermissionFlag["WriteRolePermissions"] = 8] = "WriteRolePermissions";
|
|
41
|
+
/**
|
|
42
|
+
* The Client is allowed to write to the Historizing Attributes if the WriteMask indicates that the Attribute is writeable.
|
|
43
|
+
* This bit affects the value of the UserWriteMask Attribute.
|
|
44
|
+
* This Permission is only valid for Variables.
|
|
45
|
+
*/
|
|
46
|
+
PermissionFlag[PermissionFlag["WriteHistorizing"] = 16] = "WriteHistorizing";
|
|
47
|
+
/**
|
|
48
|
+
* The Client is allowed to read the Value Attribute.
|
|
49
|
+
* This bit affects the CurrentRead bit of the UserAccessLevel Attribute.
|
|
50
|
+
* This Permission is only valid for Variables.
|
|
51
|
+
*/
|
|
52
|
+
PermissionFlag[PermissionFlag["Read"] = 32] = "Read";
|
|
53
|
+
/**
|
|
54
|
+
* The Client is allowed to write the Value Attribute.
|
|
55
|
+
* This bit affects the CurrentWrite bit of the UserAccessLevel Attribute.
|
|
56
|
+
* This Permission is only valid for Variables.
|
|
57
|
+
*/
|
|
58
|
+
PermissionFlag[PermissionFlag["Write"] = 64] = "Write";
|
|
59
|
+
/**
|
|
60
|
+
* The Client is allowed to read the history associated with a Node.
|
|
61
|
+
* This bit affects the HistoryRead bit of the UserAccessLevel Attribute.
|
|
62
|
+
* This Permission is only valid for Variables, Objects or Views.
|
|
63
|
+
*/
|
|
64
|
+
PermissionFlag[PermissionFlag["ReadHistory"] = 128] = "ReadHistory";
|
|
65
|
+
/**
|
|
66
|
+
* The Client is allowed to insert the history associated with a Node.
|
|
67
|
+
* This bit affects the HistoryWrite bit of the UserAccessLevel Attribute.
|
|
68
|
+
* This Permission is only valid for Variables, Objects or Views.
|
|
69
|
+
*/
|
|
70
|
+
PermissionFlag[PermissionFlag["InsertHistory"] = 256] = "InsertHistory";
|
|
71
|
+
/**
|
|
72
|
+
* The Client is allowed to modify the history associated with a Node.
|
|
73
|
+
* This bit affects the HistoryWrite bit of the UserAccessLevel Attribute.
|
|
74
|
+
* This Permission is only valid for Variables, Objects or Views.
|
|
75
|
+
*/
|
|
76
|
+
PermissionFlag[PermissionFlag["ModifyHistory"] = 512] = "ModifyHistory";
|
|
77
|
+
/**
|
|
78
|
+
* The Client is allowed to delete the history associated with a Node.
|
|
79
|
+
* This bit affects the HistoryWrite bit of the UserAccessLevel Attribute.
|
|
80
|
+
* This Permission is only valid for Variables, Objects or Views.
|
|
81
|
+
*/
|
|
82
|
+
PermissionFlag[PermissionFlag["DeleteHistory"] = 1024] = "DeleteHistory";
|
|
83
|
+
/**
|
|
84
|
+
* A Client only receives an Event if this bit is set on the Node identified
|
|
85
|
+
* by the EventTypeId field and on the Node identified by the SourceNode field.
|
|
86
|
+
* This Permission is only valid for EventType Nodes or SourceNodes.
|
|
87
|
+
*/
|
|
88
|
+
PermissionFlag[PermissionFlag["ReceiveEvents"] = 2048] = "ReceiveEvents";
|
|
89
|
+
/**
|
|
90
|
+
* The Client is allowed to call the Method if this bit is set on the Object or
|
|
91
|
+
* ObjectType Node passed in the Call request and the Method Instance associated
|
|
92
|
+
* with that Object or ObjectType.
|
|
93
|
+
* This bit affects the UserExecutable Attribute when set on Method Node.
|
|
94
|
+
* This Permission is only valid for Objects, ObjectType or Methods.
|
|
95
|
+
*/
|
|
96
|
+
PermissionFlag[PermissionFlag["Call"] = 4096] = "Call";
|
|
97
|
+
/**
|
|
98
|
+
* The Client is allowed to add references to the Node.
|
|
99
|
+
* This Permission is valid for all NodeClasses.
|
|
100
|
+
*/
|
|
101
|
+
PermissionFlag[PermissionFlag["AddReference"] = 8192] = "AddReference";
|
|
102
|
+
/**
|
|
103
|
+
* The Client is allowed to remove references from the Node.
|
|
104
|
+
* This Permission is valid for all NodeClasses.
|
|
105
|
+
*/
|
|
106
|
+
PermissionFlag[PermissionFlag["RemoveReference"] = 16384] = "RemoveReference";
|
|
107
|
+
/**
|
|
108
|
+
* The Client is allowed to delete the Node.
|
|
109
|
+
* This Permission is valid for all NodeClasses.
|
|
110
|
+
*/
|
|
111
|
+
PermissionFlag[PermissionFlag["DeleteNode"] = 32768] = "DeleteNode";
|
|
112
|
+
/**
|
|
113
|
+
* The Client is allowed to add Nodes to the Namespace.
|
|
114
|
+
* This Permission is only used in the DefaultRolePermissions and
|
|
115
|
+
* DefaultUserRolePermissions Properties of a NamespaceMetadata Object
|
|
116
|
+
*/
|
|
117
|
+
PermissionFlag[PermissionFlag["AddNode"] = 65536] = "AddNode";
|
|
118
|
+
})(PermissionFlag = exports.PermissionFlag || (exports.PermissionFlag = {}));
|
|
119
|
+
exports.allPermissions = PermissionFlag.Browse |
|
|
120
|
+
PermissionFlag.Browse |
|
|
121
|
+
PermissionFlag.ReadRolePermissions |
|
|
122
|
+
PermissionFlag.WriteAttribute |
|
|
123
|
+
PermissionFlag.WriteRolePermissions |
|
|
124
|
+
PermissionFlag.WriteHistorizing |
|
|
125
|
+
PermissionFlag.Read |
|
|
126
|
+
PermissionFlag.Write |
|
|
127
|
+
PermissionFlag.ReadHistory |
|
|
128
|
+
PermissionFlag.InsertHistory |
|
|
129
|
+
PermissionFlag.ModifyHistory |
|
|
130
|
+
PermissionFlag.DeleteHistory |
|
|
131
|
+
PermissionFlag.ReceiveEvents |
|
|
132
|
+
PermissionFlag.Call |
|
|
133
|
+
PermissionFlag.AddReference |
|
|
134
|
+
PermissionFlag.RemoveReference |
|
|
135
|
+
PermissionFlag.DeleteNode |
|
|
136
|
+
PermissionFlag.AddNode;
|
|
137
|
+
// @example
|
|
138
|
+
// makePermissionFlag("ReceiveEvents | RemoveReference");
|
|
139
|
+
function makePermissionFlag(str) {
|
|
140
|
+
if (str === "All") {
|
|
141
|
+
return exports.allPermissions;
|
|
142
|
+
}
|
|
143
|
+
return (0, _make_flag_1._make_flag)(str, PermissionFlag.None, PermissionFlag);
|
|
144
|
+
}
|
|
145
|
+
exports.makePermissionFlag = makePermissionFlag;
|
|
146
|
+
function permissionFlagToString(permissionFlag) {
|
|
147
|
+
const retVal = [];
|
|
148
|
+
for (const [key, value] of Object.entries(PermissionFlag)) {
|
|
149
|
+
const numKey = parseInt(key, 10);
|
|
150
|
+
if (numKey.toString() !== key || numKey === 0) {
|
|
151
|
+
continue;
|
|
152
|
+
}
|
|
153
|
+
if ((permissionFlag & numKey) === numKey) {
|
|
154
|
+
retVal.push(value);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
if (retVal.length === 0) {
|
|
158
|
+
retVal.push("None");
|
|
159
|
+
}
|
|
160
|
+
return retVal.join(" | ");
|
|
161
|
+
}
|
|
162
|
+
exports.permissionFlagToString = permissionFlagToString;
|
|
163
163
|
//# sourceMappingURL=permission_flag.js.map
|