node-opcua-data-model 2.97.0 → 2.98.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.
@@ -1,137 +1,137 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.decodeQualifiedName = exports.encodeQualifiedName = exports.coerceQualifiedName = exports.stringToQualifiedName = exports.QualifiedName = exports.schemaQualifiedName = void 0;
4
- /**
5
- * @module node-opcua-data-model
6
- */
7
- const node_opcua_assert_1 = require("node-opcua-assert");
8
- const node_opcua_factory_1 = require("node-opcua-factory");
9
- const node_opcua_nodeid_1 = require("node-opcua-nodeid");
10
- const node_opcua_basic_types_1 = require("node-opcua-basic-types");
11
- exports.schemaQualifiedName = (0, node_opcua_factory_1.buildStructuredType)({
12
- baseType: "BaseUAObject",
13
- name: "QualifiedName",
14
- fields: [
15
- {
16
- name: "namespaceIndex",
17
- fieldType: "UInt16"
18
- },
19
- {
20
- name: "name",
21
- fieldType: "String",
22
- defaultValue: null
23
- }
24
- ]
25
- });
26
- exports.schemaQualifiedName.coerce = coerceQualifiedName;
27
- class QualifiedName extends node_opcua_factory_1.BaseUAObject {
28
- constructor(options) {
29
- super();
30
- // for de-serialization
31
- if (options === null || options === undefined) {
32
- this.namespaceIndex = 0;
33
- this.name = null;
34
- return;
35
- }
36
- if (typeof options === "string") {
37
- options = { name: options };
38
- }
39
- /* istanbul ignore next */
40
- if (node_opcua_factory_1.parameters.debugSchemaHelper) {
41
- const schema = QualifiedName.schema;
42
- (0, node_opcua_factory_1.check_options_correctness_against_schema)(this, schema, options);
43
- }
44
- this.namespaceIndex = options.namespaceIndex || 0;
45
- this.name = options.name || null;
46
- }
47
- /**
48
- * encode the object into a binary stream
49
- */
50
- encode(stream) {
51
- super.encode(stream);
52
- (0, node_opcua_basic_types_1.encodeUInt16)(this.namespaceIndex, stream);
53
- (0, node_opcua_basic_types_1.encodeUAString)(this.name, stream);
54
- }
55
- /**
56
- * decode the object from a binary stream
57
- */
58
- decode(stream) {
59
- super.decode(stream);
60
- this.namespaceIndex = (0, node_opcua_basic_types_1.decodeUInt16)(stream);
61
- this.name = (0, node_opcua_basic_types_1.decodeUAString)(stream);
62
- }
63
- toString() {
64
- if (this.namespaceIndex) {
65
- return this.namespaceIndex + ":" + this.name;
66
- }
67
- return this.name || "<null>";
68
- }
69
- isEmpty() {
70
- return !this.name || this.name.length === 0;
71
- }
72
- }
73
- exports.QualifiedName = QualifiedName;
74
- QualifiedName.schema = exports.schemaQualifiedName;
75
- QualifiedName.possibleFields = ["namespaceIndex", "name"];
76
- QualifiedName.encodingDefaultBinary = (0, node_opcua_nodeid_1.makeExpandedNodeId)(0, 0);
77
- QualifiedName.encodingDefaultXml = (0, node_opcua_nodeid_1.makeExpandedNodeId)(0, 0);
78
- QualifiedName.prototype.schema = QualifiedName.schema;
79
- // xx QualifiedName.prototype.isEmpty = function (): boolean {
80
- // xx return !this.name || this.name.length === 0;
81
- // xx}
82
- function isInteger(value) {
83
- return typeof value === "number" && isFinite(value) && Math.floor(value) === value;
84
- }
85
- /**
86
- * @method stringToQualifiedName
87
- * @param value {String}
88
- * @return {{namespaceIndex: Number, name: String}}
89
- *
90
- * @example
91
- *
92
- * stringToQualifiedName("Hello") => {namespaceIndex: 0, name: "Hello"}
93
- * stringToQualifiedName("3:Hello") => {namespaceIndex: 3, name: "Hello"}
94
- */
95
- function stringToQualifiedName(value) {
96
- const splitArray = value.split(":");
97
- let namespaceIndex = 0;
98
- if (!isNaN(parseFloat(splitArray[0])) &&
99
- isFinite(parseInt(splitArray[0], 10)) &&
100
- isInteger(parseFloat(splitArray[0])) &&
101
- splitArray.length > 1) {
102
- namespaceIndex = parseInt(splitArray[0], 10);
103
- splitArray.shift();
104
- value = splitArray.join(":");
105
- }
106
- return new QualifiedName({ namespaceIndex, name: value });
107
- }
108
- exports.stringToQualifiedName = stringToQualifiedName;
109
- function coerceQualifiedName(value) {
110
- if (!value) {
111
- return null;
112
- }
113
- else if (value instanceof QualifiedName) {
114
- return value;
115
- }
116
- else if (typeof value === "string") {
117
- return stringToQualifiedName(value);
118
- }
119
- else {
120
- (0, node_opcua_assert_1.assert)(Object.prototype.hasOwnProperty.call(value, "namespaceIndex"));
121
- (0, node_opcua_assert_1.assert)(Object.prototype.hasOwnProperty.call(value, "name"));
122
- return new QualifiedName(value);
123
- }
124
- }
125
- exports.coerceQualifiedName = coerceQualifiedName;
126
- (0, node_opcua_factory_1.registerSpecialVariantEncoder)(QualifiedName);
127
- function encodeQualifiedName(value, stream) {
128
- value.encode(stream);
129
- }
130
- exports.encodeQualifiedName = encodeQualifiedName;
131
- function decodeQualifiedName(stream, value) {
132
- value = value || new QualifiedName(null);
133
- value.decode(stream);
134
- return value;
135
- }
136
- exports.decodeQualifiedName = decodeQualifiedName;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.decodeQualifiedName = exports.encodeQualifiedName = exports.coerceQualifiedName = exports.stringToQualifiedName = exports.QualifiedName = exports.schemaQualifiedName = void 0;
4
+ /**
5
+ * @module node-opcua-data-model
6
+ */
7
+ const node_opcua_assert_1 = require("node-opcua-assert");
8
+ const node_opcua_factory_1 = require("node-opcua-factory");
9
+ const node_opcua_nodeid_1 = require("node-opcua-nodeid");
10
+ const node_opcua_basic_types_1 = require("node-opcua-basic-types");
11
+ exports.schemaQualifiedName = (0, node_opcua_factory_1.buildStructuredType)({
12
+ baseType: "BaseUAObject",
13
+ name: "QualifiedName",
14
+ fields: [
15
+ {
16
+ name: "namespaceIndex",
17
+ fieldType: "UInt16"
18
+ },
19
+ {
20
+ name: "name",
21
+ fieldType: "String",
22
+ defaultValue: null
23
+ }
24
+ ]
25
+ });
26
+ exports.schemaQualifiedName.coerce = coerceQualifiedName;
27
+ class QualifiedName extends node_opcua_factory_1.BaseUAObject {
28
+ constructor(options) {
29
+ super();
30
+ // for de-serialization
31
+ if (options === null || options === undefined) {
32
+ this.namespaceIndex = 0;
33
+ this.name = null;
34
+ return;
35
+ }
36
+ if (typeof options === "string") {
37
+ options = { name: options };
38
+ }
39
+ /* istanbul ignore next */
40
+ if (node_opcua_factory_1.parameters.debugSchemaHelper) {
41
+ const schema = QualifiedName.schema;
42
+ (0, node_opcua_factory_1.check_options_correctness_against_schema)(this, schema, options);
43
+ }
44
+ this.namespaceIndex = options.namespaceIndex || 0;
45
+ this.name = options.name || null;
46
+ }
47
+ /**
48
+ * encode the object into a binary stream
49
+ */
50
+ encode(stream) {
51
+ super.encode(stream);
52
+ (0, node_opcua_basic_types_1.encodeUInt16)(this.namespaceIndex, stream);
53
+ (0, node_opcua_basic_types_1.encodeUAString)(this.name, stream);
54
+ }
55
+ /**
56
+ * decode the object from a binary stream
57
+ */
58
+ decode(stream) {
59
+ super.decode(stream);
60
+ this.namespaceIndex = (0, node_opcua_basic_types_1.decodeUInt16)(stream);
61
+ this.name = (0, node_opcua_basic_types_1.decodeUAString)(stream);
62
+ }
63
+ toString() {
64
+ if (this.namespaceIndex) {
65
+ return this.namespaceIndex + ":" + this.name;
66
+ }
67
+ return this.name || "<null>";
68
+ }
69
+ isEmpty() {
70
+ return !this.name || this.name.length === 0;
71
+ }
72
+ }
73
+ QualifiedName.schema = exports.schemaQualifiedName;
74
+ QualifiedName.possibleFields = ["namespaceIndex", "name"];
75
+ QualifiedName.encodingDefaultBinary = (0, node_opcua_nodeid_1.makeExpandedNodeId)(0, 0);
76
+ QualifiedName.encodingDefaultXml = (0, node_opcua_nodeid_1.makeExpandedNodeId)(0, 0);
77
+ exports.QualifiedName = QualifiedName;
78
+ QualifiedName.prototype.schema = QualifiedName.schema;
79
+ // xx QualifiedName.prototype.isEmpty = function (): boolean {
80
+ // xx return !this.name || this.name.length === 0;
81
+ // xx}
82
+ function isInteger(value) {
83
+ return typeof value === "number" && isFinite(value) && Math.floor(value) === value;
84
+ }
85
+ /**
86
+ * @method stringToQualifiedName
87
+ * @param value {String}
88
+ * @return {{namespaceIndex: Number, name: String}}
89
+ *
90
+ * @example
91
+ *
92
+ * stringToQualifiedName("Hello") => {namespaceIndex: 0, name: "Hello"}
93
+ * stringToQualifiedName("3:Hello") => {namespaceIndex: 3, name: "Hello"}
94
+ */
95
+ function stringToQualifiedName(value) {
96
+ const splitArray = value.split(":");
97
+ let namespaceIndex = 0;
98
+ if (!isNaN(parseFloat(splitArray[0])) &&
99
+ isFinite(parseInt(splitArray[0], 10)) &&
100
+ isInteger(parseFloat(splitArray[0])) &&
101
+ splitArray.length > 1) {
102
+ namespaceIndex = parseInt(splitArray[0], 10);
103
+ splitArray.shift();
104
+ value = splitArray.join(":");
105
+ }
106
+ return new QualifiedName({ namespaceIndex, name: value });
107
+ }
108
+ exports.stringToQualifiedName = stringToQualifiedName;
109
+ function coerceQualifiedName(value) {
110
+ if (!value) {
111
+ return null;
112
+ }
113
+ else if (value instanceof QualifiedName) {
114
+ return value;
115
+ }
116
+ else if (typeof value === "string") {
117
+ return stringToQualifiedName(value);
118
+ }
119
+ else {
120
+ (0, node_opcua_assert_1.assert)(Object.prototype.hasOwnProperty.call(value, "namespaceIndex"));
121
+ (0, node_opcua_assert_1.assert)(Object.prototype.hasOwnProperty.call(value, "name"));
122
+ return new QualifiedName(value);
123
+ }
124
+ }
125
+ exports.coerceQualifiedName = coerceQualifiedName;
126
+ (0, node_opcua_factory_1.registerSpecialVariantEncoder)(QualifiedName);
127
+ function encodeQualifiedName(value, stream) {
128
+ value.encode(stream);
129
+ }
130
+ exports.encodeQualifiedName = encodeQualifiedName;
131
+ function decodeQualifiedName(stream, value) {
132
+ value = value || new QualifiedName(null);
133
+ value.decode(stream);
134
+ return value;
135
+ }
136
+ exports.decodeQualifiedName = decodeQualifiedName;
137
137
  //# sourceMappingURL=qualified_name.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"qualified_name.js","sourceRoot":"","sources":["../source/qualified_name.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,yDAA2C;AAC3C,2DAQ4B;AAG5B,yDAAuE;AAEvE,mEAA6H;A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AAC;KACvC;SAAM;QACH,IAAA,0BAAM,EAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC;QACtE,IAAA,0BAAM,EAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;QAC5D,OAAO,IAAI,aAAa,CAAC,KAAK,CAAC,CAAC;KACnC;AACL,CAAC;AAZD,kDAYC;AAED,IAAA,kDAA6B,EAAC,aAAa,CAAC,CAAC;AAE7C,SAAgB,mBAAmB,CAAC,KAAoB,EAAE,MAA0B;IAChF,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AACzB,CAAC;AAFD,kDAEC;AAED,SAAgB,mBAAmB,CAAC,MAAoB,EAAE,KAAqB;IAC3E,KAAK,GAAG,KAAK,IAAI,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC;IACzC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACrB,OAAO,KAAK,CAAC;AACjB,CAAC;AAJD,kDAIC"}
