node-opcua-factory
Advanced tools
Comparing version 2.47.0 to 2.49.0
@@ -26,2 +26,3 @@ import { ExpandedNodeId, NodeId } from "node-opcua-nodeid"; | ||
findConstructorForDataType(dataTypeNodeId: NodeId): ConstructorFuncWithSchema; | ||
getConstructorForDataType(dataTypeNodeId: NodeId): ConstructorFuncWithSchema | null; | ||
structuredTypesNames(): IterableIterator<string>; | ||
@@ -28,0 +29,0 @@ getStructureTypeConstructor(typeName: string): ConstructorFuncWithSchema; |
@@ -104,2 +104,10 @@ "use strict"; | ||
findConstructorForDataType(dataTypeNodeId) { | ||
const constructor = this.getConstructorForDataType(dataTypeNodeId); | ||
if (constructor) { | ||
return constructor; | ||
} | ||
this.getConstructorForDataType(dataTypeNodeId); | ||
throw new Error("Cannot find StructureType constructor for dataType " + dataTypeNodeId.toString()); | ||
} | ||
getConstructorForDataType(dataTypeNodeId) { | ||
const constructor = this._structureTypeConstructorByDataTypeMap.get(dataTypeNodeId.toString()); | ||
@@ -110,3 +118,3 @@ if (constructor) { | ||
for (const factory of this.baseDataFactories) { | ||
const constructor2 = factory.findConstructorForDataType(dataTypeNodeId); | ||
const constructor2 = factory.getConstructorForDataType(dataTypeNodeId); | ||
if (constructor2) { | ||
@@ -116,3 +124,3 @@ return constructor2; | ||
} | ||
throw new Error("Cannot find StructureType constructor for dataType " + dataTypeNodeId.toString()); | ||
return null; | ||
} | ||
@@ -290,3 +298,3 @@ // ---------------------------------------------------------------------------------------------------- | ||
write("structureTypeName =", structureTypeName); | ||
if (!dataFactory.findConstructorForDataType(schema.dataTypeNodeId)) { | ||
if (!dataFactory.getConstructorForDataType(schema.dataTypeNodeId)) { | ||
write(" ( No constructor for " + schema.name + " " + schema.dataTypeNodeId.toString()); | ||
@@ -293,0 +301,0 @@ } |
{ | ||
"name": "node-opcua-factory", | ||
"version": "2.47.0", | ||
"version": "2.49.0", | ||
"description": "pure nodejs OPCUA SDK - module -factory", | ||
@@ -40,3 +40,3 @@ "main": "./dist/index.js", | ||
"homepage": "http://node-opcua.github.io/", | ||
"gitHead": "bc0fd185f4905cd03c83c7a278365424f2b46bac" | ||
"gitHead": "81654553c6d317fd918ca99b749550eb5e951c23" | ||
} |
@@ -0,0 +0,0 @@ /** |
@@ -119,2 +119,10 @@ /** | ||
public findConstructorForDataType(dataTypeNodeId: NodeId): ConstructorFuncWithSchema { | ||
const constructor = this.getConstructorForDataType(dataTypeNodeId); | ||
if (constructor) { | ||
return constructor; | ||
} | ||
this.getConstructorForDataType(dataTypeNodeId); | ||
throw new Error("Cannot find StructureType constructor for dataType " + dataTypeNodeId.toString()); | ||
} | ||
public getConstructorForDataType(dataTypeNodeId: NodeId): ConstructorFuncWithSchema | null { | ||
const constructor = this._structureTypeConstructorByDataTypeMap.get(dataTypeNodeId.toString()); | ||
@@ -125,3 +133,3 @@ if (constructor) { | ||
for (const factory of this.baseDataFactories) { | ||
const constructor2 = factory.findConstructorForDataType(dataTypeNodeId); | ||
const constructor2 = factory.getConstructorForDataType(dataTypeNodeId); | ||
if (constructor2) { | ||
@@ -131,3 +139,3 @@ return constructor2; | ||
} | ||
throw new Error("Cannot find StructureType constructor for dataType " + dataTypeNodeId.toString()); | ||
return null; | ||
} | ||
@@ -328,3 +336,3 @@ // ---------------------------------------------------------------------------------------------------- | ||
if (!dataFactory.findConstructorForDataType(schema.dataTypeNodeId)) { | ||
if (!dataFactory.getConstructorForDataType(schema.dataTypeNodeId)) { | ||
write(" ( No constructor for " + schema.name + " " + schema.dataTypeNodeId.toString()); | ||
@@ -331,0 +339,0 @@ } |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
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
4391
236061