node-opcua-factory 2.73.1 → 2.76.0
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 +3 -1
- package/dist/base_ua_object.d.ts +53 -53
- package/dist/base_ua_object.js +535 -535
- package/dist/basic_type.d.ts +40 -40
- package/dist/basic_type.js +118 -118
- package/dist/builtin_types.d.ts +46 -46
- package/dist/builtin_types.js +283 -283
- package/dist/builtin_types_special.d.ts +5 -5
- package/dist/builtin_types_special.js +45 -45
- package/dist/datatype_factory.d.ts +36 -36
- package/dist/datatype_factory.js +307 -305
- package/dist/datatype_factory.js.map +1 -1
- package/dist/encode_decode.d.ts +9 -9
- package/dist/encode_decode.js +39 -39
- package/dist/enumerations.d.ts +32 -32
- package/dist/enumerations.js +77 -77
- package/dist/get_built_in_type.js +1 -1
- package/dist/get_standard_data_type_factory.d.ts +12 -12
- package/dist/get_standard_data_type_factory.js +34 -34
- package/dist/get_structured_type_schema.d.ts +4 -4
- package/dist/get_structured_type_schema.js +12 -12
- package/dist/id_generator.d.ts +3 -3
- package/dist/id_generator.js +21 -21
- package/dist/index.d.ts +18 -18
- package/dist/index.js +34 -34
- package/dist/nodeid_type.d.ts +13 -13
- package/dist/nodeid_type.js +18 -18
- package/dist/parameters.d.ts +3 -3
- package/dist/parameters.js +6 -6
- package/dist/register_class_definition.d.ts +3 -3
- package/dist/register_class_definition.js +8 -8
- package/dist/schema_helpers.d.ts +24 -24
- package/dist/schema_helpers.js +99 -99
- package/dist/structured_type_schema.d.ts +44 -44
- package/dist/structured_type_schema.js +278 -278
- package/dist/types.d.ts +151 -151
- package/dist/types.js +9 -9
- package/package.json +15 -12
- package/source/datatype_factory.ts +8 -5
- package/dist/constructor_type.d.ts +0 -15
- package/dist/constructor_type.js +0 -3
- package/dist/constructor_type.js.map +0 -1
- package/dist/factories_baseobject.d.ts +0 -56
- package/dist/factories_baseobject.js +0 -535
- package/dist/factories_baseobject.js.map +0 -1
- package/dist/factories_basic_type.d.ts +0 -40
- package/dist/factories_basic_type.js +0 -136
- package/dist/factories_basic_type.js.map +0 -1
- package/dist/factories_builtin_types.d.ts +0 -32
- package/dist/factories_builtin_types.js +0 -262
- package/dist/factories_builtin_types.js.map +0 -1
- package/dist/factories_builtin_types_special.d.ts +0 -5
- package/dist/factories_builtin_types_special.js +0 -46
- package/dist/factories_builtin_types_special.js.map +0 -1
- package/dist/factories_enumerations.d.ts +0 -31
- package/dist/factories_enumerations.js +0 -78
- package/dist/factories_enumerations.js.map +0 -1
- package/dist/factories_factories.d.ts +0 -17
- package/dist/factories_factories.js +0 -54
- package/dist/factories_factories.js.map +0 -1
- package/dist/factories_id_generator.d.ts +0 -3
- package/dist/factories_id_generator.js +0 -22
- package/dist/factories_id_generator.js.map +0 -1
- package/dist/factories_schema_helpers.d.ts +0 -27
- package/dist/factories_schema_helpers.js +0 -122
- package/dist/factories_schema_helpers.js.map +0 -1
- package/dist/factories_structuredTypeSchema.d.ts +0 -45
- package/dist/factories_structuredTypeSchema.js +0 -277
- package/dist/factories_structuredTypeSchema.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datatype_factory.js","sourceRoot":"","sources":["../source/datatype_factory.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,6BAA6B;AAC7B,+BAA+B;AAE/B,yDAA2C;AAC3C,
|
|
1
|
+
{"version":3,"file":"datatype_factory.js","sourceRoot":"","sources":["../source/datatype_factory.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,6BAA6B;AAC7B,+BAA+B;AAE/B,yDAA2C;AAC3C,uDAAkF;AAElF,+DAAmD;AAEnD,mDAAmF;AACnF,iDAA2G;AAU3G,MAAM,QAAQ,GAAG,IAAA,gCAAa,EAAC,UAAU,CAAC,CAAC;AAC3C,MAAM,OAAO,GAAG,IAAA,iCAAc,EAAC,UAAU,CAAC,CAAC;AAC3C,MAAM,UAAU,GAAG,IAAA,kCAAe,EAAC,UAAU,CAA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,QAAQ,EAAE,CAAC;AACrC,CAAC"}
|
package/dist/encode_decode.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { OutputBinaryStream, BinaryStream } from "node-opcua-binary-stream";
|
|
2
|
-
export declare function defaultEncode(value: any, stream: OutputBinaryStream): void;
|
|
3
|
-
export declare function defaultDecode(stream: BinaryStream): any;
|
|
4
|
-
export declare function defaultGuidValue(): any;
|
|
5
|
-
export declare function toJSONGuid(value: any): any;
|
|
6
|
-
export declare function encodeAny(value: any, stream: OutputBinaryStream): void;
|
|
7
|
-
export declare function decodeAny(stream: BinaryStream): void;
|
|
8
|
-
export declare function encodeNull(value: any, stream: OutputBinaryStream): void;
|
|
9
|
-
export declare function decodeNull(stream: BinaryStream): any;
|
|
1
|
+
import { OutputBinaryStream, BinaryStream } from "node-opcua-binary-stream";
|
|
2
|
+
export declare function defaultEncode(value: any, stream: OutputBinaryStream): void;
|
|
3
|
+
export declare function defaultDecode(stream: BinaryStream): any;
|
|
4
|
+
export declare function defaultGuidValue(): any;
|
|
5
|
+
export declare function toJSONGuid(value: any): any;
|
|
6
|
+
export declare function encodeAny(value: any, stream: OutputBinaryStream): void;
|
|
7
|
+
export declare function decodeAny(stream: BinaryStream): void;
|
|
8
|
+
export declare function encodeNull(value: any, stream: OutputBinaryStream): void;
|
|
9
|
+
export declare function decodeNull(stream: BinaryStream): any;
|
package/dist/encode_decode.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.decodeNull = exports.encodeNull = exports.decodeAny = exports.encodeAny = exports.toJSONGuid = exports.defaultGuidValue = exports.defaultDecode = exports.defaultEncode = void 0;
|
|
4
|
-
const node_opcua_assert_1 = require("node-opcua-assert");
|
|
5
|
-
function defaultEncode(value, stream) {
|
|
6
|
-
/** */
|
|
7
|
-
}
|
|
8
|
-
exports.defaultEncode = defaultEncode;
|
|
9
|
-
function defaultDecode(stream) {
|
|
10
|
-
return null;
|
|
11
|
-
}
|
|
12
|
-
exports.defaultDecode = defaultDecode;
|
|
13
|
-
function defaultGuidValue() {
|
|
14
|
-
return Buffer.alloc(0);
|
|
15
|
-
}
|
|
16
|
-
exports.defaultGuidValue = defaultGuidValue;
|
|
17
|
-
function toJSONGuid(value) {
|
|
18
|
-
if (typeof value === "string") {
|
|
19
|
-
return value;
|
|
20
|
-
}
|
|
21
|
-
(0, node_opcua_assert_1.default)(value instanceof Buffer);
|
|
22
|
-
return value.toString("base64");
|
|
23
|
-
}
|
|
24
|
-
exports.toJSONGuid = toJSONGuid;
|
|
25
|
-
function encodeAny(value, stream) {
|
|
26
|
-
(0, node_opcua_assert_1.default)(false, "type 'Any' cannot be encoded");
|
|
27
|
-
}
|
|
28
|
-
exports.encodeAny = encodeAny;
|
|
29
|
-
function decodeAny(stream) {
|
|
30
|
-
(0, node_opcua_assert_1.default)(false, "type 'Any' cannot be decoded");
|
|
31
|
-
}
|
|
32
|
-
exports.decodeAny = decodeAny;
|
|
33
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
34
|
-
function encodeNull(value, stream) { }
|
|
35
|
-
exports.encodeNull = encodeNull;
|
|
36
|
-
function decodeNull(stream) {
|
|
37
|
-
return null;
|
|
38
|
-
}
|
|
39
|
-
exports.decodeNull = decodeNull;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.decodeNull = exports.encodeNull = exports.decodeAny = exports.encodeAny = exports.toJSONGuid = exports.defaultGuidValue = exports.defaultDecode = exports.defaultEncode = void 0;
|
|
4
|
+
const node_opcua_assert_1 = require("node-opcua-assert");
|
|
5
|
+
function defaultEncode(value, stream) {
|
|
6
|
+
/** */
|
|
7
|
+
}
|
|
8
|
+
exports.defaultEncode = defaultEncode;
|
|
9
|
+
function defaultDecode(stream) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
exports.defaultDecode = defaultDecode;
|
|
13
|
+
function defaultGuidValue() {
|
|
14
|
+
return Buffer.alloc(0);
|
|
15
|
+
}
|
|
16
|
+
exports.defaultGuidValue = defaultGuidValue;
|
|
17
|
+
function toJSONGuid(value) {
|
|
18
|
+
if (typeof value === "string") {
|
|
19
|
+
return value;
|
|
20
|
+
}
|
|
21
|
+
(0, node_opcua_assert_1.default)(value instanceof Buffer);
|
|
22
|
+
return value.toString("base64");
|
|
23
|
+
}
|
|
24
|
+
exports.toJSONGuid = toJSONGuid;
|
|
25
|
+
function encodeAny(value, stream) {
|
|
26
|
+
(0, node_opcua_assert_1.default)(false, "type 'Any' cannot be encoded");
|
|
27
|
+
}
|
|
28
|
+
exports.encodeAny = encodeAny;
|
|
29
|
+
function decodeAny(stream) {
|
|
30
|
+
(0, node_opcua_assert_1.default)(false, "type 'Any' cannot be decoded");
|
|
31
|
+
}
|
|
32
|
+
exports.decodeAny = decodeAny;
|
|
33
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
34
|
+
function encodeNull(value, stream) { }
|
|
35
|
+
exports.encodeNull = encodeNull;
|
|
36
|
+
function decodeNull(stream) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
exports.decodeNull = decodeNull;
|
|
40
40
|
//# sourceMappingURL=encode_decode.js.map
|
package/dist/enumerations.d.ts
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { BinaryStream, OutputBinaryStream } from "node-opcua-binary-stream";
|
|
2
|
-
import { Enum, EnumItem, _TypescriptEnum } from "node-opcua-enum";
|
|
3
|
-
import { TypeSchemaBase } from "./builtin_types";
|
|
4
|
-
import { EnumerationDefinition, TypeSchemaConstructorOptions } from "./types";
|
|
5
|
-
export interface EnumerationDefinitionOptions extends TypeSchemaConstructorOptions {
|
|
6
|
-
enumValues: _TypescriptEnum | string[];
|
|
7
|
-
typedEnum?: Enum;
|
|
8
|
-
lengthInBits?: number;
|
|
9
|
-
defaultValue?: EnumItem;
|
|
10
|
-
encode?: (value: EnumItem, stream: OutputBinaryStream) => void;
|
|
11
|
-
decode?: (stream: BinaryStream) => EnumItem;
|
|
12
|
-
}
|
|
13
|
-
export declare class EnumerationDefinitionSchema extends TypeSchemaBase implements EnumerationDefinition {
|
|
14
|
-
enumValues: _TypescriptEnum;
|
|
15
|
-
typedEnum: Enum;
|
|
16
|
-
lengthInBits: number;
|
|
17
|
-
constructor(options: EnumerationDefinitionOptions);
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* @method registerEnumeration
|
|
21
|
-
* @param options
|
|
22
|
-
* @param options.name {string}
|
|
23
|
-
* @param options.enumValues [{key:Name, value:values}]
|
|
24
|
-
* @param options.encode
|
|
25
|
-
* @param options.decode
|
|
26
|
-
* @param options.typedEnum
|
|
27
|
-
* @param options.defaultValue
|
|
28
|
-
* @return {Enum}
|
|
29
|
-
*/
|
|
30
|
-
export declare function registerEnumeration(options: EnumerationDefinitionOptions): Enum;
|
|
31
|
-
export declare function hasBuiltInEnumeration(enumerationName: string): boolean;
|
|
32
|
-
export declare function getBuiltInEnumeration(enumerationName: string): EnumerationDefinitionSchema;
|
|
1
|
+
import { BinaryStream, OutputBinaryStream } from "node-opcua-binary-stream";
|
|
2
|
+
import { Enum, EnumItem, _TypescriptEnum } from "node-opcua-enum";
|
|
3
|
+
import { TypeSchemaBase } from "./builtin_types";
|
|
4
|
+
import { EnumerationDefinition, TypeSchemaConstructorOptions } from "./types";
|
|
5
|
+
export interface EnumerationDefinitionOptions extends TypeSchemaConstructorOptions {
|
|
6
|
+
enumValues: _TypescriptEnum | string[];
|
|
7
|
+
typedEnum?: Enum;
|
|
8
|
+
lengthInBits?: number;
|
|
9
|
+
defaultValue?: EnumItem;
|
|
10
|
+
encode?: (value: EnumItem, stream: OutputBinaryStream) => void;
|
|
11
|
+
decode?: (stream: BinaryStream) => EnumItem;
|
|
12
|
+
}
|
|
13
|
+
export declare class EnumerationDefinitionSchema extends TypeSchemaBase implements EnumerationDefinition {
|
|
14
|
+
enumValues: _TypescriptEnum;
|
|
15
|
+
typedEnum: Enum;
|
|
16
|
+
lengthInBits: number;
|
|
17
|
+
constructor(options: EnumerationDefinitionOptions);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @method registerEnumeration
|
|
21
|
+
* @param options
|
|
22
|
+
* @param options.name {string}
|
|
23
|
+
* @param options.enumValues [{key:Name, value:values}]
|
|
24
|
+
* @param options.encode
|
|
25
|
+
* @param options.decode
|
|
26
|
+
* @param options.typedEnum
|
|
27
|
+
* @param options.defaultValue
|
|
28
|
+
* @return {Enum}
|
|
29
|
+
*/
|
|
30
|
+
export declare function registerEnumeration(options: EnumerationDefinitionOptions): Enum;
|
|
31
|
+
export declare function hasBuiltInEnumeration(enumerationName: string): boolean;
|
|
32
|
+
export declare function getBuiltInEnumeration(enumerationName: string): EnumerationDefinitionSchema;
|
package/dist/enumerations.js
CHANGED
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getBuiltInEnumeration = exports.hasBuiltInEnumeration = exports.registerEnumeration = exports.EnumerationDefinitionSchema = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* @module node-opcua-factory
|
|
6
|
-
*/
|
|
7
|
-
const node_opcua_assert_1 = require("node-opcua-assert");
|
|
8
|
-
const node_opcua_enum_1 = require("node-opcua-enum");
|
|
9
|
-
const builtin_types_1 = require("./builtin_types");
|
|
10
|
-
function _encode_enumeration(typedEnum, value, stream) {
|
|
11
|
-
(0, node_opcua_assert_1.assert)(typeof value === "number", "Expecting a number here");
|
|
12
|
-
(0, node_opcua_assert_1.assert)(typedEnum.get(value) !== undefined, "expecting a valid value");
|
|
13
|
-
stream.writeInteger(value);
|
|
14
|
-
}
|
|
15
|
-
function _decode_enumeration(typedEnum, stream) {
|
|
16
|
-
const value = stream.readInteger();
|
|
17
|
-
const e = typedEnum.get(value);
|
|
18
|
-
// istanbul ignore next
|
|
19
|
-
if (!e) {
|
|
20
|
-
throw new Error("cannot coerce value=" + value + " to " + typedEnum.constructor.name);
|
|
21
|
-
}
|
|
22
|
-
return value;
|
|
23
|
-
}
|
|
24
|
-
class EnumerationDefinitionSchema extends builtin_types_1.TypeSchemaBase {
|
|
25
|
-
// xx encode: (value: EnumItem, stream: OutputBinaryStream) => void;
|
|
26
|
-
// xx decode: (stream: BinaryStream) => EnumItem;
|
|
27
|
-
constructor(options) {
|
|
28
|
-
super(options);
|
|
29
|
-
// create a new Enum
|
|
30
|
-
this.enumValues = (0, node_opcua_enum_1.adaptTypescriptEnum)(options.enumValues);
|
|
31
|
-
const typedEnum = new node_opcua_enum_1.Enum(options.enumValues);
|
|
32
|
-
options.typedEnum = typedEnum;
|
|
33
|
-
(0, node_opcua_assert_1.assert)(!options.encode || typeof options.encode === "function");
|
|
34
|
-
(0, node_opcua_assert_1.assert)(!options.decode || typeof options.decode === "function");
|
|
35
|
-
this.encode = options.encode || _encode_enumeration.bind(null, typedEnum);
|
|
36
|
-
this.decode = options.decode || _decode_enumeration.bind(null, typedEnum);
|
|
37
|
-
this.typedEnum = options.typedEnum;
|
|
38
|
-
this.defaultValue = this.typedEnum.getDefaultValue().value;
|
|
39
|
-
this.lengthInBits = options.lengthInBits || 32;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
exports.EnumerationDefinitionSchema = EnumerationDefinitionSchema;
|
|
43
|
-
const _enumerations = new Map();
|
|
44
|
-
/**
|
|
45
|
-
* @method registerEnumeration
|
|
46
|
-
* @param options
|
|
47
|
-
* @param options.name {string}
|
|
48
|
-
* @param options.enumValues [{key:Name, value:values}]
|
|
49
|
-
* @param options.encode
|
|
50
|
-
* @param options.decode
|
|
51
|
-
* @param options.typedEnum
|
|
52
|
-
* @param options.defaultValue
|
|
53
|
-
* @return {Enum}
|
|
54
|
-
*/
|
|
55
|
-
function registerEnumeration(options) {
|
|
56
|
-
(0, node_opcua_assert_1.assert)(Object.prototype.hasOwnProperty.call(options, "name"));
|
|
57
|
-
(0, node_opcua_assert_1.assert)(Object.prototype.hasOwnProperty.call(options, "enumValues"));
|
|
58
|
-
const name = options.name;
|
|
59
|
-
if (Object.prototype.hasOwnProperty.call(_enumerations, name)) {
|
|
60
|
-
throw new Error("factories.registerEnumeration : Enumeration " + options.name + " has been already inserted");
|
|
61
|
-
}
|
|
62
|
-
const enumerationDefinition = new EnumerationDefinitionSchema(options);
|
|
63
|
-
_enumerations.set(name, enumerationDefinition);
|
|
64
|
-
return enumerationDefinition.typedEnum;
|
|
65
|
-
}
|
|
66
|
-
exports.registerEnumeration = registerEnumeration;
|
|
67
|
-
function hasBuiltInEnumeration(enumerationName) {
|
|
68
|
-
return _enumerations.has(enumerationName);
|
|
69
|
-
}
|
|
70
|
-
exports.hasBuiltInEnumeration = hasBuiltInEnumeration;
|
|
71
|
-
function getBuiltInEnumeration(enumerationName) {
|
|
72
|
-
if (!hasBuiltInEnumeration(enumerationName)) {
|
|
73
|
-
throw new Error("Cannot find enumeration with type " + enumerationName);
|
|
74
|
-
}
|
|
75
|
-
return _enumerations.get(enumerationName);
|
|
76
|
-
}
|
|
77
|
-
exports.getBuiltInEnumeration = getBuiltInEnumeration;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getBuiltInEnumeration = exports.hasBuiltInEnumeration = exports.registerEnumeration = exports.EnumerationDefinitionSchema = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* @module node-opcua-factory
|
|
6
|
+
*/
|
|
7
|
+
const node_opcua_assert_1 = require("node-opcua-assert");
|
|
8
|
+
const node_opcua_enum_1 = require("node-opcua-enum");
|
|
9
|
+
const builtin_types_1 = require("./builtin_types");
|
|
10
|
+
function _encode_enumeration(typedEnum, value, stream) {
|
|
11
|
+
(0, node_opcua_assert_1.assert)(typeof value === "number", "Expecting a number here");
|
|
12
|
+
(0, node_opcua_assert_1.assert)(typedEnum.get(value) !== undefined, "expecting a valid value");
|
|
13
|
+
stream.writeInteger(value);
|
|
14
|
+
}
|
|
15
|
+
function _decode_enumeration(typedEnum, stream) {
|
|
16
|
+
const value = stream.readInteger();
|
|
17
|
+
const e = typedEnum.get(value);
|
|
18
|
+
// istanbul ignore next
|
|
19
|
+
if (!e) {
|
|
20
|
+
throw new Error("cannot coerce value=" + value + " to " + typedEnum.constructor.name);
|
|
21
|
+
}
|
|
22
|
+
return value;
|
|
23
|
+
}
|
|
24
|
+
class EnumerationDefinitionSchema extends builtin_types_1.TypeSchemaBase {
|
|
25
|
+
// xx encode: (value: EnumItem, stream: OutputBinaryStream) => void;
|
|
26
|
+
// xx decode: (stream: BinaryStream) => EnumItem;
|
|
27
|
+
constructor(options) {
|
|
28
|
+
super(options);
|
|
29
|
+
// create a new Enum
|
|
30
|
+
this.enumValues = (0, node_opcua_enum_1.adaptTypescriptEnum)(options.enumValues);
|
|
31
|
+
const typedEnum = new node_opcua_enum_1.Enum(options.enumValues);
|
|
32
|
+
options.typedEnum = typedEnum;
|
|
33
|
+
(0, node_opcua_assert_1.assert)(!options.encode || typeof options.encode === "function");
|
|
34
|
+
(0, node_opcua_assert_1.assert)(!options.decode || typeof options.decode === "function");
|
|
35
|
+
this.encode = options.encode || _encode_enumeration.bind(null, typedEnum);
|
|
36
|
+
this.decode = options.decode || _decode_enumeration.bind(null, typedEnum);
|
|
37
|
+
this.typedEnum = options.typedEnum;
|
|
38
|
+
this.defaultValue = this.typedEnum.getDefaultValue().value;
|
|
39
|
+
this.lengthInBits = options.lengthInBits || 32;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.EnumerationDefinitionSchema = EnumerationDefinitionSchema;
|
|
43
|
+
const _enumerations = new Map();
|
|
44
|
+
/**
|
|
45
|
+
* @method registerEnumeration
|
|
46
|
+
* @param options
|
|
47
|
+
* @param options.name {string}
|
|
48
|
+
* @param options.enumValues [{key:Name, value:values}]
|
|
49
|
+
* @param options.encode
|
|
50
|
+
* @param options.decode
|
|
51
|
+
* @param options.typedEnum
|
|
52
|
+
* @param options.defaultValue
|
|
53
|
+
* @return {Enum}
|
|
54
|
+
*/
|
|
55
|
+
function registerEnumeration(options) {
|
|
56
|
+
(0, node_opcua_assert_1.assert)(Object.prototype.hasOwnProperty.call(options, "name"));
|
|
57
|
+
(0, node_opcua_assert_1.assert)(Object.prototype.hasOwnProperty.call(options, "enumValues"));
|
|
58
|
+
const name = options.name;
|
|
59
|
+
if (Object.prototype.hasOwnProperty.call(_enumerations, name)) {
|
|
60
|
+
throw new Error("factories.registerEnumeration : Enumeration " + options.name + " has been already inserted");
|
|
61
|
+
}
|
|
62
|
+
const enumerationDefinition = new EnumerationDefinitionSchema(options);
|
|
63
|
+
_enumerations.set(name, enumerationDefinition);
|
|
64
|
+
return enumerationDefinition.typedEnum;
|
|
65
|
+
}
|
|
66
|
+
exports.registerEnumeration = registerEnumeration;
|
|
67
|
+
function hasBuiltInEnumeration(enumerationName) {
|
|
68
|
+
return _enumerations.has(enumerationName);
|
|
69
|
+
}
|
|
70
|
+
exports.hasBuiltInEnumeration = hasBuiltInEnumeration;
|
|
71
|
+
function getBuiltInEnumeration(enumerationName) {
|
|
72
|
+
if (!hasBuiltInEnumeration(enumerationName)) {
|
|
73
|
+
throw new Error("Cannot find enumeration with type " + enumerationName);
|
|
74
|
+
}
|
|
75
|
+
return _enumerations.get(enumerationName);
|
|
76
|
+
}
|
|
77
|
+
exports.getBuiltInEnumeration = getBuiltInEnumeration;
|
|
78
78
|
//# sourceMappingURL=enumerations.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
2
|
//# sourceMappingURL=get_built_in_type.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module node-opcua-factory
|
|
3
|
-
*/
|
|
4
|
-
import { ExpandedNodeId } from "node-opcua-nodeid";
|
|
5
|
-
import { DataTypeFactory } from "./datatype_factory";
|
|
6
|
-
import { ConstructorFunc, ConstructorFuncWithSchema } from "./types";
|
|
7
|
-
export declare function getStandardDataTypeFactory(): DataTypeFactory;
|
|
8
|
-
export declare function getStructureTypeConstructor(typeName: string): ConstructorFuncWithSchema;
|
|
9
|
-
export declare function hasStructuredType(typeName: string): boolean;
|
|
10
|
-
export declare function getConstructor(binaryEncodingNodeId: ExpandedNodeId): ConstructorFunc | null;
|
|
11
|
-
export declare function hasConstructor(binaryEncodingNodeId: ExpandedNodeId): boolean;
|
|
12
|
-
export declare function dump(): void;
|
|
1
|
+
/**
|
|
2
|
+
* @module node-opcua-factory
|
|
3
|
+
*/
|
|
4
|
+
import { ExpandedNodeId } from "node-opcua-nodeid";
|
|
5
|
+
import { DataTypeFactory } from "./datatype_factory";
|
|
6
|
+
import { ConstructorFunc, ConstructorFuncWithSchema } from "./types";
|
|
7
|
+
export declare function getStandardDataTypeFactory(): DataTypeFactory;
|
|
8
|
+
export declare function getStructureTypeConstructor(typeName: string): ConstructorFuncWithSchema;
|
|
9
|
+
export declare function hasStructuredType(typeName: string): boolean;
|
|
10
|
+
export declare function getConstructor(binaryEncodingNodeId: ExpandedNodeId): ConstructorFunc | null;
|
|
11
|
+
export declare function hasConstructor(binaryEncodingNodeId: ExpandedNodeId): boolean;
|
|
12
|
+
export declare function dump(): void;
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.dump = exports.hasConstructor = exports.getConstructor = exports.hasStructuredType = exports.getStructureTypeConstructor = exports.getStandardDataTypeFactory = void 0;
|
|
4
|
-
const datatype_factory_1 = require("./datatype_factory");
|
|
5
|
-
let globalFactory;
|
|
6
|
-
function getStandardDataTypeFactory() {
|
|
7
|
-
if (!globalFactory) {
|
|
8
|
-
globalFactory = new datatype_factory_1.DataTypeFactory([]);
|
|
9
|
-
globalFactory.targetNamespace = "http://opcfoundation.org/UA/";
|
|
10
|
-
}
|
|
11
|
-
return globalFactory;
|
|
12
|
-
}
|
|
13
|
-
exports.getStandardDataTypeFactory = getStandardDataTypeFactory;
|
|
14
|
-
function getStructureTypeConstructor(typeName) {
|
|
15
|
-
return getStandardDataTypeFactory().getStructureTypeConstructor(typeName);
|
|
16
|
-
}
|
|
17
|
-
exports.getStructureTypeConstructor = getStructureTypeConstructor;
|
|
18
|
-
function hasStructuredType(typeName) {
|
|
19
|
-
return getStandardDataTypeFactory().hasStructuredType(typeName);
|
|
20
|
-
}
|
|
21
|
-
exports.hasStructuredType = hasStructuredType;
|
|
22
|
-
function getConstructor(binaryEncodingNodeId) {
|
|
23
|
-
return getStandardDataTypeFactory().getConstructor(binaryEncodingNodeId);
|
|
24
|
-
}
|
|
25
|
-
exports.getConstructor = getConstructor;
|
|
26
|
-
function hasConstructor(binaryEncodingNodeId) {
|
|
27
|
-
return getStandardDataTypeFactory().hasConstructor(binaryEncodingNodeId);
|
|
28
|
-
}
|
|
29
|
-
exports.hasConstructor = hasConstructor;
|
|
30
|
-
/* istanbul ignore next */
|
|
31
|
-
function dump() {
|
|
32
|
-
getStandardDataTypeFactory().dump();
|
|
33
|
-
}
|
|
34
|
-
exports.dump = dump;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dump = exports.hasConstructor = exports.getConstructor = exports.hasStructuredType = exports.getStructureTypeConstructor = exports.getStandardDataTypeFactory = void 0;
|
|
4
|
+
const datatype_factory_1 = require("./datatype_factory");
|
|
5
|
+
let globalFactory;
|
|
6
|
+
function getStandardDataTypeFactory() {
|
|
7
|
+
if (!globalFactory) {
|
|
8
|
+
globalFactory = new datatype_factory_1.DataTypeFactory([]);
|
|
9
|
+
globalFactory.targetNamespace = "http://opcfoundation.org/UA/";
|
|
10
|
+
}
|
|
11
|
+
return globalFactory;
|
|
12
|
+
}
|
|
13
|
+
exports.getStandardDataTypeFactory = getStandardDataTypeFactory;
|
|
14
|
+
function getStructureTypeConstructor(typeName) {
|
|
15
|
+
return getStandardDataTypeFactory().getStructureTypeConstructor(typeName);
|
|
16
|
+
}
|
|
17
|
+
exports.getStructureTypeConstructor = getStructureTypeConstructor;
|
|
18
|
+
function hasStructuredType(typeName) {
|
|
19
|
+
return getStandardDataTypeFactory().hasStructuredType(typeName);
|
|
20
|
+
}
|
|
21
|
+
exports.hasStructuredType = hasStructuredType;
|
|
22
|
+
function getConstructor(binaryEncodingNodeId) {
|
|
23
|
+
return getStandardDataTypeFactory().getConstructor(binaryEncodingNodeId);
|
|
24
|
+
}
|
|
25
|
+
exports.getConstructor = getConstructor;
|
|
26
|
+
function hasConstructor(binaryEncodingNodeId) {
|
|
27
|
+
return getStandardDataTypeFactory().hasConstructor(binaryEncodingNodeId);
|
|
28
|
+
}
|
|
29
|
+
exports.hasConstructor = hasConstructor;
|
|
30
|
+
/* istanbul ignore next */
|
|
31
|
+
function dump() {
|
|
32
|
+
getStandardDataTypeFactory().dump();
|
|
33
|
+
}
|
|
34
|
+
exports.dump = dump;
|
|
35
35
|
//# sourceMappingURL=get_standard_data_type_factory.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExpandedNodeId } from "node-opcua-nodeid";
|
|
2
|
-
import { IBaseUAObject, IStructuredTypeSchema } from "./types";
|
|
3
|
-
export declare function getStructuredTypeSchema(typeName: string): IStructuredTypeSchema;
|
|
4
|
-
export declare function constructObject(binaryEncodingNodeId: ExpandedNodeId): IBaseUAObject;
|
|
1
|
+
import { ExpandedNodeId } from "node-opcua-nodeid";
|
|
2
|
+
import { IBaseUAObject, IStructuredTypeSchema } from "./types";
|
|
3
|
+
export declare function getStructuredTypeSchema(typeName: string): IStructuredTypeSchema;
|
|
4
|
+
export declare function constructObject(binaryEncodingNodeId: ExpandedNodeId): IBaseUAObject;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.constructObject = exports.getStructuredTypeSchema = void 0;
|
|
4
|
-
const get_standard_data_type_factory_1 = require("./get_standard_data_type_factory");
|
|
5
|
-
function getStructuredTypeSchema(typeName) {
|
|
6
|
-
return (0, get_standard_data_type_factory_1.getStandardDataTypeFactory)().getStructuredTypeSchema(typeName);
|
|
7
|
-
}
|
|
8
|
-
exports.getStructuredTypeSchema = getStructuredTypeSchema;
|
|
9
|
-
function constructObject(binaryEncodingNodeId) {
|
|
10
|
-
return (0, get_standard_data_type_factory_1.getStandardDataTypeFactory)().constructObject(binaryEncodingNodeId);
|
|
11
|
-
}
|
|
12
|
-
exports.constructObject = constructObject;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.constructObject = exports.getStructuredTypeSchema = void 0;
|
|
4
|
+
const get_standard_data_type_factory_1 = require("./get_standard_data_type_factory");
|
|
5
|
+
function getStructuredTypeSchema(typeName) {
|
|
6
|
+
return (0, get_standard_data_type_factory_1.getStandardDataTypeFactory)().getStructuredTypeSchema(typeName);
|
|
7
|
+
}
|
|
8
|
+
exports.getStructuredTypeSchema = getStructuredTypeSchema;
|
|
9
|
+
function constructObject(binaryEncodingNodeId) {
|
|
10
|
+
return (0, get_standard_data_type_factory_1.getStandardDataTypeFactory)().constructObject(binaryEncodingNodeId);
|
|
11
|
+
}
|
|
12
|
+
exports.constructObject = constructObject;
|
|
13
13
|
//# sourceMappingURL=get_structured_type_schema.js.map
|
package/dist/id_generator.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare function generate_new_id(): number;
|
|
2
|
-
export declare function next_available_id(): number;
|
|
3
|
-
export declare function is_internal_id(value: number): boolean;
|
|
1
|
+
export declare function generate_new_id(): number;
|
|
2
|
+
export declare function next_available_id(): number;
|
|
3
|
+
export declare function is_internal_id(value: number): boolean;
|
package/dist/id_generator.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.is_internal_id = exports.next_available_id = exports.generate_new_id = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* @module node-opcua-factory
|
|
6
|
-
*/
|
|
7
|
-
const _FIRST_INTERNAL_ID = 0xfffe0000;
|
|
8
|
-
let _nextAvailableId = _FIRST_INTERNAL_ID;
|
|
9
|
-
function generate_new_id() {
|
|
10
|
-
_nextAvailableId += 1;
|
|
11
|
-
return _nextAvailableId;
|
|
12
|
-
}
|
|
13
|
-
exports.generate_new_id = generate_new_id;
|
|
14
|
-
function next_available_id() {
|
|
15
|
-
return -1;
|
|
16
|
-
}
|
|
17
|
-
exports.next_available_id = next_available_id;
|
|
18
|
-
function is_internal_id(value) {
|
|
19
|
-
return value >= _FIRST_INTERNAL_ID;
|
|
20
|
-
}
|
|
21
|
-
exports.is_internal_id = is_internal_id;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.is_internal_id = exports.next_available_id = exports.generate_new_id = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* @module node-opcua-factory
|
|
6
|
+
*/
|
|
7
|
+
const _FIRST_INTERNAL_ID = 0xfffe0000;
|
|
8
|
+
let _nextAvailableId = _FIRST_INTERNAL_ID;
|
|
9
|
+
function generate_new_id() {
|
|
10
|
+
_nextAvailableId += 1;
|
|
11
|
+
return _nextAvailableId;
|
|
12
|
+
}
|
|
13
|
+
exports.generate_new_id = generate_new_id;
|
|
14
|
+
function next_available_id() {
|
|
15
|
+
return -1;
|
|
16
|
+
}
|
|
17
|
+
exports.next_available_id = next_available_id;
|
|
18
|
+
function is_internal_id(value) {
|
|
19
|
+
return value >= _FIRST_INTERNAL_ID;
|
|
20
|
+
}
|
|
21
|
+
exports.is_internal_id = is_internal_id;
|
|
22
22
|
//# sourceMappingURL=id_generator.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module node-opcua-factory
|
|
3
|
-
*/
|
|
4
|
-
export * from "./base_ua_object";
|
|
5
|
-
export * from "./basic_type";
|
|
6
|
-
export * from "./builtin_types_special";
|
|
7
|
-
export * from "./builtin_types";
|
|
8
|
-
export * from "./datatype_factory";
|
|
9
|
-
export * from "./enumerations";
|
|
10
|
-
export * from "./get_standard_data_type_factory";
|
|
11
|
-
export * from "./get_structured_type_schema";
|
|
12
|
-
export * from "./id_generator";
|
|
13
|
-
export * from "./nodeid_type";
|
|
14
|
-
export * from "./parameters";
|
|
15
|
-
export * from "./register_class_definition";
|
|
16
|
-
export * from "./schema_helpers";
|
|
17
|
-
export * from "./structured_type_schema";
|
|
18
|
-
export * from "./types";
|
|
1
|
+
/**
|
|
2
|
+
* @module node-opcua-factory
|
|
3
|
+
*/
|
|
4
|
+
export * from "./base_ua_object";
|
|
5
|
+
export * from "./basic_type";
|
|
6
|
+
export * from "./builtin_types_special";
|
|
7
|
+
export * from "./builtin_types";
|
|
8
|
+
export * from "./datatype_factory";
|
|
9
|
+
export * from "./enumerations";
|
|
10
|
+
export * from "./get_standard_data_type_factory";
|
|
11
|
+
export * from "./get_structured_type_schema";
|
|
12
|
+
export * from "./id_generator";
|
|
13
|
+
export * from "./nodeid_type";
|
|
14
|
+
export * from "./parameters";
|
|
15
|
+
export * from "./register_class_definition";
|
|
16
|
+
export * from "./schema_helpers";
|
|
17
|
+
export * from "./structured_type_schema";
|
|
18
|
+
export * from "./types";
|