node-opcua-client-dynamic-extension-object
Advanced tools
Comparing version 2.1.2 to 2.1.3
@@ -19,2 +19,3 @@ "use strict"; | ||
const node_opcua_debug_1 = require("node-opcua-debug"); | ||
const node_opcua_factory_1 = require("node-opcua-factory"); | ||
const node_opcua_nodeid_1 = require("node-opcua-nodeid"); | ||
@@ -38,3 +39,3 @@ const node_opcua_schemas_1 = require("node-opcua-schemas"); | ||
} | ||
const typeDictionary = yield util_1.promisify(node_opcua_schemas_1.parseBinaryXSD)(rawSchema); | ||
const typeDictionary = yield util_1.promisify(node_opcua_schemas_1.parseBinaryXSD)(rawSchema, [node_opcua_factory_1.getStandartDataTypeFactory()]); | ||
return typeDictionary; | ||
@@ -41,0 +42,0 @@ }); |
@@ -0,1 +1,2 @@ | ||
import { DataTypeFactory } from "node-opcua-factory"; | ||
import { NodeId } from "node-opcua-nodeid"; | ||
@@ -12,2 +13,3 @@ import { AnyConstructorFunc, TypeDictionary } from "node-opcua-schemas"; | ||
getTypeDictionaryForNamespace(namespaceIndex: number): TypeDictionary; | ||
getDataTypeFactory(namespaceIndex: number): DataTypeFactory; | ||
getExtensionObjectConstructorFromDataType(dataTypeNodeId: NodeId): AnyConstructorFunc; | ||
@@ -14,0 +16,0 @@ getExtensionObjectConstructorFromBinaryEncoding(binaryEncodingNodeId: NodeId): AnyConstructorFunc; |
@@ -7,2 +7,3 @@ "use strict"; | ||
const node_opcua_assert_1 = require("node-opcua-assert"); | ||
const node_opcua_factory_1 = require("node-opcua-factory"); | ||
const node_opcua_schemas_1 = require("node-opcua-schemas"); | ||
@@ -36,2 +37,8 @@ class ExtraDataTypeManager { | ||
} | ||
getDataTypeFactory(namespaceIndex) { | ||
if (namespaceIndex === 0) { | ||
return node_opcua_factory_1.getStandartDataTypeFactory(); | ||
} | ||
return this.typeDictionariesByNamespace[namespaceIndex]; | ||
} | ||
getExtensionObjectConstructorFromDataType(dataTypeNodeId) { | ||
@@ -38,0 +45,0 @@ const typeDictionary = this.getTypeDictionaryForNamespace(dataTypeNodeId.namespace); |
{ | ||
"name": "node-opcua-client-dynamic-extension-object", | ||
"version": "2.1.2", | ||
"version": "2.1.3", | ||
"description": "pure nodejs OPCUA SDK - module -extension-object", | ||
@@ -15,13 +15,13 @@ "main": "./dist/index.js", | ||
"node-opcua-binary-stream": "^2.1.0", | ||
"node-opcua-data-model": "^2.1.2", | ||
"node-opcua-data-value": "^2.1.2", | ||
"node-opcua-data-model": "^2.1.3", | ||
"node-opcua-data-value": "^2.1.3", | ||
"node-opcua-debug": "^2.1.0", | ||
"node-opcua-extension-object": "^2.1.2", | ||
"node-opcua-factory": "^2.1.2", | ||
"node-opcua-nodeid": "^2.1.0", | ||
"node-opcua-pseudo-session": "^2.1.2", | ||
"node-opcua-schemas": "^2.1.2", | ||
"node-opcua-service-browse": "^2.1.2", | ||
"node-opcua-status-code": "^2.1.1", | ||
"node-opcua-variant": "^2.1.2" | ||
"node-opcua-extension-object": "^2.1.3", | ||
"node-opcua-factory": "^2.1.3", | ||
"node-opcua-nodeid": "^2.1.3", | ||
"node-opcua-pseudo-session": "^2.1.3", | ||
"node-opcua-schemas": "^2.1.3", | ||
"node-opcua-service-browse": "^2.1.3", | ||
"node-opcua-status-code": "^2.1.3", | ||
"node-opcua-variant": "^2.1.3" | ||
}, | ||
@@ -43,3 +43,3 @@ "author": "Etienne Rossignon", | ||
"homepage": "http://node-opcua.github.io/", | ||
"gitHead": "46c4676f5623126ee95c60c25bcdedd8091ba342" | ||
"gitHead": "a47d959488b88d80c6d4d339d08c80ccc5490ffd" | ||
} |
@@ -18,3 +18,4 @@ /** | ||
import { | ||
StructuredTypeSchema | ||
StructuredTypeSchema, | ||
getStandartDataTypeFactory | ||
} from "node-opcua-factory"; | ||
@@ -63,3 +64,3 @@ import { | ||
} | ||
const typeDictionary = await promisify(parseBinaryXSD)(rawSchema); | ||
const typeDictionary = await promisify(parseBinaryXSD)(rawSchema, [ getStandartDataTypeFactory() ]); | ||
return typeDictionary; | ||
@@ -66,0 +67,0 @@ } |
@@ -5,5 +5,13 @@ /** | ||
import assert from "node-opcua-assert"; | ||
import { StructuredTypeSchema } from "node-opcua-factory"; | ||
import { | ||
StructuredTypeSchema , | ||
getStandartDataTypeFactory, | ||
DataTypeFactory | ||
} from "node-opcua-factory"; | ||
import { NodeId } from "node-opcua-nodeid"; | ||
import { AnyConstructorFunc, createDynamicObjectConstructor, TypeDictionary } from "node-opcua-schemas"; | ||
import { | ||
AnyConstructorFunc, | ||
createDynamicObjectConstructor, | ||
TypeDictionary | ||
} from "node-opcua-schemas"; | ||
@@ -48,2 +56,8 @@ export class ExtraDataTypeManager { | ||
} | ||
public getDataTypeFactory(namespaceIndex: number): DataTypeFactory { | ||
if (namespaceIndex === 0) { | ||
return getStandartDataTypeFactory(); | ||
} | ||
return this.typeDictionariesByNamespace[namespaceIndex]; | ||
} | ||
@@ -50,0 +64,0 @@ public getExtensionObjectConstructorFromDataType( |
@@ -15,3 +15,2 @@ import { BinaryStream } from "node-opcua-binary-stream"; | ||
try { | ||
const namespaceUri = extraDataType.namespaceArray[opaque.nodeId.namespace]; | ||
@@ -18,0 +17,0 @@ const expandedNodeId = ExpandedNodeId.fromNodeId(opaque.nodeId, namespaceUri); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
62848
959
Updatednode-opcua-data-model@^2.1.3
Updatednode-opcua-data-value@^2.1.3
Updatednode-opcua-factory@^2.1.3
Updatednode-opcua-nodeid@^2.1.3
Updatednode-opcua-schemas@^2.1.3
Updatednode-opcua-variant@^2.1.3