node-opcua-factory 2.56.0 → 2.62.4
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/LICENSE +20 -20
- package/dist/factories_structuredTypeSchema.js +2 -2
- package/dist/factories_structuredTypeSchema.js.map +1 -1
- package/package.json +6 -6
- package/source/constructor_type.ts +18 -18
- package/source/factories_factories.ts +58 -58
- package/source/factories_structuredTypeSchema.ts +2 -2
- package/source/index.ts +15 -15
package/LICENSE
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2014-2021 Etienne Rossignon
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
-
the Software without restriction, including without limitation the rights to
|
|
8
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
-
subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
17
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
18
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
19
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
20
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2014-2021 Etienne Rossignon
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
+
the Software without restriction, including without limitation the rights to
|
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
+
subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -111,8 +111,8 @@ class StructuredTypeSchema extends types_1.TypeSchemaBase {
|
|
|
111
111
|
this.category = types_1.FieldCategory.basic;
|
|
112
112
|
}
|
|
113
113
|
this.fields = options.fields.map(buildField.bind(null, this));
|
|
114
|
-
this.id = node_opcua_nodeid_1.NodeId
|
|
115
|
-
this.dataTypeNodeId = node_opcua_nodeid_1.NodeId
|
|
114
|
+
this.id = new node_opcua_nodeid_1.NodeId();
|
|
115
|
+
this.dataTypeNodeId = new node_opcua_nodeid_1.NodeId();
|
|
116
116
|
this._possibleFields = this.fields.map((field) => field.name);
|
|
117
117
|
this._baseSchema = null;
|
|
118
118
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factories_structuredTypeSchema.js","sourceRoot":"","sources":["../source/factories_structuredTypeSchema.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,+BAA+B;AAE/B,yDAA2C;AAE3C,yDAA2D;AAC3D,uDAAoD;AAEpD,uEAA2E;AAC3E,qEAA0E;AAC1E,+DAAgH;AAChH,yEAAwD;AAExD,mCAAkI;AAGlI,SAAS,sBAAsB,CAAC,KAA4B;IACxD,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;IAElC,IAAI,KAAK,CAAC,QAAQ,EAAE;QAChB,OAAO,KAAK,CAAC,QAAQ,CAAC;KACzB;IAED,IAAI,IAAA,uCAAc,EAAC,SAAS,CAAC,EAAE;QAC3B,OAAO,qBAAa,CAAC,WAAW,CAAC;KACpC;SAAM,IAAI,IAAA,wCAAc,EAAC,SAAS,CAAC,EAAE;QAClC,OAAO,qBAAa,CAAC,KAAK,CAAC;KAC9B;SAAM,IAAI,IAAA,uCAAiB,EAAC,SAAS,CAAC,EAAE;QACrC,IAAA,0BAAM,EAAC,SAAS,KAAK,eAAe,CAAC,CAAC,CAAC,kDAAkD;QACzF,OAAO,qBAAa,CAAC,OAAO,CAAC;KAChC;IACD,OAAO,qBAAa,CAAC,KAAK,CAAC;AAC/B,CAAC;AAED,MAAM,MAAM,GAAG,oBAAoB,CAAC;AAEpC,SAAS,eAAe,CACpB,oBAA0C,EAC1C,KAA4B,EAC5B,QAAuB;IAEvB,IAAI,KAAK,CAAC,MAAM,EAAE;QACd,OAAO,KAAK,CAAC,MAAM,CAAC;KACvB;IAED,IAAI,oBAAoB,CAAC,IAAI,KAAK,KAAK,CAAC,SAAS,EAAE;QAC/C,OAAO,oBAAoB,CAAC;KAC/B;IAED,IAAI,WAAW,GAAQ,IAAI,CAAC;IAE5B,0FAA0F;IAC1F,MAAM,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC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gB,mBAAmB,CAAC,WAAkC;IAClE,OAAO,IAAI,oBAAoB,CAAC,WAAW,CAAC,CAAC;AACjD,CAAC;AAFD,kDAEC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-opcua-factory",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.62.4",
|
|
4
4
|
"description": "pure nodejs OPCUA SDK - module -factory",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"chalk": "4.1.2",
|
|
16
16
|
"node-opcua-assert": "2.55.0",
|
|
17
|
-
"node-opcua-basic-types": "2.
|
|
17
|
+
"node-opcua-basic-types": "2.62.4",
|
|
18
18
|
"node-opcua-binary-stream": "2.55.0",
|
|
19
|
-
"node-opcua-debug": "2.
|
|
19
|
+
"node-opcua-debug": "2.62.4",
|
|
20
20
|
"node-opcua-enum": "2.55.0",
|
|
21
21
|
"node-opcua-guid": "2.55.0",
|
|
22
|
-
"node-opcua-nodeid": "2.
|
|
22
|
+
"node-opcua-nodeid": "2.62.4",
|
|
23
23
|
"node-opcua-status-code": "2.56.0",
|
|
24
|
-
"node-opcua-utils": "2.
|
|
24
|
+
"node-opcua-utils": "2.60.0"
|
|
25
25
|
},
|
|
26
26
|
"author": "Etienne Rossignon",
|
|
27
27
|
"license": "MIT",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"internet of things"
|
|
39
39
|
],
|
|
40
40
|
"homepage": "http://node-opcua.github.io/",
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "b4cb2b2e4ce2b141614dbcb02a3e385c747ac1a1"
|
|
42
42
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module node-opcua-factory
|
|
3
|
-
*/
|
|
4
|
-
import { ExpandedNodeId } from "node-opcua-nodeid";
|
|
5
|
-
|
|
6
|
-
import { BaseUAObject } from "./factories_baseobject";
|
|
7
|
-
import { StructuredTypeSchema } from "./factories_structuredTypeSchema";
|
|
8
|
-
|
|
9
|
-
type BaseUAObjectConstructable = new (options?: any) => BaseUAObject;
|
|
10
|
-
export type ConstructorFunc = BaseUAObjectConstructable;
|
|
11
|
-
// new (...args: any[]) => BaseUAObjectConstructable;
|
|
12
|
-
|
|
13
|
-
export interface ConstructorFuncWithSchema extends ConstructorFunc {
|
|
14
|
-
schema: StructuredTypeSchema;
|
|
15
|
-
possibleFields: string[];
|
|
16
|
-
encodingDefaultBinary: ExpandedNodeId;
|
|
17
|
-
encodingDefaultXml: ExpandedNodeId;
|
|
18
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @module node-opcua-factory
|
|
3
|
+
*/
|
|
4
|
+
import { ExpandedNodeId } from "node-opcua-nodeid";
|
|
5
|
+
|
|
6
|
+
import { BaseUAObject } from "./factories_baseobject";
|
|
7
|
+
import { StructuredTypeSchema } from "./factories_structuredTypeSchema";
|
|
8
|
+
|
|
9
|
+
type BaseUAObjectConstructable = new (options?: any) => BaseUAObject;
|
|
10
|
+
export type ConstructorFunc = BaseUAObjectConstructable;
|
|
11
|
+
// new (...args: any[]) => BaseUAObjectConstructable;
|
|
12
|
+
|
|
13
|
+
export interface ConstructorFuncWithSchema extends ConstructorFunc {
|
|
14
|
+
schema: StructuredTypeSchema;
|
|
15
|
+
possibleFields: string[];
|
|
16
|
+
encodingDefaultBinary: ExpandedNodeId;
|
|
17
|
+
encodingDefaultXml: ExpandedNodeId;
|
|
18
|
+
}
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module node-opcua-factory
|
|
3
|
-
*/
|
|
4
|
-
// tslint:disable:no-console
|
|
5
|
-
|
|
6
|
-
import * as chalk from "chalk";
|
|
7
|
-
|
|
8
|
-
import { assert } from "node-opcua-assert";
|
|
9
|
-
import { checkDebugFlag, make_debugLog } from "node-opcua-debug";
|
|
10
|
-
import { ExpandedNodeId, NodeId } from "node-opcua-nodeid";
|
|
11
|
-
|
|
12
|
-
import { DataTypeFactory } from "./datatype_factory";
|
|
13
|
-
import { ConstructorFuncWithSchema, ConstructorFunc } from "./constructor_type";
|
|
14
|
-
|
|
15
|
-
import { BaseUAObject } from "./factories_baseobject";
|
|
16
|
-
import { StructuredTypeSchema } from "./factories_structuredTypeSchema";
|
|
17
|
-
|
|
18
|
-
const debugLog = make_debugLog(__filename);
|
|
19
|
-
const doDebug = checkDebugFlag(__filename);
|
|
20
|
-
|
|
21
|
-
let globalFactory: DataTypeFactory;
|
|
22
|
-
export function getStandardDataTypeFactory(): DataTypeFactory {
|
|
23
|
-
if (!globalFactory) {
|
|
24
|
-
globalFactory = new DataTypeFactory([]);
|
|
25
|
-
globalFactory.targetNamespace = "http://opcfoundation.org/UA/";
|
|
26
|
-
}
|
|
27
|
-
return globalFactory;
|
|
28
|
-
}
|
|
29
|
-
export function getStructureTypeConstructor(typeName: string): ConstructorFuncWithSchema {
|
|
30
|
-
return getStandardDataTypeFactory().getStructureTypeConstructor(typeName);
|
|
31
|
-
}
|
|
32
|
-
export function hasStructuredType(typeName: string): boolean {
|
|
33
|
-
return getStandardDataTypeFactory().hasStructuredType(typeName);
|
|
34
|
-
}
|
|
35
|
-
export function getStructuredTypeSchema(typeName: string): StructuredTypeSchema {
|
|
36
|
-
return getStandardDataTypeFactory().getStructuredTypeSchema(typeName);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export function getConstructor(binaryEncodingNodeId: ExpandedNodeId): ConstructorFunc | null {
|
|
40
|
-
return getStandardDataTypeFactory().getConstructor(binaryEncodingNodeId);
|
|
41
|
-
}
|
|
42
|
-
export function hasConstructor(binaryEncodingNodeId: ExpandedNodeId): boolean {
|
|
43
|
-
return getStandardDataTypeFactory().hasConstructor(binaryEncodingNodeId);
|
|
44
|
-
}
|
|
45
|
-
export function constructObject(binaryEncodingNodeId: ExpandedNodeId): BaseUAObject {
|
|
46
|
-
return getStandardDataTypeFactory().constructObject(binaryEncodingNodeId);
|
|
47
|
-
}
|
|
48
|
-
export function registerClassDefinition(
|
|
49
|
-
dataTypeNodeId: NodeId,
|
|
50
|
-
className: string,
|
|
51
|
-
classConstructor: ConstructorFuncWithSchema
|
|
52
|
-
): void {
|
|
53
|
-
return getStandardDataTypeFactory().registerClassDefinition(dataTypeNodeId, className, classConstructor);
|
|
54
|
-
}
|
|
55
|
-
/* istanbul ignore next */
|
|
56
|
-
export function dump(): void {
|
|
57
|
-
getStandardDataTypeFactory().dump();
|
|
58
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @module node-opcua-factory
|
|
3
|
+
*/
|
|
4
|
+
// tslint:disable:no-console
|
|
5
|
+
|
|
6
|
+
import * as chalk from "chalk";
|
|
7
|
+
|
|
8
|
+
import { assert } from "node-opcua-assert";
|
|
9
|
+
import { checkDebugFlag, make_debugLog } from "node-opcua-debug";
|
|
10
|
+
import { ExpandedNodeId, NodeId } from "node-opcua-nodeid";
|
|
11
|
+
|
|
12
|
+
import { DataTypeFactory } from "./datatype_factory";
|
|
13
|
+
import { ConstructorFuncWithSchema, ConstructorFunc } from "./constructor_type";
|
|
14
|
+
|
|
15
|
+
import { BaseUAObject } from "./factories_baseobject";
|
|
16
|
+
import { StructuredTypeSchema } from "./factories_structuredTypeSchema";
|
|
17
|
+
|
|
18
|
+
const debugLog = make_debugLog(__filename);
|
|
19
|
+
const doDebug = checkDebugFlag(__filename);
|
|
20
|
+
|
|
21
|
+
let globalFactory: DataTypeFactory;
|
|
22
|
+
export function getStandardDataTypeFactory(): DataTypeFactory {
|
|
23
|
+
if (!globalFactory) {
|
|
24
|
+
globalFactory = new DataTypeFactory([]);
|
|
25
|
+
globalFactory.targetNamespace = "http://opcfoundation.org/UA/";
|
|
26
|
+
}
|
|
27
|
+
return globalFactory;
|
|
28
|
+
}
|
|
29
|
+
export function getStructureTypeConstructor(typeName: string): ConstructorFuncWithSchema {
|
|
30
|
+
return getStandardDataTypeFactory().getStructureTypeConstructor(typeName);
|
|
31
|
+
}
|
|
32
|
+
export function hasStructuredType(typeName: string): boolean {
|
|
33
|
+
return getStandardDataTypeFactory().hasStructuredType(typeName);
|
|
34
|
+
}
|
|
35
|
+
export function getStructuredTypeSchema(typeName: string): StructuredTypeSchema {
|
|
36
|
+
return getStandardDataTypeFactory().getStructuredTypeSchema(typeName);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function getConstructor(binaryEncodingNodeId: ExpandedNodeId): ConstructorFunc | null {
|
|
40
|
+
return getStandardDataTypeFactory().getConstructor(binaryEncodingNodeId);
|
|
41
|
+
}
|
|
42
|
+
export function hasConstructor(binaryEncodingNodeId: ExpandedNodeId): boolean {
|
|
43
|
+
return getStandardDataTypeFactory().hasConstructor(binaryEncodingNodeId);
|
|
44
|
+
}
|
|
45
|
+
export function constructObject(binaryEncodingNodeId: ExpandedNodeId): BaseUAObject {
|
|
46
|
+
return getStandardDataTypeFactory().constructObject(binaryEncodingNodeId);
|
|
47
|
+
}
|
|
48
|
+
export function registerClassDefinition(
|
|
49
|
+
dataTypeNodeId: NodeId,
|
|
50
|
+
className: string,
|
|
51
|
+
classConstructor: ConstructorFuncWithSchema
|
|
52
|
+
): void {
|
|
53
|
+
return getStandardDataTypeFactory().registerClassDefinition(dataTypeNodeId, className, classConstructor);
|
|
54
|
+
}
|
|
55
|
+
/* istanbul ignore next */
|
|
56
|
+
export function dump(): void {
|
|
57
|
+
getStandardDataTypeFactory().dump();
|
|
58
|
+
}
|
|
@@ -160,8 +160,8 @@ export class StructuredTypeSchema extends TypeSchemaBase {
|
|
|
160
160
|
this.category = FieldCategory.basic;
|
|
161
161
|
}
|
|
162
162
|
this.fields = options.fields.map(buildField.bind(null, this));
|
|
163
|
-
this.id = NodeId
|
|
164
|
-
this.dataTypeNodeId = NodeId
|
|
163
|
+
this.id = new NodeId();
|
|
164
|
+
this.dataTypeNodeId = new NodeId();
|
|
165
165
|
|
|
166
166
|
this._possibleFields = this.fields.map((field) => field.name);
|
|
167
167
|
this._baseSchema = null;
|
package/source/index.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module node-opcua-factory
|
|
3
|
-
*/
|
|
4
|
-
export * from "./constructor_type";
|
|
5
|
-
export * from "./datatype_factory";
|
|
6
|
-
export * from "./factories_id_generator";
|
|
7
|
-
export * from "./factories_enumerations";
|
|
8
|
-
export * from "./factories_basic_type";
|
|
9
|
-
export * from "./factories_builtin_types";
|
|
10
|
-
export * from "./factories_builtin_types_special";
|
|
11
|
-
export * from "./factories_baseobject";
|
|
12
|
-
export * from "./types";
|
|
13
|
-
export * from "./factories_schema_helpers";
|
|
14
|
-
export * from "./factories_factories";
|
|
15
|
-
export * from "./factories_structuredTypeSchema";
|
|
1
|
+
/**
|
|
2
|
+
* @module node-opcua-factory
|
|
3
|
+
*/
|
|
4
|
+
export * from "./constructor_type";
|
|
5
|
+
export * from "./datatype_factory";
|
|
6
|
+
export * from "./factories_id_generator";
|
|
7
|
+
export * from "./factories_enumerations";
|
|
8
|
+
export * from "./factories_basic_type";
|
|
9
|
+
export * from "./factories_builtin_types";
|
|
10
|
+
export * from "./factories_builtin_types_special";
|
|
11
|
+
export * from "./factories_baseobject";
|
|
12
|
+
export * from "./types";
|
|
13
|
+
export * from "./factories_schema_helpers";
|
|
14
|
+
export * from "./factories_factories";
|
|
15
|
+
export * from "./factories_structuredTypeSchema";
|