@@ -1,18 +1,18 @@
1
- /**
2
- * @module node-opcua-data-model
3
- */
4
- import { Enum } from "node-opcua-enum";
5
- export declare enum ResultMask {
6
- ReferenceType = 1,
7
- IsForward = 2,
8
- NodeClass = 4,
9
- BrowseName = 8,
10
- DisplayName = 16,
11
- TypeDefinition = 32
12
- }
13
- export declare const schemaResultMask: {
14
- name: string;
15
- enumValues: typeof ResultMask;
16
- };
17
- export declare const _enumerationResultMask: Enum;
18
- export declare function makeResultMask(str: string): ResultMask;
1
+ /**
2
+ * @module node-opcua-data-model
3
+ */
4
+ import { Enum } from "node-opcua-enum";
5
+ export declare enum ResultMask {
6
+ ReferenceType = 1,
7
+ IsForward = 2,
8
+ NodeClass = 4,
9
+ BrowseName = 8,
10
+ DisplayName = 16,
11
+ TypeDefinition = 32
12
+ }
13
+ export declare const schemaResultMask: {
14
+ name: string;
15
+ enumValues: typeof ResultMask;
16
+ };
17
+ export declare const _enumerationResultMask: Enum;
18
+ export declare function makeResultMask(str: string): ResultMask;
@@ -1,31 +1,31 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.makeResultMask = exports._enumerationResultMask = exports.schemaResultMask = exports.ResultMask = void 0;
4
- const node_opcua_factory_1 = require("node-opcua-factory");
5
- var ResultMask;
6
- (function (ResultMask) {
7
- ResultMask[ResultMask["ReferenceType"] = 1] = "ReferenceType";
8
- ResultMask[ResultMask["IsForward"] = 2] = "IsForward";
9
- ResultMask[ResultMask["NodeClass"] = 4] = "NodeClass";
10
- ResultMask[ResultMask["BrowseName"] = 8] = "BrowseName";
11
- ResultMask[ResultMask["DisplayName"] = 16] = "DisplayName";
12
- ResultMask[ResultMask["TypeDefinition"] = 32] = "TypeDefinition";
13
- })(ResultMask = exports.ResultMask || (exports.ResultMask = {}));
14
- exports.schemaResultMask = {
15
- name: "ResultMask",
16
- enumValues: ResultMask
17
- };
18
- exports._enumerationResultMask = (0, node_opcua_factory_1.registerEnumeration)(exports.schemaResultMask);
19
- // The ReferenceDescription type is defined in 7.24.
20
- // @example
21
- // makeNodeClassMask("Method | Object").should.eql(5);
22
- function makeResultMask(str) {
23
- const flags = str.split(" | ");
24
- let r = 0;
25
- for (const flag of flags) {
26
- r |= ResultMask[flag];
27
- }
28
- return r;
29
- }
30
- exports.makeResultMask = makeResultMask;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeResultMask = exports._enumerationResultMask = exports.schemaResultMask = exports.ResultMask = void 0;
4
+ const node_opcua_factory_1 = require("node-opcua-factory");
5
+ var ResultMask;
6
+ (function (ResultMask) {
7
+ ResultMask[ResultMask["ReferenceType"] = 1] = "ReferenceType";
8
+ ResultMask[ResultMask["IsForward"] = 2] = "IsForward";
9
+ ResultMask[ResultMask["NodeClass"] = 4] = "NodeClass";
10
+ ResultMask[ResultMask["BrowseName"] = 8] = "BrowseName";
11
+ ResultMask[ResultMask["DisplayName"] = 16] = "DisplayName";
12
+ ResultMask[ResultMask["TypeDefinition"] = 32] = "TypeDefinition";
13
+ })(ResultMask = exports.ResultMask || (exports.ResultMask = {}));
14
+ exports.schemaResultMask = {
15
+ name: "ResultMask",
16
+ enumValues: ResultMask
17
+ };
18
+ exports._enumerationResultMask = (0, node_opcua_factory_1.registerEnumeration)(exports.schemaResultMask);
19
+ // The ReferenceDescription type is defined in 7.24.
20
+ // @example
21
+ // makeNodeClassMask("Method | Object").should.eql(5);
22
+ function makeResultMask(str) {
23
+ const flags = str.split(" | ");
24
+ let r = 0;
25
+ for (const flag of flags) {
26
+ r |= ResultMask[flag];
27
+ }
28
+ return r;
29
+ }
30
+ exports.makeResultMask = makeResultMask;
31
31
  //# sourceMappingURL=result_mask.js.map
