node-opcua-factory
Advanced tools
Comparing version 2.5.0-alpha.5 to 2.5.0-alpha.6
import { ExpandedNodeId, NodeId } from "node-opcua-nodeid"; | ||
import { BasicTypeDefinition } from "."; | ||
import { ConstructorFunc, ConstructorFuncWithSchema } from "./constructor_type"; | ||
@@ -6,3 +7,2 @@ import { BaseUAObject } from "./factories_baseobject"; | ||
import { StructuredTypeSchema } from "./factories_structuredTypeSchema"; | ||
import { BasicTypeDefinition } from "."; | ||
export declare class DataTypeFactory { | ||
@@ -36,5 +36,5 @@ defaultByteOrder: string; | ||
associateWithBinaryEncoding(className: string, expandedNodeId: ExpandedNodeId): void; | ||
toString(): string; | ||
private _registerFactory; | ||
toString(): string; | ||
} | ||
export declare function callConstructor(constructor: ConstructorFunc): BaseUAObject; |
@@ -13,4 +13,4 @@ "use strict"; | ||
const factories_baseobject_1 = require("./factories_baseobject"); | ||
const factories_builtin_types_1 = require("./factories_builtin_types"); | ||
const factories_enumerations_1 = require("./factories_enumerations"); | ||
const factories_builtin_types_1 = require("./factories_builtin_types"); | ||
const debugLog = node_opcua_debug_1.make_debugLog(__filename); | ||
@@ -131,2 +131,3 @@ const doDebug = node_opcua_debug_1.checkDebugFlag(__filename); | ||
} | ||
console.log(Object.keys(this._structureTypeConstructorByNameMap).join(" ")); | ||
throw new Error("Cannot find StructureType constructor for " + typeName + " - it may be abstract, or it could be a basic type"); | ||
@@ -163,3 +164,3 @@ } | ||
else { | ||
console.log("warning ", dataTypeNodeId.toString, "name= ", className, " do not have binary encoding"); | ||
console.log("warning ", dataTypeNodeId.toString(), "name=", className, " do not have binary encoding"); | ||
} | ||
@@ -236,2 +237,10 @@ } | ||
} | ||
toString() { | ||
const l = []; | ||
function write(...args) { | ||
l.push(util.format.apply(util.format, args)); | ||
} | ||
dumpDataFactory(this, write); | ||
return l.join("\n"); | ||
} | ||
_registerFactory(dataTypeNodeId, typeName, constructor) { | ||
@@ -254,10 +263,2 @@ node_opcua_assert_1.assert(dataTypeNodeId.value !== 0, "dataTypeNodeId cannot be null"); | ||
} | ||
toString() { | ||
const l = []; | ||
function write(...args) { | ||
l.push(util.format.apply(util.format, args)); | ||
} | ||
dumpDataFactory(this, write); | ||
return l.join("\n"); | ||
} | ||
} | ||
@@ -264,0 +265,0 @@ exports.DataTypeFactory = DataTypeFactory; |
{ | ||
"name": "node-opcua-factory", | ||
"version": "2.5.0-alpha.5", | ||
"version": "2.5.0-alpha.6", | ||
"description": "pure nodejs OPCUA SDK - module -factory", | ||
@@ -15,3 +15,3 @@ "main": "./dist/index.js", | ||
"node-opcua-assert": "^2.5.0-alpha.4", | ||
"node-opcua-basic-types": "^2.5.0-alpha.4", | ||
"node-opcua-basic-types": "^2.5.0-alpha.6", | ||
"node-opcua-binary-stream": "^2.5.0-alpha.4", | ||
@@ -23,3 +23,3 @@ "node-opcua-debug": "^2.5.0-alpha.4", | ||
"node-opcua-status-code": "^2.5.0-alpha.4", | ||
"node-opcua-utils": "^2.5.0-alpha.4", | ||
"node-opcua-utils": "^2.5.0-alpha.6", | ||
"underscore": "^1.9.2" | ||
@@ -42,3 +42,3 @@ }, | ||
"homepage": "http://node-opcua.github.io/", | ||
"gitHead": "07dcdd8e8c7f2b55544c6e23023093e35674829c" | ||
"gitHead": "df16503b0a7738500ccba7daec3952f898764371" | ||
} |
@@ -13,9 +13,15 @@ /** | ||
import { BasicTypeDefinition } from "."; | ||
import { ConstructorFunc, ConstructorFuncWithSchema } from "./constructor_type"; | ||
import { BaseUAObject } from "./factories_baseobject"; | ||
import { EnumerationDefinitionSchema, hasEnumeration, getEnumeration } from "./factories_enumerations"; | ||
import { | ||
getBuildInType, | ||
hasBuiltInType, | ||
} from "./factories_builtin_types"; | ||
import { | ||
EnumerationDefinitionSchema, | ||
getEnumeration, | ||
hasEnumeration | ||
} from "./factories_enumerations"; | ||
import { StructuredTypeSchema } from "./factories_structuredTypeSchema"; | ||
import { hasBuiltInType, getBuildInType } from "./factories_builtin_types"; | ||
import { BasicTypeDefinition } from "."; | ||
import { link } from "fs"; | ||
@@ -154,2 +160,3 @@ const debugLog = make_debugLog(__filename); | ||
} | ||
console.log(Object.keys(this._structureTypeConstructorByNameMap).join(" ")); | ||
throw new Error("Cannot find StructureType constructor for " + typeName + " - it may be abstract, or it could be a basic type"); | ||
@@ -187,3 +194,4 @@ } | ||
} else { | ||
console.log("warning ", dataTypeNodeId.toString, "name= ", className, " do not have binary encoding"); | ||
console.log("warning ", dataTypeNodeId.toString(), | ||
"name=", className, " do not have binary encoding"); | ||
} | ||
@@ -270,2 +278,11 @@ } | ||
public toString(): string { | ||
const l: string[] = []; | ||
function write(...args: [any, ...any[]]) { | ||
l.push(util.format.apply(util.format, args)); | ||
} | ||
dumpDataFactory(this, write); | ||
return l.join("\n"); | ||
} | ||
private _registerFactory(dataTypeNodeId: NodeId, typeName: string, constructor: ConstructorFuncWithSchema): void { | ||
@@ -289,10 +306,2 @@ assert(dataTypeNodeId.value !== 0, "dataTypeNodeId cannot be null"); | ||
public toString(): string { | ||
const l: string[] = []; | ||
function write(...args: [any, ...any[]]) { | ||
l.push(util.format.apply(util.format, args)); | ||
} | ||
dumpDataFactory(this, write); | ||
return l.join("\n"); | ||
} | ||
} | ||
@@ -299,0 +308,0 @@ |
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
218686
4050