node-opcua-address-space 2.103.0 → 2.104.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/dist/source/address_space_ts.js +1 -1
- package/dist/source/address_space_ts.js.map +1 -1
- package/dist/source/helpers/argument_list.js +5 -5
- package/dist/source/helpers/argument_list.js.map +1 -1
- package/dist/source/helpers/dump_tools.js +8 -5
- package/dist/source/helpers/dump_tools.js.map +1 -1
- package/dist/source/helpers/ensure_secure_access.js +0 -18
- package/dist/source/helpers/ensure_secure_access.js.map +1 -1
- package/dist/source/loader/load_nodeset2.js +35 -32
- package/dist/source/loader/load_nodeset2.js.map +1 -1
- package/dist/source/pseudo_session.js +24 -1
- package/dist/source/pseudo_session.js.map +1 -1
- package/dist/source/session_context.js +3 -3
- package/dist/source/session_context.js.map +1 -1
- package/dist/src/address_space.js +35 -9
- package/dist/src/address_space.js.map +1 -1
- package/dist/src/address_space_change_event_tools.js +5 -2
- package/dist/src/address_space_change_event_tools.js.map +1 -1
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.js +1 -1
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js +1 -1
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_condition_impl.js +7 -4
- package/dist/src/alarms_and_conditions/ua_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js +24 -1
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js.map +1 -1
- package/dist/src/base_node_impl.js +36 -10
- package/dist/src/base_node_impl.js.map +1 -1
- package/dist/src/base_node_private.js +36 -33
- package/dist/src/base_node_private.js.map +1 -1
- package/dist/src/data_access/ua_two_state_discrete_impl.js +4 -1
- package/dist/src/data_access/ua_two_state_discrete_impl.js.map +1 -1
- package/dist/src/historical_access/address_space_historical_data_node.js +5 -2
- package/dist/src/historical_access/address_space_historical_data_node.js.map +1 -1
- package/dist/src/namespace_impl.js +32 -6
- package/dist/src/namespace_impl.js.map +1 -1
- package/dist/src/nodeset_tools/nodeset_to_xml.js +24 -1
- package/dist/src/nodeset_tools/nodeset_to_xml.js.map +1 -1
- package/dist/src/reference_impl.js +29 -3
- package/dist/src/reference_impl.js.map +1 -1
- package/dist/src/state_machine/finite_state_machine.js +5 -2
- package/dist/src/state_machine/finite_state_machine.js.map +1 -1
- package/dist/src/state_machine/ua_two_state_variable.js +4 -4
- package/dist/src/state_machine/ua_two_state_variable.js.map +1 -1
- package/dist/src/ua_data_type_impl.js +36 -10
- package/dist/src/ua_data_type_impl.js.map +1 -1
- package/dist/src/ua_method_impl.js +5 -2
- package/dist/src/ua_method_impl.js.map +1 -1
- package/dist/src/ua_object_impl.js +7 -4
- package/dist/src/ua_object_impl.js.map +1 -1
- package/dist/src/ua_object_type_impl.js +25 -2
- package/dist/src/ua_object_type_impl.js.map +1 -1
- package/dist/src/ua_reference_type_impl.js +24 -1
- package/dist/src/ua_reference_type_impl.js.map +1 -1
- package/dist/src/ua_variable_impl.js +43 -17
- package/dist/src/ua_variable_impl.js.map +1 -1
- package/dist/src/ua_variable_impl_ext_obj.js +5 -2
- package/dist/src/ua_variable_impl_ext_obj.js.map +1 -1
- package/dist/src/ua_variable_type_impl.js +31 -5
- package/dist/src/ua_variable_type_impl.js.map +1 -1
- package/dist/tsconfig_common.tsbuildinfo +1 -1
- package/distHelpers/create_minimalist_address_space_nodeset.js +5 -2
- package/distHelpers/create_minimalist_address_space_nodeset.js.map +1 -1
- package/distHelpers/get_address_space_fixture.js +25 -2
- package/distHelpers/get_address_space_fixture.js.map +1 -1
- package/distNodeJS/generate_address_space.js +24 -1
- package/distNodeJS/generate_address_space.js.map +1 -1
- package/package.json +40 -40
- package/source/helpers/argument_list.ts +5 -5
- package/source/helpers/dump_tools.ts +1 -1
- package/source/helpers/ensure_secure_access.ts +0 -19
- package/source/loader/load_nodeset2.ts +14 -14
- package/src/address_space.ts +1 -1
- package/src/address_space_change_event_tools.ts +1 -1
- package/src/alarms_and_conditions/ua_condition_impl.ts +1 -1
- package/src/base_node_impl.ts +1 -1
- package/src/base_node_private.ts +1 -1
- package/src/historical_access/address_space_historical_data_node.ts +1 -1
- package/src/namespace_impl.ts +2 -2
- package/src/reference_impl.ts +1 -1
- package/src/state_machine/finite_state_machine.ts +1 -1
- package/src/state_machine/ua_two_state_variable.ts +3 -3
- package/src/ua_data_type_impl.ts +1 -1
- package/src/ua_method_impl.ts +1 -1
- package/src/ua_object_impl.ts +1 -1
- package/src/ua_variable_impl.ts +1 -1
- package/src/ua_variable_impl_ext_obj.ts +3 -1
- package/src/ua_variable_type_impl.ts +1 -1
|
@@ -5,9 +5,12 @@
|
|
|
5
5
|
*/
|
|
6
6
|
// tslint:disable:no-console
|
|
7
7
|
// tslint:disable:max-line-length
|
|
8
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
8
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
12
|
exports.create_minimalist_address_space_nodeset = void 0;
|
|
10
|
-
const
|
|
13
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
11
14
|
const node_opcua_assert_1 = require("node-opcua-assert");
|
|
12
15
|
const node_opcua_constants_1 = require("node-opcua-constants");
|
|
13
16
|
const node_opcua_data_model_1 = require("node-opcua-data-model");
|
|
@@ -16,7 +19,7 @@ const doDebug = false;
|
|
|
16
19
|
function dumpReferencesHierarchy(_addressSpace) {
|
|
17
20
|
const addressSpace = _addressSpace;
|
|
18
21
|
function _dump(referenceType, level) {
|
|
19
|
-
console.log(level, referenceType.browseName.toString(), "(",
|
|
22
|
+
console.log(level, referenceType.browseName.toString(), "(", chalk_1.default.green(referenceType
|
|
20
23
|
.getAllSubtypes()
|
|
21
24
|
.map((x) => x.browseName.toString())
|
|
22
25
|
.join(" ")), ")");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create_minimalist_address_space_nodeset.js","sourceRoot":"","sources":["../test_helpers/create_minimalist_address_space_nodeset.ts"],"names":[],"mappings":";AAAA,mCAAmC;AACnC;;GAEG;AACH,4BAA4B;AAC5B,iCAAiC
|
|
1
|
+
{"version":3,"file":"create_minimalist_address_space_nodeset.js","sourceRoot":"","sources":["../test_helpers/create_minimalist_address_space_nodeset.ts"],"names":[],"mappings":";AAAA,mCAAmC;AACnC;;GAEG;AACH,4BAA4B;AAC5B,iCAAiC;;;;;;AAEjC,kDAA0B;AAC1B,yDAA2C;AAC3C,+DAAgH;AAChH,iEAAkD;AAClD,yDAA0D;AAI1D,MAAM,OAAO,GAAG,KAAK,CAAC;AAEtB,SAAS,uBAAuB,CAAC,aAA2B;IACxD,MAAM,YAAY,GAAG,aAAa,CAAC;IAEnC,SAAS,KAAK,CAAC,aAA8B,EAAE,KAAa;QACxD,OAAO,CAAC,GAAG,CACP,KAAK,EACL,aAAa,CAAC,UAAU,CAAC,QAAQ,EAAE,EACnC,GAAG,EACH,eAAK,CAAC,KAAK,CACP,aAAa;aACR,cAAc,EAAE;aAChB,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;aACxC,IAAI,CAAC,GAAG,CAAC,CACjB,EACD,GAAG,CACN,CAAC;QAEF,MAAM,QAAQ,GAAG,aAAa,CAAC,wBAAwB,CAAC,YAAY,CAAC,CAAC;QACtE,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;YAC5B,KAAK,CAAC,OAA0B,EAAE,OAAO,GAAG,KAAK,CAAC,CAAC;SACtD;IACL,CAAC;IAED,MAAM,UAAU,GAAG,YAAY,CAAC,iBAAiB,CAAC,uCAAgB,CAAC,UAAU,CAAE,CAAC;IAEhF,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AAC3B,CAAC;AAED,SAAgB,uCA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) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.getAddressSpaceFixture = void 0;
|
|
4
27
|
/**
|
|
5
28
|
* @module node-opcua-address-space
|
|
6
29
|
*/
|
|
7
|
-
const fs = require("fs");
|
|
8
|
-
const path = require("path");
|
|
30
|
+
const fs = __importStar(require("fs"));
|
|
31
|
+
const path = __importStar(require("path"));
|
|
9
32
|
function getAddressSpaceFixture(pathname) {
|
|
10
33
|
// find in nodesets folder in the first place
|
|
11
34
|
const folder1 = path.join(__dirname, "../nodesets");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_address_space_fixture.js","sourceRoot":"","sources":["../test_helpers/get_address_space_fixture.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get_address_space_fixture.js","sourceRoot":"","sources":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O,QAAQ,CAAC;AACpB,CAAC;AAhCD,wDAgCC"}
|
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
26
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
27
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -10,7 +33,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
33
|
};
|
|
11
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
35
|
exports.generateAddressSpace = exports.readNodeSet2XmlFile = void 0;
|
|
13
|
-
const fs = require("fs");
|
|
36
|
+
const fs = __importStar(require("fs"));
|
|
14
37
|
const util_1 = require("util");
|
|
15
38
|
const node_opcua_debug_1 = require("node-opcua-debug");
|
|
16
39
|
const __1 = require("..");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate_address_space.js","sourceRoot":"","sources":["../source_nodejs/generate_address_space.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generate_address_space.js","sourceRoot":"","sources":["../source_nodejs/generate_address_space.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,+BAAmC;AAEnC,uDAAgF;AAGhF,0BAA6C;AAG7C,MAAM,OAAO,GAAG,IAAA,iCAAc,EAAC,UAAU,CAAC,CAAC;AAC3C,MAAM,QAAQ,GAAG,IAAA,gCAAa,EAAC,UAAU,CAAC,CAAC;AAC3C,MAAM,QAAQ,GAAG,IAAA,gCAAa,EAAC,UAAU,CAAC,CAAC;AAE3C,SAAsB,mBAAmB,CAAC,OAAe;;QACrD,uBAAuB;QACvB,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;YACzB,MAAM,GAAG,GAAG,2EAA2E,GAAG,OAAO,CAAC;YAClG,QAAQ,CAAC,GAAG,CAAC,CAAC;YACd,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC;SACxB;QACD,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAC/B,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC7D,OAAO,OAAO,CAAC;IACnB,CAAC;CAAA;AAVD,kDAUC;AAiBD,SAAgB,oBAAoB,CAChC,GAAI,IAAW;IAEf,MAAM,YAAY,GAAG,IAAI,CAAC,CAAC,CAAkB,CAAC;IAC9C,MAAM,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAsB,CAAC;IAC9C,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;QACnB,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAqC,CAAC;QAC5D,MAAM,QAAQ,GAAG,IAAI,CAAC,CAAC,CAA2B,CAAC;QACnD,IAAA,kBAAW,EAAC,2BAAuB,CAAC,CAAC,YAAY,EAAE,QAAQ,EAAE,mBAAmB,EAAE,OAAO,IAAG,EAAE,EAAE,QAAS,CAAC,CAAC;KAC9G;SAAM;QACH,MAAM,OAAO,GAAG,EAAE,CAAC;QACnB,MAAM,QAAQ,GAAG,IAAI,CAAC,CAAC,CAA2B,CAAC;QACnD,IAAA,kBAAW,EAAC,2BAAuB,CAAC,CAAC,YAAY,EAAE,QAAQ,EAAE,mBAAmB,EAAE,OAAO,EAAE,QAAS,CAAC,CAAC;KACzG;AACL,CAAC;AAdD,oDAcC;AAED,iCAAiC;AACjC,iCAAiC;AACjC,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;AAClC,MAAM,CAAC,OAAe,CAAC,oBAAoB,GAAG,OAAO,CAAC,YAAY,CAAE,MAAM,CAAC,OAAe,CAAC,oBAAoB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-opcua-address-space",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.104.0",
|
|
4
4
|
"description": "pure nodejs OPCUA SDK - module address-space",
|
|
5
5
|
"main": "./dist/src/index_current.js",
|
|
6
6
|
"types": "./dist/source/index.d.ts",
|
|
@@ -16,57 +16,57 @@
|
|
|
16
16
|
"c": "mocha --version"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@types/lodash": "4.14.
|
|
20
|
-
"@types/semver": "^7.
|
|
19
|
+
"@types/lodash": "4.14.195",
|
|
20
|
+
"@types/semver": "^7.5.0",
|
|
21
21
|
"async": "^3.2.4",
|
|
22
22
|
"chalk": "4.1.2",
|
|
23
23
|
"dequeue": "^1.0.5",
|
|
24
24
|
"lodash": "4.17.21",
|
|
25
|
-
"node-opcua-address-space-base": "2.
|
|
26
|
-
"node-opcua-assert": "2.
|
|
27
|
-
"node-opcua-basic-types": "2.
|
|
28
|
-
"node-opcua-binary-stream": "2.
|
|
29
|
-
"node-opcua-client-dynamic-extension-object": "2.
|
|
25
|
+
"node-opcua-address-space-base": "2.104.0",
|
|
26
|
+
"node-opcua-assert": "2.104.0",
|
|
27
|
+
"node-opcua-basic-types": "2.104.0",
|
|
28
|
+
"node-opcua-binary-stream": "2.104.0",
|
|
29
|
+
"node-opcua-client-dynamic-extension-object": "2.104.0",
|
|
30
30
|
"node-opcua-constants": "2.98.1",
|
|
31
|
-
"node-opcua-crypto": "
|
|
32
|
-
"node-opcua-data-access": "2.
|
|
33
|
-
"node-opcua-data-model": "2.
|
|
34
|
-
"node-opcua-data-value": "2.
|
|
35
|
-
"node-opcua-date-time": "2.
|
|
36
|
-
"node-opcua-debug": "2.
|
|
37
|
-
"node-opcua-enum": "2.
|
|
38
|
-
"node-opcua-extension-object": "2.
|
|
39
|
-
"node-opcua-factory": "2.
|
|
40
|
-
"node-opcua-nodeid": "2.
|
|
41
|
-
"node-opcua-nodeset-ua": "2.
|
|
42
|
-
"node-opcua-numeric-range": "2.
|
|
43
|
-
"node-opcua-object-registry": "2.
|
|
44
|
-
"node-opcua-pseudo-session": "2.
|
|
45
|
-
"node-opcua-service-browse": "2.
|
|
46
|
-
"node-opcua-service-call": "2.
|
|
47
|
-
"node-opcua-service-history": "2.
|
|
48
|
-
"node-opcua-service-translate-browse-path": "2.
|
|
49
|
-
"node-opcua-service-write": "2.
|
|
50
|
-
"node-opcua-status-code": "2.
|
|
51
|
-
"node-opcua-types": "2.
|
|
52
|
-
"node-opcua-utils": "2.
|
|
53
|
-
"node-opcua-variant": "2.
|
|
54
|
-
"node-opcua-xml2json": "2.
|
|
55
|
-
"semver": "^7.
|
|
31
|
+
"node-opcua-crypto": "3.0.5",
|
|
32
|
+
"node-opcua-data-access": "2.104.0",
|
|
33
|
+
"node-opcua-data-model": "2.104.0",
|
|
34
|
+
"node-opcua-data-value": "2.104.0",
|
|
35
|
+
"node-opcua-date-time": "2.104.0",
|
|
36
|
+
"node-opcua-debug": "2.104.0",
|
|
37
|
+
"node-opcua-enum": "2.104.0",
|
|
38
|
+
"node-opcua-extension-object": "2.104.0",
|
|
39
|
+
"node-opcua-factory": "2.104.0",
|
|
40
|
+
"node-opcua-nodeid": "2.104.0",
|
|
41
|
+
"node-opcua-nodeset-ua": "2.104.0",
|
|
42
|
+
"node-opcua-numeric-range": "2.104.0",
|
|
43
|
+
"node-opcua-object-registry": "2.104.0",
|
|
44
|
+
"node-opcua-pseudo-session": "2.104.0",
|
|
45
|
+
"node-opcua-service-browse": "2.104.0",
|
|
46
|
+
"node-opcua-service-call": "2.104.0",
|
|
47
|
+
"node-opcua-service-history": "2.104.0",
|
|
48
|
+
"node-opcua-service-translate-browse-path": "2.104.0",
|
|
49
|
+
"node-opcua-service-write": "2.104.0",
|
|
50
|
+
"node-opcua-status-code": "2.104.0",
|
|
51
|
+
"node-opcua-types": "2.104.0",
|
|
52
|
+
"node-opcua-utils": "2.104.0",
|
|
53
|
+
"node-opcua-variant": "2.104.0",
|
|
54
|
+
"node-opcua-xml2json": "2.104.0",
|
|
55
|
+
"semver": "^7.5.1",
|
|
56
56
|
"set-prototype-of": "^1.0.0",
|
|
57
57
|
"thenify": "^3.3.1",
|
|
58
58
|
"xml-writer": "^1.7.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"mocha": "^10.2.0",
|
|
62
|
-
"node-opcua-benchmarker": "2.
|
|
63
|
-
"node-opcua-leak-detector": "2.
|
|
62
|
+
"node-opcua-benchmarker": "2.104.0",
|
|
63
|
+
"node-opcua-leak-detector": "2.104.0",
|
|
64
64
|
"node-opcua-nodesets": "2.103.0",
|
|
65
|
-
"node-opcua-packet-analyzer": "2.
|
|
66
|
-
"node-opcua-service-filter": "2.
|
|
67
|
-
"node-opcua-test-fixtures": "2.
|
|
65
|
+
"node-opcua-packet-analyzer": "2.104.0",
|
|
66
|
+
"node-opcua-service-filter": "2.104.0",
|
|
67
|
+
"node-opcua-test-fixtures": "2.104.0",
|
|
68
68
|
"should": "^13.2.3",
|
|
69
|
-
"sinon": "^15.0
|
|
69
|
+
"sinon": "^15.1.0",
|
|
70
70
|
"source-map-support": "^0.5.21"
|
|
71
71
|
},
|
|
72
72
|
"author": "Etienne Rossignon",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"internet of things"
|
|
85
85
|
],
|
|
86
86
|
"homepage": "http://node-opcua.github.io/",
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "3cd6d355e8b3c66822d08a3ca682659ea5d1a55d",
|
|
88
88
|
"files": [
|
|
89
89
|
"dist",
|
|
90
90
|
"distHelpers",
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* @module node-opcua-address-space
|
|
4
4
|
*/
|
|
5
5
|
import { assert } from "node-opcua-assert";
|
|
6
|
-
import
|
|
6
|
+
import { decodeArray, encodeArray } from "node-opcua-basic-types";
|
|
7
7
|
import { BinaryStream, BinaryStreamSizeCalculator, OutputBinaryStream } from "node-opcua-binary-stream";
|
|
8
8
|
import { checkDebugFlag, make_debugLog, make_warningLog } from "node-opcua-debug";
|
|
9
|
-
import
|
|
9
|
+
import { findBuiltInType } from "node-opcua-factory";
|
|
10
10
|
import { coerceNodeId, NodeId, resolveNodeId } from "node-opcua-nodeid";
|
|
11
11
|
import { Argument } from "node-opcua-service-call";
|
|
12
12
|
import { StatusCode, StatusCodes } from "node-opcua-status-code";
|
|
@@ -22,7 +22,7 @@ const warningLog = make_warningLog(__filename);
|
|
|
22
22
|
const doDebug = checkDebugFlag(__filename);
|
|
23
23
|
|
|
24
24
|
function myfindBuiltInType(dataType: DataType): any {
|
|
25
|
-
return
|
|
25
|
+
return findBuiltInType(DataType[dataType]);
|
|
26
26
|
}
|
|
27
27
|
export interface ArgumentDef {
|
|
28
28
|
dataType: DataType;
|
|
@@ -49,7 +49,7 @@ export function encode_ArgumentList(definition: ArgumentDef[], args: any[], stre
|
|
|
49
49
|
const isArray = def.valueRank && (def.valueRank === 1 || def.valueRank !== -1);
|
|
50
50
|
|
|
51
51
|
if (isArray) {
|
|
52
|
-
|
|
52
|
+
encodeArray(value, stream, encodeFunc);
|
|
53
53
|
} else {
|
|
54
54
|
encodeFunc(value, stream);
|
|
55
55
|
}
|
|
@@ -76,7 +76,7 @@ export function decode_ArgumentList(definition: ArgumentDef[], stream: BinaryStr
|
|
|
76
76
|
const isArray = def.valueRank === 1 || def.valueRank === -1;
|
|
77
77
|
|
|
78
78
|
if (isArray) {
|
|
79
|
-
value =
|
|
79
|
+
value = decodeArray(stream, decodeFunc);
|
|
80
80
|
} else {
|
|
81
81
|
value = decodeFunc(stream);
|
|
82
82
|
}
|
|
@@ -10,24 +10,6 @@ function isChannelSecure(channel: IChannelBase): boolean {
|
|
|
10
10
|
return false;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
function newIsUserReadable(this: BaseNode, context: ISessionContext): boolean {
|
|
14
|
-
if (context) {
|
|
15
|
-
if (!context.session) {
|
|
16
|
-
// console.log(" context has no session", context);
|
|
17
|
-
return false;
|
|
18
|
-
}
|
|
19
|
-
if (!context.session.channel) {
|
|
20
|
-
// console.log(" context has no channel", context);
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
if (!isChannelSecure(context.session.channel)) {
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
return true;
|
|
27
|
-
}
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
13
|
/**
|
|
32
14
|
* make sure that the given ia node can only be read
|
|
33
15
|
* by Administrator user on a encrypted channel
|
|
@@ -57,7 +39,6 @@ const restrictedAccessFlag = makeAccessRestrictionsFlag("SigningRequired | Encry
|
|
|
57
39
|
export function ensureObjectIsSecure(node: BaseNode): void {
|
|
58
40
|
node.setAccessRestrictions(restrictedAccessFlag);
|
|
59
41
|
if (node.nodeClass === NodeClass.Variable) {
|
|
60
|
-
// replaceMethod(node, "isUserReadable", newIsUserReadable);
|
|
61
42
|
const variable = node as UAVariable;
|
|
62
43
|
variable.setRolePermissions(restrictedPermissions);
|
|
63
44
|
}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* @module node-opcua-address-space
|
|
4
4
|
*/
|
|
5
5
|
import { promisify, types } from "util";
|
|
6
|
-
import
|
|
6
|
+
import chalk from "chalk";
|
|
7
7
|
|
|
8
|
-
import
|
|
8
|
+
import { coerceByte , coerceBoolean, coerceInt32} from "node-opcua-basic-types";
|
|
9
9
|
import {
|
|
10
10
|
AddReferenceTypeOptions,
|
|
11
11
|
BaseNode,
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
XmlAttributes,
|
|
50
50
|
SimpleCallback
|
|
51
51
|
} from "node-opcua-xml2json";
|
|
52
|
-
import
|
|
52
|
+
import semver from "semver";
|
|
53
53
|
|
|
54
54
|
import { AddressSpacePrivate } from "../../src/address_space_private";
|
|
55
55
|
import { NamespacePrivate } from "../../src/namespace_private";
|
|
@@ -401,10 +401,10 @@ function makeNodeSetParserEngine(addressSpace: IAddressSpace, options: NodeSetLo
|
|
|
401
401
|
|
|
402
402
|
this.obj = {};
|
|
403
403
|
this.obj.nodeClass = NodeClass.Object;
|
|
404
|
-
this.obj.isAbstract =
|
|
404
|
+
this.obj.isAbstract = coerceBoolean(attrs.IsAbstract);
|
|
405
405
|
this.obj.nodeId = convertToNodeId(attrs.NodeId) || null;
|
|
406
406
|
this.obj.browseName = convertQualifiedName(attrs.BrowseName);
|
|
407
|
-
this.obj.eventNotifier =
|
|
407
|
+
this.obj.eventNotifier = coerceByte(attrs.EventNotifier) || 0;
|
|
408
408
|
this.obj.symbolicName = attrs.SymbolicName || null;
|
|
409
409
|
|
|
410
410
|
this.isDraft = attrs.ReleaseStatus === "Draft";
|
|
@@ -439,10 +439,10 @@ function makeNodeSetParserEngine(addressSpace: IAddressSpace, options: NodeSetLo
|
|
|
439
439
|
|
|
440
440
|
this.obj = {};
|
|
441
441
|
this.obj.nodeClass = NodeClass.ObjectType;
|
|
442
|
-
this.obj.isAbstract =
|
|
442
|
+
this.obj.isAbstract = coerceBoolean(attrs.IsAbstract);
|
|
443
443
|
this.obj.nodeId = convertToNodeId(attrs.NodeId) || null;
|
|
444
444
|
this.obj.browseName = convertQualifiedName(attrs.BrowseName);
|
|
445
|
-
this.obj.eventNotifier =
|
|
445
|
+
this.obj.eventNotifier = coerceByte(attrs.EventNotifier) || 0;
|
|
446
446
|
},
|
|
447
447
|
finish(this: any) {
|
|
448
448
|
_internal_createNode(this.obj);
|
|
@@ -470,7 +470,7 @@ function makeNodeSetParserEngine(addressSpace: IAddressSpace, options: NodeSetLo
|
|
|
470
470
|
|
|
471
471
|
this.obj = {};
|
|
472
472
|
this.obj.nodeClass = NodeClass.ReferenceType;
|
|
473
|
-
this.obj.isAbstract =
|
|
473
|
+
this.obj.isAbstract =coerceBoolean(attrs.IsAbstract);
|
|
474
474
|
this.obj.nodeId = convertToNodeId(attrs.NodeId) || null;
|
|
475
475
|
this.obj.browseName = convertQualifiedName(attrs.BrowseName);
|
|
476
476
|
},
|
|
@@ -507,7 +507,7 @@ function makeNodeSetParserEngine(addressSpace: IAddressSpace, options: NodeSetLo
|
|
|
507
507
|
|
|
508
508
|
this.obj = {};
|
|
509
509
|
this.obj.nodeClass = NodeClass.DataType;
|
|
510
|
-
this.obj.isAbstract =
|
|
510
|
+
this.obj.isAbstract = coerceBoolean(attrs.IsAbstract) || false;
|
|
511
511
|
this.obj.nodeId = convertToNodeId(attrs.NodeId) || null;
|
|
512
512
|
this.obj.browseName = convertQualifiedName(attrs.BrowseName);
|
|
513
513
|
this.obj.displayName = "";
|
|
@@ -1104,7 +1104,7 @@ function makeNodeSetParserEngine(addressSpace: IAddressSpace, options: NodeSetLo
|
|
|
1104
1104
|
}
|
|
1105
1105
|
},
|
|
1106
1106
|
|
|
1107
|
-
Boolean: parser2("Boolean",
|
|
1107
|
+
Boolean: parser2("Boolean", coerceBoolean),
|
|
1108
1108
|
Byte: parser2("Byte", parseInt),
|
|
1109
1109
|
Int16: parser2("Int16", parseInt),
|
|
1110
1110
|
Int32: parser2("Int32", parseInt),
|
|
@@ -1240,7 +1240,7 @@ function makeNodeSetParserEngine(addressSpace: IAddressSpace, options: NodeSetLo
|
|
|
1240
1240
|
}
|
|
1241
1241
|
},
|
|
1242
1242
|
|
|
1243
|
-
ListOfBoolean: ListOf<boolean>("Boolean",
|
|
1243
|
+
ListOfBoolean: ListOf<boolean>("Boolean", coerceBoolean),
|
|
1244
1244
|
|
|
1245
1245
|
ListOfByte: ListOf<number>("Byte", parseInt),
|
|
1246
1246
|
|
|
@@ -1362,7 +1362,7 @@ function makeNodeSetParserEngine(addressSpace: IAddressSpace, options: NodeSetLo
|
|
|
1362
1362
|
this.obj.parentNodeId = convertToNodeId(attrs.ParentNodeId);
|
|
1363
1363
|
this.obj.dataType = convertToNodeId(attrs.DataType);
|
|
1364
1364
|
|
|
1365
|
-
this.obj.valueRank = attrs.ValueRank === undefined ? -1 :
|
|
1365
|
+
this.obj.valueRank = attrs.ValueRank === undefined ? -1 : coerceInt32(attrs.ValueRank);
|
|
1366
1366
|
this.obj.arrayDimensions = this.obj.valueRank <= 0 ? null : stringToUInt32Array(attrs.ArrayDimensions);
|
|
1367
1367
|
|
|
1368
1368
|
this.obj.minimumSamplingInterval = attrs.MinimumSamplingInterval ? parseInt(attrs.MinimumSamplingInterval, 10) : 0;
|
|
@@ -1453,14 +1453,14 @@ function makeNodeSetParserEngine(addressSpace: IAddressSpace, options: NodeSetLo
|
|
|
1453
1453
|
_perform();
|
|
1454
1454
|
|
|
1455
1455
|
this.obj = {};
|
|
1456
|
-
this.obj.isAbstract =
|
|
1456
|
+
this.obj.isAbstract = coerceBoolean(attrs.IsAbstract);
|
|
1457
1457
|
|
|
1458
1458
|
this.obj.nodeClass = NodeClass.VariableType;
|
|
1459
1459
|
this.obj.browseName = convertQualifiedName(attrs.BrowseName);
|
|
1460
1460
|
this.obj.parentNodeId = attrs.ParentNodeId || null;
|
|
1461
1461
|
this.obj.dataType = convertToNodeId(attrs.DataType) || null;
|
|
1462
1462
|
|
|
1463
|
-
this.obj.valueRank =
|
|
1463
|
+
this.obj.valueRank = coerceInt32(attrs.ValueRank) || -1;
|
|
1464
1464
|
this.obj.arrayDimensions = this.obj.valueRank <= 0 ? null : stringToUInt32Array(attrs.ArrayDimensions);
|
|
1465
1465
|
|
|
1466
1466
|
this.obj.minimumSamplingInterval = attrs.MinimumSamplingInterval ? parseInt(attrs.MinimumSamplingInterval, 10) : 0;
|
package/src/address_space.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module node-opcua-address-space
|
|
3
3
|
*/
|
|
4
|
-
import
|
|
4
|
+
import chalk from "chalk";
|
|
5
5
|
|
|
6
6
|
import { UAReference, BaseNode, UAObject, UAVariable, UAObjectType, UAVariableType } from "node-opcua-address-space-base";
|
|
7
7
|
import { assert } from "node-opcua-assert";
|
package/src/base_node_impl.ts
CHANGED
package/src/base_node_private.ts
CHANGED
package/src/namespace_impl.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module node-opcua-address-space
|
|
3
3
|
*/
|
|
4
4
|
// tslint:disable:no-console
|
|
5
|
-
import
|
|
5
|
+
import chalk from "chalk";
|
|
6
6
|
|
|
7
7
|
import { assert } from "node-opcua-assert";
|
|
8
8
|
import { coerceInt64 } from "node-opcua-basic-types";
|
|
@@ -1354,7 +1354,7 @@ export class NamespaceImpl implements NamespacePrivate {
|
|
|
1354
1354
|
return new EnumValueType({
|
|
1355
1355
|
description: coerceLocalizedText(enumItem.description),
|
|
1356
1356
|
displayName: coerceLocalizedText(enumItem.displayName),
|
|
1357
|
-
value:
|
|
1357
|
+
value: coerceInt64(enumItem.value)
|
|
1358
1358
|
});
|
|
1359
1359
|
});
|
|
1360
1360
|
|
package/src/reference_impl.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module node-opcua-address-space
|
|
3
3
|
*/
|
|
4
4
|
// tslint:disable:no-console
|
|
5
|
-
import
|
|
5
|
+
import chalk from "chalk";
|
|
6
6
|
import { AddReferenceOpts, UAReference, BaseNode, UAReferenceType } from "node-opcua-address-space-base";
|
|
7
7
|
import { assert } from "node-opcua-assert";
|
|
8
8
|
import { coerceNodeId, NodeId, NodeIdLike, sameNodeId } from "node-opcua-nodeid";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module node-opcua-address-space
|
|
3
3
|
*/
|
|
4
|
-
import
|
|
4
|
+
import chalk from "chalk";
|
|
5
5
|
import { UAState, UAStateVariable, UATransition, UATransition_Base, UATransitionVariable } from "node-opcua-nodeset-ua";
|
|
6
6
|
import { assert } from "node-opcua-assert";
|
|
7
7
|
import { ObjectTypeIds } from "node-opcua-constants";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
2
|
* @module node-opcua-address-space
|
|
3
3
|
*/
|
|
4
4
|
import { assert } from "node-opcua-assert";
|
|
@@ -54,7 +54,7 @@ const hasFalseSubState_ReferenceTypeNodeId = resolveNodeId("HasFalseSubState");
|
|
|
54
54
|
// TwoStateVariableType
|
|
55
55
|
// <StateIdentifier> Defined in Clause 5.4.3 Optional
|
|
56
56
|
|
|
57
|
-
function _updateTransitionTime(node: UATwoStateVariableEx) {
|
|
57
|
+
function _updateTransitionTime(node: UATwoStateVariableEx, _subState?: UAVariable) {
|
|
58
58
|
// TransitionTime specifies the time when the current state was entered.
|
|
59
59
|
if (node.transitionTime) {
|
|
60
60
|
node.transitionTime.setValueFromSource({ dataType: DataType.DateTime, value: new Date() });
|
|
@@ -370,7 +370,7 @@ export class UATwoStateVariableImpl extends UAVariableImplT<LocalizedText, DataT
|
|
|
370
370
|
const addressSpace = this.addressSpace;
|
|
371
371
|
// add event handle
|
|
372
372
|
const subState = addressSpace.findNode(reference.nodeId) as UAVariable;
|
|
373
|
-
subState.on("value_changed", _updateEffectiveTransitionTime.bind(null, this
|
|
373
|
+
subState.on("value_changed", _updateEffectiveTransitionTime.bind(null, this));
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
376
|
}
|
package/src/ua_data_type_impl.ts
CHANGED
package/src/ua_method_impl.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module node-opcua-address-space
|
|
3
3
|
*/
|
|
4
4
|
import { callbackify, types } from "util";
|
|
5
|
-
import
|
|
5
|
+
import chalk from "chalk";
|
|
6
6
|
import { assert } from "node-opcua-assert";
|
|
7
7
|
|
|
8
8
|
import { AttributeIds, QualifiedNameLike } from "node-opcua-data-model";
|
package/src/ua_object_impl.ts
CHANGED
package/src/ua_variable_impl.ts
CHANGED
|
@@ -608,7 +608,9 @@ export function _bindExtensionObjectArrayOrMatrix(
|
|
|
608
608
|
const addressSpace = uaVariable.addressSpace;
|
|
609
609
|
if (optionalExtensionObjectArray) {
|
|
610
610
|
if (optionalExtensionObjectArray.length !== totalLength) {
|
|
611
|
-
throw new Error(
|
|
611
|
+
throw new Error(
|
|
612
|
+
`optionalExtensionObjectArray must have the expected number of element matching ${arrayDimensions} but was ${optionalExtensionObjectArray.length}`
|
|
613
|
+
);
|
|
612
614
|
}
|
|
613
615
|
}
|
|
614
616
|
if (!optionalExtensionObjectArray) {
|