@@ -1,3 +1,3 @@
1
- /**
2
- * @module node-opcua-data-model
3
- */
1
+ /**
2
+ * @module node-opcua-data-model
3
+ */
package/dist/time_zone.js CHANGED
@@ -1,19 +1,19 @@
1
- "use strict";
2
- /**
3
- * @module node-opcua-data-model
4
- */
5
- // tslint:disable:no-bitwise
6
- /*
7
- * This Structured DataType defines the local time that may or may not take daylight saving time
8
- * into account. Its elements are described in Table 24.
9
- * Table 24 – TimeZoneDataType Definition
10
- * Name Type Description
11
- * TimeZoneDataType structure
12
- * offset Int16 The offset in minutes from UtcTime
13
- * daylightSavingInOffset Boolean If TRUE, then daylight saving time (DST) is in effect and offset
14
- * includes the DST correction. If FALSE then the offset does not
15
- * include the DST correction and DST may or may not have
16
- * been in effect.
17
- */
18
- // todo : repair exports.TimeZoneDataType = require("./_generated_/_tuto").TimeZoneDataType;
1
+ "use strict";
2
+ /**
3
+ * @module node-opcua-data-model
4
+ */
5
+ // tslint:disable:no-bitwise
6
+ /*
7
+ * This Structured DataType defines the local time that may or may not take daylight saving time
8
+ * into account. Its elements are described in Table 24.
9
+ * Table 24 – TimeZoneDataType Definition
10
+ * Name Type Description
11
+ * TimeZoneDataType structure
12
+ * offset Int16 The offset in minutes from UtcTime
13
+ * daylightSavingInOffset Boolean If TRUE, then daylight saving time (DST) is in effect and offset
14
+ * includes the DST correction. If FALSE then the offset does not
15
+ * include the DST correction and DST may or may not have
16
+ * been in effect.
17
+ */
18
+ // todo : repair exports.TimeZoneDataType = require("./_generated_/_tuto").TimeZoneDataType;
19
19
  //# sourceMappingURL=time_zone.js.map
