node-opcua-factory 2.76.2 → 2.77.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/dist/base_ua_object.js +19 -7
- package/dist/base_ua_object.js.map +1 -1
- package/dist/datatype_factory.d.ts +14 -9
- package/dist/datatype_factory.js +75 -81
- package/dist/datatype_factory.js.map +1 -1
- package/dist/get_standard_data_type_factory.d.ts +1 -8
- package/dist/get_standard_data_type_factory.js +9 -14
- package/dist/get_standard_data_type_factory.js.map +1 -1
- package/dist/get_structured_type_schema.d.ts +1 -4
- package/dist/get_structured_type_schema.js +6 -10
- package/dist/get_structured_type_schema.js.map +1 -1
- package/dist/schema_helpers.js.map +1 -1
- package/dist/structured_type_schema.d.ts +10 -15
- package/dist/structured_type_schema.js +63 -58
- package/dist/structured_type_schema.js.map +1 -1
- package/dist/types.d.ts +16 -8
- package/dist/types.js.map +1 -1
- package/package.json +13 -13
- package/source/base_ua_object.ts +26 -6
- package/source/datatype_factory.ts +86 -84
- package/source/get_standard_data_type_factory.ts +8 -12
- package/source/get_structured_type_schema.ts +6 -6
- package/source/schema_helpers.ts +1 -1
- package/source/structured_type_schema.ts +86 -66
- package/source/types.ts +15 -11
package/source/types.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import { BinaryStream, OutputBinaryStream } from "node-opcua-binary-stream";
|
|
5
5
|
import { Enum } from "node-opcua-enum";
|
|
6
6
|
import { ExpandedNodeId, NodeId } from "node-opcua-nodeid";
|
|
7
|
+
import { DataTypeFactory } from "./datatype_factory";
|
|
7
8
|
|
|
8
9
|
export enum FieldCategory {
|
|
9
10
|
enumeration = "enumeration",
|
|
@@ -72,7 +73,7 @@ export interface IBaseUAObject {
|
|
|
72
73
|
decodeDebug(stream: BinaryStream, options: DecodeDebugOptions): void;
|
|
73
74
|
clone(): IBaseUAObject;
|
|
74
75
|
}
|
|
75
|
-
type BaseUAObjectConstructable = new (options?:
|
|
76
|
+
type BaseUAObjectConstructable = new (options?: Record<string, unknown>) => IBaseUAObject;
|
|
76
77
|
export type ConstructorFunc = BaseUAObjectConstructable;
|
|
77
78
|
// new (...args: any[]) => BaseUAObjectConstructable;
|
|
78
79
|
|
|
@@ -127,13 +128,14 @@ export type DefaultValueFunc = () => any;
|
|
|
127
128
|
|
|
128
129
|
export interface StructuredTypeOptions {
|
|
129
130
|
name: string;
|
|
130
|
-
id?: number | NodeId;
|
|
131
131
|
fields: FieldInterfaceOptions[];
|
|
132
132
|
documentation?: string;
|
|
133
133
|
baseType: string;
|
|
134
|
+
category?: FieldCategory;
|
|
134
135
|
_resolved?: boolean;
|
|
135
|
-
bitFields?:
|
|
136
|
-
|
|
136
|
+
bitFields?: { name: string, length: number }[];
|
|
137
|
+
deprecated_base?: StructuredTypeOptions;
|
|
138
|
+
dataTypeFactory: DataTypeFactory;
|
|
137
139
|
}
|
|
138
140
|
|
|
139
141
|
export interface TypeSchemaConstructorOptions {
|
|
@@ -174,16 +176,18 @@ export interface EnumerationDefinition extends CommonInterface {
|
|
|
174
176
|
}
|
|
175
177
|
|
|
176
178
|
export type TypeDefinition = BuiltInTypeDefinition | EnumerationDefinition | BasicTypeDefinition | CommonInterface;
|
|
177
|
-
|
|
179
|
+
export interface BitField {
|
|
180
|
+
name: string;
|
|
181
|
+
length: number;
|
|
182
|
+
}
|
|
178
183
|
export interface IStructuredTypeSchema extends CommonInterface {
|
|
179
184
|
fields: FieldType[];
|
|
180
|
-
id: NodeId;
|
|
181
185
|
dataTypeNodeId: NodeId;
|
|
182
|
-
|
|
183
186
|
baseType: string;
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
+
|
|
188
|
+
getBaseSchema(): IStructuredTypeSchema | null;
|
|
189
|
+
getDataTypeFactory(): DataTypeFactory;
|
|
190
|
+
|
|
187
191
|
documentation?: string;
|
|
188
192
|
|
|
189
193
|
isValid?: (options: any) => boolean;
|
|
@@ -195,5 +199,5 @@ export interface IStructuredTypeSchema extends CommonInterface {
|
|
|
195
199
|
encodingDefaultXml?: ExpandedNodeId;
|
|
196
200
|
encodingDefaultJson?: ExpandedNodeId;
|
|
197
201
|
|
|
198
|
-
bitFields?:
|
|
202
|
+
bitFields?: BitField[];
|
|
199
203
|
}
|