node-opcua-client-dynamic-extension-object 2.118.0 → 2.119.2
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/get_extra_data_type_manager.js.map +1 -1
- package/dist/resolve_dynamic_extension_object.d.ts +1 -1
- package/dist/resolve_dynamic_extension_object.js +4 -4
- package/package.json +12 -12
- package/source/get_extra_data_type_manager.ts +3 -3
- package/source/resolve_dynamic_extension_object.ts +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_extra_data_type_manager.js","sourceRoot":"","sources":["../source/get_extra_data_type_manager.ts"],"names":[],"mappings":";;;AAAA,uDAAgF;AAChF,2DAAiF;AACjF,yEAGmC;AACnC,EAAE;AACF,uEAAiE;AACjE,6EAAuE;AAEvE,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;AAC3C,MAAM,UAAU,GAAG,QAAQ,CAAC;AAMrB,KAAK,UAAU,8BAA8B,CAAC,OAA4B;IAC7E,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"get_extra_data_type_manager.js","sourceRoot":"","sources":["../source/get_extra_data_type_manager.ts"],"names":[],"mappings":";;;AAAA,uDAAgF;AAChF,2DAAiF;AACjF,yEAGmC;AACnC,EAAE;AACF,uEAAiE;AACjE,6EAAuE;AAEvE,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;AAC3C,MAAM,UAAU,GAAG,QAAQ,CAAC;AAMrB,KAAK,UAAU,8BAA8B,CAAC,OAA4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2,5 +2,5 @@ import { ExtensionObject } from "node-opcua-extension-object";
|
|
|
2
2
|
import { Variant } from "node-opcua-variant";
|
|
3
3
|
import { IBasicSessionAsync2 } from "node-opcua-pseudo-session";
|
|
4
4
|
import { ExtraDataTypeManager } from "./extra_data_type_manager";
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function resolveOpaqueStructureInExtensionObject(session: IBasicSessionAsync2, dataTypeManager: ExtraDataTypeManager, object: ExtensionObject): Promise<void>;
|
|
6
6
|
export declare function resolveDynamicExtensionObject(session: IBasicSessionAsync2, variant: Variant, dataTypeManager: ExtraDataTypeManager): Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolveDynamicExtensionObject = exports.
|
|
3
|
+
exports.resolveDynamicExtensionObject = exports.resolveOpaqueStructureInExtensionObject = void 0;
|
|
4
4
|
const node_opcua_binary_stream_1 = require("node-opcua-binary-stream");
|
|
5
5
|
const node_opcua_extension_object_1 = require("node-opcua-extension-object");
|
|
6
6
|
const node_opcua_variant_1 = require("node-opcua-variant");
|
|
@@ -41,7 +41,7 @@ async function getOrExtractConstructor(session, binaryEncodingNodeId, dataTypeMa
|
|
|
41
41
|
}
|
|
42
42
|
return structureInfo.constructor;
|
|
43
43
|
}
|
|
44
|
-
async function
|
|
44
|
+
async function resolveOpaqueStructureInExtensionObject(session, dataTypeManager, object) {
|
|
45
45
|
const schema = object.schema;
|
|
46
46
|
async function fixOpaqueStructureOnElement(element, field, data, args) {
|
|
47
47
|
if (element instanceof node_opcua_variant_1.Variant) {
|
|
@@ -84,7 +84,7 @@ async function resolveOpaqueStructureInExtentionObject(session, dataTypeManager,
|
|
|
84
84
|
object.applyOnAllFields(fixOpaqueStructure, { dataTypeManager, promises });
|
|
85
85
|
await Promise.all(promises);
|
|
86
86
|
}
|
|
87
|
-
exports.
|
|
87
|
+
exports.resolveOpaqueStructureInExtensionObject = resolveOpaqueStructureInExtensionObject;
|
|
88
88
|
async function resolveDynamicExtensionObjectV(session, opaque, dataTypeManager) {
|
|
89
89
|
try {
|
|
90
90
|
const Constructor = await getOrExtractConstructor(session, opaque.nodeId, dataTypeManager);
|
|
@@ -92,7 +92,7 @@ async function resolveDynamicExtensionObjectV(session, opaque, dataTypeManager)
|
|
|
92
92
|
const stream = new node_opcua_binary_stream_1.BinaryStream(opaque.buffer);
|
|
93
93
|
try {
|
|
94
94
|
object.decode(stream);
|
|
95
|
-
await
|
|
95
|
+
await resolveOpaqueStructureInExtensionObject(session, dataTypeManager, object);
|
|
96
96
|
return object;
|
|
97
97
|
}
|
|
98
98
|
catch (err) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-opcua-client-dynamic-extension-object",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.119.2",
|
|
4
4
|
"description": "pure nodejs OPCUA SDK - module client-dynamic-extension-object",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -14,19 +14,19 @@
|
|
|
14
14
|
"node-opcua-assert": "2.105.0",
|
|
15
15
|
"node-opcua-binary-stream": "2.117.0",
|
|
16
16
|
"node-opcua-constants": "2.114.0",
|
|
17
|
-
"node-opcua-data-model": "2.
|
|
18
|
-
"node-opcua-data-value": "2.
|
|
17
|
+
"node-opcua-data-model": "2.119.0",
|
|
18
|
+
"node-opcua-data-value": "2.119.0",
|
|
19
19
|
"node-opcua-debug": "2.118.0",
|
|
20
|
-
"node-opcua-extension-object": "2.
|
|
21
|
-
"node-opcua-factory": "2.
|
|
20
|
+
"node-opcua-extension-object": "2.119.0",
|
|
21
|
+
"node-opcua-factory": "2.119.0",
|
|
22
22
|
"node-opcua-nodeid": "2.118.0",
|
|
23
|
-
"node-opcua-pseudo-session": "2.
|
|
24
|
-
"node-opcua-schemas": "2.
|
|
25
|
-
"node-opcua-service-browse": "2.
|
|
26
|
-
"node-opcua-service-translate-browse-path": "2.
|
|
23
|
+
"node-opcua-pseudo-session": "2.119.2",
|
|
24
|
+
"node-opcua-schemas": "2.119.2",
|
|
25
|
+
"node-opcua-service-browse": "2.119.2",
|
|
26
|
+
"node-opcua-service-translate-browse-path": "2.119.2",
|
|
27
27
|
"node-opcua-status-code": "2.117.0",
|
|
28
|
-
"node-opcua-types": "2.
|
|
29
|
-
"node-opcua-variant": "2.
|
|
28
|
+
"node-opcua-types": "2.119.2",
|
|
29
|
+
"node-opcua-variant": "2.119.0"
|
|
30
30
|
},
|
|
31
31
|
"author": "Etienne Rossignon",
|
|
32
32
|
"license": "MIT",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"internet of things"
|
|
44
44
|
],
|
|
45
45
|
"homepage": "http://node-opcua.github.io/",
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "cb434af1ed2fbe463822898df4addc2711abc462",
|
|
47
47
|
"files": [
|
|
48
48
|
"dist",
|
|
49
49
|
"source"
|
|
@@ -13,12 +13,12 @@ const debugLog = make_debugLog(__filename);
|
|
|
13
13
|
const errorLog = make_errorLog(__filename);
|
|
14
14
|
const warningLog = errorLog;
|
|
15
15
|
|
|
16
|
-
interface
|
|
16
|
+
interface IBasicSession_ extends IBasicSessionAsync2 {
|
|
17
17
|
$$extraDataTypeManager?: ExtraDataTypeManager;
|
|
18
18
|
$$extraDataTypeManagerToResolve?: [(a: ExtraDataTypeManager) => void, (err: Error) => void][];
|
|
19
19
|
}
|
|
20
20
|
export async function invalidateExtraDataTypeManager(session: IBasicSessionAsync2): Promise<void> {
|
|
21
|
-
const sessionPriv
|
|
21
|
+
const sessionPriv = session as IBasicSession_;
|
|
22
22
|
sessionPriv.$$extraDataTypeManager = undefined;
|
|
23
23
|
if (sessionPriv.$$extraDataTypeManagerToResolve) {
|
|
24
24
|
warningLog("Warning: invalidateExtraDataTypeManager is called while getExtraDataTypeManager is in progress");
|
|
@@ -50,7 +50,7 @@ async function extractDataTypeManager(session: IBasicSessionAsync2): Promise<Ext
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
export async function getExtraDataTypeManager(session: IBasicSessionAsync2): Promise<ExtraDataTypeManager> {
|
|
53
|
-
const sessionPriv:
|
|
53
|
+
const sessionPriv: IBasicSession_ = session as IBasicSession_;
|
|
54
54
|
if (sessionPriv.$$extraDataTypeManager) {
|
|
55
55
|
return sessionPriv.$$extraDataTypeManager;
|
|
56
56
|
}
|
|
@@ -53,7 +53,7 @@ async function getOrExtractConstructor(
|
|
|
53
53
|
return structureInfo.constructor;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
export async function
|
|
56
|
+
export async function resolveOpaqueStructureInExtensionObject(
|
|
57
57
|
session: IBasicSessionAsync2,
|
|
58
58
|
dataTypeManager: ExtraDataTypeManager,
|
|
59
59
|
object: ExtensionObject
|
|
@@ -124,7 +124,7 @@ async function resolveDynamicExtensionObjectV(
|
|
|
124
124
|
const stream = new BinaryStream(opaque.buffer);
|
|
125
125
|
try {
|
|
126
126
|
object.decode(stream);
|
|
127
|
-
await
|
|
127
|
+
await resolveOpaqueStructureInExtensionObject(session, dataTypeManager, object);
|
|
128
128
|
return object;
|
|
129
129
|
} catch (err) {
|
|
130
130
|
warningLog("Constructor = ", Constructor.name);
|