@@ -1,31 +1,31 @@
1
- /**
2
- * @module node-opcua-data-model
3
- */
4
- export declare enum WriteMask {
5
- AccessLevel = 1,
6
- ArrayDimensions = 2,
7
- BrowseName = 4,
8
- ContainsNoLoops = 8,
9
- DataType = 16,
10
- Description = 32,
11
- DisplayName = 64,
12
- EventNotifier = 128,
13
- Executable = 256,
14
- Historizing = 512,
15
- InverseName = 1024,
16
- IsAbstract = 2048,
17
- MinimumSamplingInterval = 4096,
18
- NodeClass = 8192,
19
- NodeId = 16384,
20
- Symmetric = 32768,
21
- UserAccessLevel = 65536,
22
- UserExecutable = 131072,
23
- UserWriteMask = 262144,
24
- ValueRank = 524288,
25
- WriteMask = 1048576,
26
- ValueForVariableType = 2097152,
27
- DataTypeDefinition = 4194304,
28
- RolePermissions = 8388608,
29
- AccessRestrictions = 16777216,
30
- AccessLevelEx = 33554432
31
- }
1
+ /**
2
+ * @module node-opcua-data-model
3
+ */
4
+ export declare enum WriteMask {
5
+ AccessLevel = 1,
6
+ ArrayDimensions = 2,
7
+ BrowseName = 4,
8
+ ContainsNoLoops = 8,
9
+ DataType = 16,
10
+ Description = 32,
11
+ DisplayName = 64,
12
+ EventNotifier = 128,
13
+ Executable = 256,
14
+ Historizing = 512,
15
+ InverseName = 1024,
16
+ IsAbstract = 2048,
17
+ MinimumSamplingInterval = 4096,
18
+ NodeClass = 8192,
19
+ NodeId = 16384,
20
+ Symmetric = 32768,
21
+ UserAccessLevel = 65536,
22
+ UserExecutable = 131072,
23
+ UserWriteMask = 262144,
24
+ ValueRank = 524288,
25
+ WriteMask = 1048576,
26
+ ValueForVariableType = 2097152,
27
+ DataTypeDefinition = 4194304,
28
+ RolePermissions = 8388608,
29
+ AccessRestrictions = 16777216,
30
+ AccessLevelEx = 33554432
31
+ }
@@ -1,41 +1,41 @@
1
- "use strict";
2
- /**
3
- * @module node-opcua-data-model
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.WriteMask = void 0;
7
- // tslint:disable:no-bitwise
8
- var WriteMask;
9
- (function (WriteMask) {
10
- WriteMask[WriteMask["AccessLevel"] = 1] = "AccessLevel";
11
- WriteMask[WriteMask["ArrayDimensions"] = 2] = "ArrayDimensions";
12
- WriteMask[WriteMask["BrowseName"] = 4] = "BrowseName";
13
- WriteMask[WriteMask["ContainsNoLoops"] = 8] = "ContainsNoLoops";
14
- WriteMask[WriteMask["DataType"] = 16] = "DataType";
15
- WriteMask[WriteMask["Description"] = 32] = "Description";
16
- WriteMask[WriteMask["DisplayName"] = 64] = "DisplayName";
17
- WriteMask[WriteMask["EventNotifier"] = 128] = "EventNotifier";
18
- WriteMask[WriteMask["Executable"] = 256] = "Executable";
19
- WriteMask[WriteMask["Historizing"] = 512] = "Historizing";
20
- WriteMask[WriteMask["InverseName"] = 1024] = "InverseName";
21
- WriteMask[WriteMask["IsAbstract"] = 2048] = "IsAbstract";
22
- WriteMask[WriteMask["MinimumSamplingInterval"] = 4096] = "MinimumSamplingInterval";
23
- WriteMask[WriteMask["NodeClass"] = 8192] = "NodeClass";
24
- WriteMask[WriteMask["NodeId"] = 16384] = "NodeId";
25
- WriteMask[WriteMask["Symmetric"] = 32768] = "Symmetric";
26
- WriteMask[WriteMask["UserAccessLevel"] = 65536] = "UserAccessLevel";
27
- WriteMask[WriteMask["UserExecutable"] = 131072] = "UserExecutable";
28
- WriteMask[WriteMask["UserWriteMask"] = 262144] = "UserWriteMask";
29
- WriteMask[WriteMask["ValueRank"] = 524288] = "ValueRank";
30
- WriteMask[WriteMask["WriteMask"] = 1048576] = "WriteMask";
31
- WriteMask[WriteMask["ValueForVariableType"] = 2097152] = "ValueForVariableType";
32
- WriteMask[WriteMask["DataTypeDefinition"] = 4194304] = "DataTypeDefinition";
33
- WriteMask[WriteMask["RolePermissions"] = 8388608] = "RolePermissions";
34
- WriteMask[WriteMask["AccessRestrictions"] = 16777216] = "AccessRestrictions";
35
- WriteMask[WriteMask["AccessLevelEx"] = 33554432] = "AccessLevelEx"; // Indicates if the AccessLevelEx Attribute is writable.
36
- // It does not apply for
37
- // Variables since this is handled by the AccessLevel and UserAccessLevel
38
- // Attributes for the Variable. For Variables this bit shall be set to 0.
39
- // Reserved 22:31 Reserved for future use. Shall always be zero.
40
- })(WriteMask = exports.WriteMask || (exports.WriteMask = {}));
1
+ "use strict";
2
+ /**
3
+ * @module node-opcua-data-model
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.WriteMask = void 0;
7
+ // tslint:disable:no-bitwise
8
+ var WriteMask;
9
+ (function (WriteMask) {
10
+ WriteMask[WriteMask["AccessLevel"] = 1] = "AccessLevel";
11
+ WriteMask[WriteMask["ArrayDimensions"] = 2] = "ArrayDimensions";
12
+ WriteMask[WriteMask["BrowseName"] = 4] = "BrowseName";
13
+ WriteMask[WriteMask["ContainsNoLoops"] = 8] = "ContainsNoLoops";
14
+ WriteMask[WriteMask["DataType"] = 16] = "DataType";
15
+ WriteMask[WriteMask["Description"] = 32] = "Description";
16
+ WriteMask[WriteMask["DisplayName"] = 64] = "DisplayName";
17
+ WriteMask[WriteMask["EventNotifier"] = 128] = "EventNotifier";
18
+ WriteMask[WriteMask["Executable"] = 256] = "Executable";
19
+ WriteMask[WriteMask["Historizing"] = 512] = "Historizing";
20
+ WriteMask[WriteMask["InverseName"] = 1024] = "InverseName";
21
+ WriteMask[WriteMask["IsAbstract"] = 2048] = "IsAbstract";
22
+ WriteMask[WriteMask["MinimumSamplingInterval"] = 4096] = "MinimumSamplingInterval";
23
+ WriteMask[WriteMask["NodeClass"] = 8192] = "NodeClass";
24
+ WriteMask[WriteMask["NodeId"] = 16384] = "NodeId";
25
+ WriteMask[WriteMask["Symmetric"] = 32768] = "Symmetric";
26
+ WriteMask[WriteMask["UserAccessLevel"] = 65536] = "UserAccessLevel";
27
+ WriteMask[WriteMask["UserExecutable"] = 131072] = "UserExecutable";
28
+ WriteMask[WriteMask["UserWriteMask"] = 262144] = "UserWriteMask";
29
+ WriteMask[WriteMask["ValueRank"] = 524288] = "ValueRank";
30
+ WriteMask[WriteMask["WriteMask"] = 1048576] = "WriteMask";
31
+ WriteMask[WriteMask["ValueForVariableType"] = 2097152] = "ValueForVariableType";
32
+ WriteMask[WriteMask["DataTypeDefinition"] = 4194304] = "DataTypeDefinition";
33
+ WriteMask[WriteMask["RolePermissions"] = 8388608] = "RolePermissions";
34
+ WriteMask[WriteMask["AccessRestrictions"] = 16777216] = "AccessRestrictions";
35
+ WriteMask[WriteMask["AccessLevelEx"] = 33554432] = "AccessLevelEx"; // Indicates if the AccessLevelEx Attribute is writable.
36
+ // It does not apply for
37
+ // Variables since this is handled by the AccessLevel and UserAccessLevel
38
+ // Attributes for the Variable. For Variables this bit shall be set to 0.
39
+ // Reserved 22:31 Reserved for future use. Shall always be zero.
40
+ })(WriteMask = exports.WriteMask || (exports.WriteMask = {}));
41
41
  //# sourceMappingURL=write_mask.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "node-opcua-data-model",
3
- "version": "2.97.0",
4
- "description": "pure nodejs OPCUA SDK - module -data-model",
3
+ "version": "2.98.1",
4
+ "description": "pure nodejs OPCUA SDK - module data-model",
5
5
  "scripts": {
6
6
  "build": "tsc -b",
7
7
  "test": "mocha",
@@ -13,16 +13,16 @@
13
13
  "main": "./dist/index.js",
14
14
  "types": "./dist/index.d.ts",
15
15
  "dependencies": {
16
- "node-opcua-assert": "2.88.0",
17
- "node-opcua-basic-types": "2.97.0",
18
- "node-opcua-binary-stream": "2.90.1",
19
- "node-opcua-enum": "2.90.1",
20
- "node-opcua-factory": "2.97.0",
21
- "node-opcua-nodeid": "2.97.0",
22
- "node-opcua-status-code": "2.90.1"
16
+ "node-opcua-assert": "2.98.1",
17
+ "node-opcua-basic-types": "2.98.1",
18
+ "node-opcua-binary-stream": "2.98.1",
19
+ "node-opcua-enum": "2.98.1",
20
+ "node-opcua-factory": "2.98.1",
21
+ "node-opcua-nodeid": "2.98.1",
22
+ "node-opcua-status-code": "2.98.1"
23
23
  },
24
24
  "devDependencies": {
25
- "node-opcua-packet-analyzer": "2.97.0",
25
+ "node-opcua-packet-analyzer": "2.98.1",
26
26
  "should": "^13.2.3"
27
27
  },
28
28
  "author": "Etienne Rossignon",
@@ -40,5 +40,9 @@
40
40
  "internet of things"
41
41
  ],
42
42
  "homepage": "http://node-opcua.github.io/",
43
- "gitHead": "19c96bda0810d2dec73dd1c2427546be40908646"
43
+ "gitHead": "07dcdd8e8c7f2b55544c6e23023093e35674829c",
44
+ "files": [
45
+ "dist",
46
+ "source"
47
+ ]
44
48
  }