node-opcua-address-space-base 2.169.0 → 2.172.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/address_space.d.ts +21 -24
- package/dist/base_node.d.ts +61 -23
- package/dist/base_node.js +3 -0
- package/dist/base_node.js.map +1 -1
- package/dist/bind_variable.d.ts +8 -8
- package/dist/clone_helper.d.ts +7 -7
- package/dist/clone_helper.js +44 -23
- package/dist/clone_helper.js.map +1 -1
- package/dist/clone_options.d.ts +10 -10
- package/dist/clone_options.js +2 -2
- package/dist/clone_options.js.map +1 -1
- package/dist/continuation_point.d.ts +1 -1
- package/dist/i_event_data.d.ts +5 -8
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/instantiate_options.d.ts +5 -5
- package/dist/ua_data_type.d.ts +6 -6
- package/dist/ua_dynamic_variable_array.d.ts +6 -6
- package/dist/ua_event_type.d.ts +1 -1
- package/dist/ua_method.d.ts +16 -12
- package/dist/ua_object.d.ts +16 -18
- package/dist/ua_object_type.d.ts +9 -9
- package/dist/ua_property.d.ts +3 -3
- package/dist/ua_reference.d.ts +3 -3
- package/dist/ua_reference_type.d.ts +5 -5
- package/dist/ua_variable.d.ts +19 -19
- package/dist/ua_variable_t.d.ts +7 -7
- package/dist/ua_variable_type.d.ts +14 -14
- package/dist/ua_view.d.ts +3 -3
- package/package.json +15 -15
- package/source/address_space.ts +21 -24
- package/source/base_node.ts +128 -80
- package/source/bind_variable.ts +8 -9
- package/source/clone_helper.ts +67 -44
- package/source/clone_options.ts +13 -14
- package/source/continuation_point.ts +1 -2
- package/source/i_event_data.ts +7 -8
- package/source/index.ts +3 -3
- package/source/instantiate_options.ts +5 -6
- package/source/namespace.ts +1 -1
- package/source/ua_data_type.ts +6 -7
- package/source/ua_dynamic_variable_array.ts +6 -6
- package/source/ua_event_type.ts +1 -1
- package/source/ua_method.ts +33 -29
- package/source/ua_object.ts +22 -20
- package/source/ua_object_type.ts +9 -10
- package/source/ua_property.ts +5 -3
- package/source/ua_reference.ts +3 -3
- package/source/ua_reference_type.ts +14 -14
- package/source/ua_variable.ts +35 -30
- package/source/ua_variable_t.ts +7 -7
- package/source/ua_variable_type.ts +27 -28
- package/source/ua_view.ts +3 -3
package/source/i_event_data.ts
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { NodeId } from "node-opcua-nodeid";
|
|
2
|
-
import { BrowsePath, BrowsePathResult } from "node-opcua-types";
|
|
3
|
-
import { Variant, VariantLike } from "node-opcua-variant";
|
|
4
|
-
import { BaseNode } from "./base_node";
|
|
1
|
+
import type { NodeId } from "node-opcua-nodeid";
|
|
2
|
+
import type { BrowsePath, BrowsePathResult } from "node-opcua-types";
|
|
3
|
+
import type { Variant, VariantLike } from "node-opcua-variant";
|
|
4
|
+
import type { BaseNode } from "./base_node";
|
|
5
5
|
|
|
6
6
|
export interface IEventData {
|
|
7
|
-
/**
|
|
8
|
-
* the event type node
|
|
9
|
-
*/
|
|
10
|
-
$eventDataSource?: BaseNode;
|
|
11
7
|
/**
|
|
12
8
|
*
|
|
13
9
|
*/
|
|
14
10
|
eventId: NodeId;
|
|
11
|
+
|
|
12
|
+
getEventDataSource(): BaseNode;
|
|
13
|
+
|
|
15
14
|
_createValue(fullBrowsePath: string, node: BaseNode, variant: VariantLike): void;
|
|
16
15
|
_readValue(nodeId: NodeId): Variant | null;
|
|
17
16
|
_browse(browsePath: BrowsePath): BrowsePathResult | null;
|
package/source/index.ts
CHANGED
|
@@ -13,12 +13,12 @@ export * from "./ua_data_type";
|
|
|
13
13
|
export * from "./ua_dynamic_variable_array";
|
|
14
14
|
export * from "./ua_event_type";
|
|
15
15
|
export * from "./ua_method";
|
|
16
|
-
export * from "./ua_object_type";
|
|
17
16
|
export * from "./ua_object";
|
|
17
|
+
export * from "./ua_object_type";
|
|
18
18
|
export * from "./ua_property";
|
|
19
|
-
export * from "./ua_reference_type";
|
|
20
19
|
export * from "./ua_reference";
|
|
20
|
+
export * from "./ua_reference_type";
|
|
21
|
+
export * from "./ua_variable";
|
|
21
22
|
export * from "./ua_variable_t";
|
|
22
23
|
export * from "./ua_variable_type";
|
|
23
|
-
export * from "./ua_variable";
|
|
24
24
|
export * from "./ua_view";
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { NodeIdLike } from "node-opcua-nodeid";
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { INamespace } from "./namespace";
|
|
1
|
+
import type { LocalizedTextLike, QualifiedNameLike } from "node-opcua-data-model";
|
|
2
|
+
import type { NodeIdLike } from "node-opcua-nodeid";
|
|
3
|
+
import type { BaseNode } from "./base_node";
|
|
4
|
+
import type { ModellingRuleType } from "./modelling_rule_type";
|
|
5
|
+
import type { INamespace } from "./namespace";
|
|
7
6
|
|
|
8
7
|
export interface InstantiateOptions {
|
|
9
8
|
/**
|
package/source/namespace.ts
CHANGED
|
@@ -229,7 +229,7 @@ export interface VariableStuff {
|
|
|
229
229
|
dataValue?: DataValueOptions;
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
export interface AddVariableOptionsWithoutValue extends AddBaseNodeOptions, VariableStuff {
|
|
232
|
+
export interface AddVariableOptionsWithoutValue extends AddBaseNodeOptions, VariableStuff {}
|
|
233
233
|
export interface AddVariableOptions extends AddVariableOptionsWithoutValue {
|
|
234
234
|
// default value is "BaseVariableType";
|
|
235
235
|
typeDefinition?: string | NodeId | UAVariableType;
|
package/source/ua_data_type.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { NodeClass } from "node-opcua-data-model";
|
|
2
|
-
import { ExpandedNodeId, NodeId, NodeIdLike } from "node-opcua-nodeid";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import type { NodeClass } from "node-opcua-data-model";
|
|
2
|
+
import type { ExpandedNodeId, NodeId, NodeIdLike } from "node-opcua-nodeid";
|
|
3
|
+
import type { DataTypeDefinition, EnumDefinition, StructureDefinition } from "node-opcua-types";
|
|
4
|
+
import type { DataType } from "node-opcua-variant";
|
|
5
|
+
import type { BaseNode, BaseNodeEvents } from "./base_node";
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export interface UADataType extends BaseNode {
|
|
7
|
+
export interface UADataType extends BaseNode<BaseNodeEvents> {
|
|
9
8
|
readonly nodeClass: NodeClass.DataType;
|
|
10
9
|
|
|
11
10
|
readonly subtypeOfObj: UADataType | null;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { QualifiedName } from "node-opcua-data-model";
|
|
2
|
-
import { DataValue } from "node-opcua-data-value";
|
|
3
|
-
import { ExtensionObject } from "node-opcua-extension-object";
|
|
4
|
-
import { UADataType } from "./ua_data_type";
|
|
5
|
-
import { UAVariable } from "./ua_variable";
|
|
6
|
-
import { UAVariableType } from "./ua_variable_type";
|
|
1
|
+
import type { QualifiedName } from "node-opcua-data-model";
|
|
2
|
+
import type { DataValue } from "node-opcua-data-value";
|
|
3
|
+
import type { ExtensionObject } from "node-opcua-extension-object";
|
|
4
|
+
import type { UADataType } from "./ua_data_type";
|
|
5
|
+
import type { UAVariable } from "./ua_variable";
|
|
6
|
+
import type { UAVariableType } from "./ua_variable_type";
|
|
7
7
|
|
|
8
8
|
// {{ Dynamic Array Variable
|
|
9
9
|
export interface UADynamicVariableArray<T extends ExtensionObject = ExtensionObject> extends UAVariable {
|
package/source/ua_event_type.ts
CHANGED
package/source/ua_method.ts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { NodeClass } from "node-opcua-data-model";
|
|
2
|
-
import { NodeId } from "node-opcua-nodeid";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
import { ISessionContext } from "./session_context";
|
|
9
|
-
import { UAObject } from "./ua_object";
|
|
10
|
-
import { UAObjectType } from "./ua_object_type";
|
|
11
|
-
import { UAVariable } from "./ua_variable";
|
|
12
|
-
import { CloneExtraInfo, CloneFilter, CloneOptions } from "./clone_options";
|
|
1
|
+
import type { NodeClass } from "node-opcua-data-model";
|
|
2
|
+
import type { NodeId } from "node-opcua-nodeid";
|
|
3
|
+
import type { CallbackT } from "node-opcua-status-code";
|
|
4
|
+
import type { Argument, CallMethodResultOptions } from "node-opcua-types";
|
|
5
|
+
import type { Variant, VariantLike } from "node-opcua-variant";
|
|
6
|
+
import type { BaseNode, BaseNodeEvents, ListenerSignature } from "./base_node";
|
|
7
|
+
import type { CloneExtraInfo, CloneFilter, CloneOptions } from "./clone_options";
|
|
8
|
+
import type { ISessionContext } from "./session_context";
|
|
9
|
+
import type { UAObject } from "./ua_object";
|
|
10
|
+
import type { UAObjectType } from "./ua_object_type";
|
|
11
|
+
import type { UAVariable } from "./ua_variable";
|
|
13
12
|
|
|
14
13
|
export declare type MethodFunctorC = (
|
|
15
14
|
this: UAMethod,
|
|
@@ -25,46 +24,51 @@ export declare type MethodFunctorA = (
|
|
|
25
24
|
|
|
26
25
|
export type MethodFunctor = MethodFunctorC | MethodFunctorA;
|
|
27
26
|
|
|
28
|
-
export declare class UAMethod extends BaseNode {
|
|
29
|
-
public readonly nodeClass: NodeClass.Method;
|
|
30
|
-
public readonly typeDefinition: NodeId;
|
|
31
|
-
public readonly typeDefinitionObj: UAObjectType;
|
|
32
27
|
|
|
33
|
-
|
|
28
|
+
export interface UAMethodEvents extends BaseNodeEvents {
|
|
29
|
+
"method_executed": (inputArguments: Variant[], context: ISessionContext, callMethodResult: CallMethodResultOptions) => void;
|
|
30
|
+
"afterCall": (context: ISessionContext,inputArguments: Variant[], callMethodResult: CallMethodResultOptions) => void;
|
|
31
|
+
}
|
|
32
|
+
export interface UAMethod<T extends UAMethodEvents & ListenerSignature<T> = UAMethodEvents> extends BaseNode<T> {
|
|
33
|
+
readonly nodeClass: NodeClass.Method;
|
|
34
|
+
readonly typeDefinition: NodeId;
|
|
35
|
+
readonly typeDefinitionObj: UAObjectType;
|
|
36
|
+
|
|
37
|
+
readonly parent: UAObject | null;
|
|
34
38
|
|
|
35
|
-
|
|
36
|
-
|
|
39
|
+
readonly inputArguments?: UAVariable;
|
|
40
|
+
readonly outputArguments?: UAVariable;
|
|
37
41
|
|
|
38
|
-
|
|
42
|
+
readonly methodDeclarationId: NodeId;
|
|
39
43
|
|
|
40
44
|
/**
|
|
41
45
|
*
|
|
42
46
|
*/
|
|
43
|
-
|
|
47
|
+
_getExecutableFlag?: (sessionContext: ISessionContext | null) => boolean;
|
|
44
48
|
|
|
45
|
-
|
|
49
|
+
bindMethod(methodFunction: MethodFunctor): void;
|
|
46
50
|
|
|
47
|
-
|
|
51
|
+
getExecutableFlag(context: ISessionContext): boolean;
|
|
48
52
|
|
|
49
|
-
|
|
53
|
+
getInputArguments(): Argument[];
|
|
50
54
|
|
|
51
|
-
|
|
55
|
+
getOutputArguments(): Argument[];
|
|
52
56
|
|
|
53
57
|
/**
|
|
54
58
|
*/
|
|
55
|
-
|
|
59
|
+
execute(
|
|
56
60
|
object: UAObject | UAObjectType | null,
|
|
57
61
|
inputArguments: VariantLike[] | null,
|
|
58
62
|
context: ISessionContext,
|
|
59
63
|
callback: CallbackT<CallMethodResultOptions>
|
|
60
64
|
): void;
|
|
61
|
-
|
|
65
|
+
execute(
|
|
62
66
|
object: UAObject | UAObjectType | null,
|
|
63
67
|
inputArguments: null | VariantLike[],
|
|
64
68
|
context: ISessionContext
|
|
65
69
|
): Promise<CallMethodResultOptions>;
|
|
66
70
|
|
|
67
|
-
|
|
71
|
+
clone(options: CloneOptions, optionalFilter?: CloneFilter, extraInfo?: CloneExtraInfo): UAMethod;
|
|
68
72
|
|
|
69
|
-
|
|
73
|
+
isBound(): boolean;
|
|
70
74
|
}
|
package/source/ua_object.ts
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { UAMethod } from "./ua_method";
|
|
14
|
-
import { EventNotifierFlags } from "./event_notifier_flags";
|
|
1
|
+
import type { Byte, DateTime, Int16, Int32, SByte, UAString, UInt16, UInt32 } from "node-opcua-basic-types";
|
|
2
|
+
import type { LocalizedTextLike, NodeClass, QualifiedNameOptions } from "node-opcua-data-model";
|
|
3
|
+
import type { ExtensionObject } from "node-opcua-extension-object";
|
|
4
|
+
import type { NodeId } from "node-opcua-nodeid";
|
|
5
|
+
import type { StatusCode } from "node-opcua-status-code";
|
|
6
|
+
import type { DataType, Variant, VariantArrayType } from "node-opcua-variant";
|
|
7
|
+
import type { BaseNode, BaseNodeEvents, IPropertyAndComponentHolder, ListenerSignature } from "./base_node";
|
|
8
|
+
import type { CloneExtraInfo, CloneFilter, CloneOptions } from "./clone_options";
|
|
9
|
+
import type { EventNotifierFlags } from "./event_notifier_flags";
|
|
10
|
+
import type { UAEventType } from "./ua_event_type";
|
|
11
|
+
import type { UAMethod } from "./ua_method";
|
|
12
|
+
import type { UAObjectType } from "./ua_object_type";
|
|
15
13
|
|
|
16
14
|
export type EventTypeLike = string | NodeId | UAEventType;
|
|
17
15
|
|
|
@@ -144,6 +142,7 @@ export type PseudoVariant =
|
|
|
144
142
|
| PseudoVariantExtensionObjectArray
|
|
145
143
|
| PseudoVariantVariant
|
|
146
144
|
| PseudoVariantVariantArray;
|
|
145
|
+
|
|
147
146
|
export interface RaiseEventData {
|
|
148
147
|
$eventDataSource?: UAEventType;
|
|
149
148
|
|
|
@@ -155,10 +154,18 @@ export interface EventRaiser {
|
|
|
155
154
|
raiseEvent(eventType: EventTypeLike, eventData: RaiseEventData): void;
|
|
156
155
|
}
|
|
157
156
|
|
|
157
|
+
export interface UAObjectEvents extends BaseNodeEvents {
|
|
158
|
+
|
|
159
|
+
"event_raised":()=>void;
|
|
160
|
+
}
|
|
161
|
+
|
|
158
162
|
/**
|
|
159
163
|
* @interface UAObject
|
|
160
164
|
*/
|
|
161
|
-
export interface UAObject extends
|
|
165
|
+
export interface UAObject<T extends UAObjectEvents & ListenerSignature<T> = UAObjectEvents>
|
|
166
|
+
extends BaseNode<T>,
|
|
167
|
+
EventRaiser,
|
|
168
|
+
IPropertyAndComponentHolder {
|
|
162
169
|
readonly nodeClass: NodeClass.Object;
|
|
163
170
|
get parent(): BaseNode | null;
|
|
164
171
|
get typeDefinitionObj(): UAObjectType;
|
|
@@ -180,11 +187,6 @@ export interface UAObject extends BaseNode, EventRaiser, IPropertyAndComponentHo
|
|
|
180
187
|
|
|
181
188
|
raiseEvent(eventType: EventTypeLike | BaseNode, eventData: RaiseEventData): void;
|
|
182
189
|
|
|
183
|
-
on(eventName: "event", eventHandler: (eventData: IEventData) => void): this;
|
|
184
|
-
on(eventName: "dispose", eventHandler: () => void): this;
|
|
185
|
-
once(eventName: "event", eventHandler: (eventData: IEventData) => void): this;
|
|
186
|
-
once(eventName: "dispose", eventHandler: () => void): this;
|
|
187
|
-
|
|
188
190
|
setEventNotifier(eventNotifierFlags: EventNotifierFlags): void;
|
|
189
191
|
|
|
190
192
|
clone(options: CloneOptions, optionalFilter?: CloneFilter, extraInfo?: CloneExtraInfo): UAObject;
|
package/source/ua_object_type.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { QualifiedNameLike, QualifiedNameOptions } from "node-opcua-data-model";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { EventNotifierFlags } from "./event_notifier_flags";
|
|
1
|
+
import type { QualifiedNameLike, QualifiedNameOptions } from "node-opcua-data-model";
|
|
2
|
+
import type { NodeId, NodeIdLike } from "node-opcua-nodeid";
|
|
3
|
+
import type { NodeClass } from "node-opcua-types";
|
|
4
|
+
import type { BaseNode, BaseNodeEvents, IPropertyAndComponentHolder } from "./base_node";
|
|
5
|
+
import type { EventNotifierFlags } from "./event_notifier_flags";
|
|
6
|
+
import type { InstantiateOptions } from "./instantiate_options";
|
|
7
|
+
import type { UAMethod } from "./ua_method";
|
|
8
|
+
import type { UAObject } from "./ua_object";
|
|
10
9
|
|
|
11
10
|
export interface InstantiateObjectOptions extends InstantiateOptions {
|
|
12
11
|
//
|
|
@@ -22,7 +21,7 @@ export interface InstantiateObjectOptions extends InstantiateOptions {
|
|
|
22
21
|
addInOf?: NodeId | BaseNode;
|
|
23
22
|
}
|
|
24
23
|
|
|
25
|
-
export declare interface UAObjectType extends BaseNode
|
|
24
|
+
export declare interface UAObjectType extends BaseNode<BaseNodeEvents>, IPropertyAndComponentHolder {
|
|
26
25
|
readonly nodeClass: NodeClass.ObjectType;
|
|
27
26
|
readonly subtypeOf: NodeId | null;
|
|
28
27
|
readonly subtypeOfObj: UAObjectType | null;
|
package/source/ua_property.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DataType } from "node-opcua-variant";
|
|
2
|
-
import { UAVariableT } from "./ua_variable_t";
|
|
1
|
+
import type { DataType } from "node-opcua-variant";
|
|
2
|
+
import type { UAVariableT } from "./ua_variable_t";
|
|
3
3
|
/**
|
|
4
4
|
* | | |
|
|
5
5
|
* |----------------|--------------------------------------------------|
|
|
@@ -10,5 +10,7 @@ import { UAVariableT } from "./ua_variable_t";
|
|
|
10
10
|
* |dataType Name |undefined ns=0;i=0 |
|
|
11
11
|
* |isAbstract |false |
|
|
12
12
|
*/
|
|
13
|
-
export interface UAProperty_Base<T, DT extends DataType> {
|
|
13
|
+
export interface UAProperty_Base<T, DT extends DataType> extends UAVariableT<T, DT> {
|
|
14
|
+
/** A property is a variable that describes an attribute of another variable or object. */
|
|
15
|
+
}
|
|
14
16
|
export interface UAProperty<T, DT extends DataType> extends UAVariableT<T, /*m*/ DT>, UAProperty_Base<T, DT /*A*/> {}
|
package/source/ua_reference.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { NodeId } from "node-opcua-nodeid";
|
|
2
|
-
import { IAddressSpace } from "./address_space";
|
|
3
|
-
import { BaseNode } from "./base_node";
|
|
1
|
+
import type { NodeId } from "node-opcua-nodeid";
|
|
2
|
+
import type { IAddressSpace } from "./address_space";
|
|
3
|
+
import type { BaseNode } from "./base_node";
|
|
4
4
|
|
|
5
5
|
export interface UAReference {
|
|
6
6
|
readonly nodeId: NodeId;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { LocalizedText, NodeClass } from "node-opcua-data-model";
|
|
2
|
-
import { NodeId, NodeIdLike } from "node-opcua-nodeid";
|
|
3
|
-
import { BaseNode } from "./base_node";
|
|
4
|
-
import { UAReference } from "./ua_reference";
|
|
1
|
+
import type { LocalizedText, NodeClass } from "node-opcua-data-model";
|
|
2
|
+
import type { NodeId, NodeIdLike } from "node-opcua-nodeid";
|
|
3
|
+
import type { BaseNode } from "./base_node";
|
|
4
|
+
import type { UAReference } from "./ua_reference";
|
|
5
5
|
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
export interface UAReferenceType extends BaseNode {
|
|
7
|
+
readonly nodeClass: NodeClass.ReferenceType;
|
|
8
|
+
readonly subtypeOfObj: UAReferenceType | null;
|
|
9
|
+
readonly subtypeOf: NodeId | null;
|
|
10
|
+
readonly isAbstract: boolean;
|
|
11
|
+
readonly inverseName: LocalizedText;
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
isSubtypeOf(baseType: UAReferenceType | NodeIdLike): boolean;
|
|
14
14
|
|
|
15
15
|
/** @deprecated - use isSubtypeOf instead */
|
|
16
|
-
|
|
16
|
+
isSupertypeOf(baseType: UAReferenceType | NodeIdLike): boolean;
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
getAllSubtypes(): UAReferenceType[];
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
*
|
|
22
22
|
* @param reference
|
|
23
23
|
*/
|
|
24
|
-
|
|
24
|
+
checkHasSubtype(referenceType: NodeId | UAReference): boolean;
|
|
25
25
|
}
|
package/source/ua_variable.ts
CHANGED
|
@@ -1,28 +1,35 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import type {
|
|
2
|
+
AttributeIds,
|
|
3
|
+
CallbackT,
|
|
4
|
+
DataType,
|
|
5
|
+
PreciseClock,
|
|
6
|
+
StatusCode,
|
|
7
|
+
StatusCodeCallback,
|
|
8
|
+
UInt32
|
|
9
|
+
} from "node-opcua-basic-types";
|
|
10
|
+
import type { NodeClass, QualifiedNameLike } from "node-opcua-data-model";
|
|
11
|
+
import type { DataValue } from "node-opcua-data-value";
|
|
12
|
+
import type { ExtensionObject } from "node-opcua-extension-object";
|
|
13
|
+
import type { NodeId, NodeIdLike } from "node-opcua-nodeid";
|
|
14
|
+
import type { NumericRange } from "node-opcua-numeric-range";
|
|
15
|
+
|
|
16
|
+
import type {
|
|
10
17
|
HistoryReadDetails,
|
|
11
18
|
HistoryReadResult,
|
|
12
|
-
|
|
19
|
+
ReadAtTimeDetails,
|
|
13
20
|
ReadEventDetails,
|
|
14
21
|
ReadProcessedDetails,
|
|
15
|
-
|
|
22
|
+
ReadRawModifiedDetails,
|
|
23
|
+
WriteValueOptions
|
|
16
24
|
} from "node-opcua-types";
|
|
17
|
-
import {
|
|
18
|
-
|
|
25
|
+
import type { VariantLike } from "node-opcua-variant";
|
|
26
|
+
import type { BaseNode, BaseNodeEvents, IPropertyAndComponentHolder, ListenerSignature } from "./base_node";
|
|
27
|
+
import type { BindVariableOptions } from "./bind_variable";
|
|
19
28
|
//
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import { UAVariableType } from "./ua_variable_type";
|
|
25
|
-
import { BindVariableOptions } from "./bind_variable";
|
|
29
|
+
import type { CloneExtraInfo, CloneFilter, CloneOptions } from "./clone_options";
|
|
30
|
+
import type { ContinuationData, ISessionContext } from "./session_context";
|
|
31
|
+
import type { UADataType } from "./ua_data_type";
|
|
32
|
+
import type { UAVariableType } from "./ua_variable_type";
|
|
26
33
|
|
|
27
34
|
export interface IVariableHistorian {
|
|
28
35
|
/**
|
|
@@ -81,7 +88,15 @@ export interface BindExtensionObjectOptions {
|
|
|
81
88
|
export interface IVariableDataTypeChange {
|
|
82
89
|
changeDataType(newDataType: NodeIdLike, newValue?: VariantLike): void;
|
|
83
90
|
}
|
|
84
|
-
export interface
|
|
91
|
+
export interface UAVariableEvents extends BaseNodeEvents {
|
|
92
|
+
value_changed: (newDataValue: DataValue, index_range?: NumericRange |null) => void;
|
|
93
|
+
semantic_changed: () => void;
|
|
94
|
+
}
|
|
95
|
+
export interface UAVariable<T extends UAVariableEvents & ListenerSignature<T> = UAVariableEvents>
|
|
96
|
+
extends BaseNode<T>,
|
|
97
|
+
VariableAttributes,
|
|
98
|
+
IVariableDataTypeChange,
|
|
99
|
+
IPropertyAndComponentHolder {
|
|
85
100
|
readonly nodeClass: NodeClass.Variable;
|
|
86
101
|
readonly parent: BaseNode | null;
|
|
87
102
|
readonly dataTypeObj: UADataType;
|
|
@@ -395,14 +410,4 @@ export interface UAVariable extends BaseNode, VariableAttributes, IVariableDataT
|
|
|
395
410
|
): void;
|
|
396
411
|
|
|
397
412
|
clone(options: CloneOptions, optionalFilter?: CloneFilter, extraInfo?: CloneExtraInfo): UAVariable;
|
|
398
|
-
|
|
399
|
-
// ----------------- Event handlers
|
|
400
|
-
|
|
401
|
-
on(eventName: "semantic_changed", eventHandler: () => void): this;
|
|
402
|
-
|
|
403
|
-
on(eventName: "value_changed", eventHandler: (dataValue: DataValue) => void): this;
|
|
404
|
-
|
|
405
|
-
once(eventName: "semantic_changed", eventHandler: () => void): this;
|
|
406
|
-
|
|
407
|
-
once(eventName: "value_changed", eventHandler: (dataValue: DataValue) => void): this;
|
|
408
413
|
}
|
package/source/ua_variable_t.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { QualifiedNameLike } from "node-opcua-data-model";
|
|
2
|
-
import {
|
|
3
|
-
import { NumericRange } from "node-opcua-numeric-range";
|
|
4
|
-
import { CallbackT, StatusCode, StatusCodeCallback } from "node-opcua-status-code";
|
|
5
|
-
import { DataType } from "node-opcua-variant";
|
|
6
|
-
import { ISessionContext } from "./session_context";
|
|
7
|
-
import { UAVariable } from "./ua_variable";
|
|
1
|
+
import type { QualifiedNameLike } from "node-opcua-data-model";
|
|
2
|
+
import type { DataValueT } from "node-opcua-data-value";
|
|
3
|
+
import type { NumericRange } from "node-opcua-numeric-range";
|
|
4
|
+
import type { CallbackT, StatusCode, StatusCodeCallback } from "node-opcua-status-code";
|
|
5
|
+
import type { DataType } from "node-opcua-variant";
|
|
6
|
+
import type { ISessionContext } from "./session_context";
|
|
7
|
+
import type { UAVariable } from "./ua_variable";
|
|
8
8
|
|
|
9
9
|
export interface UAVariableT<T, DT extends DataType> extends UAVariable {
|
|
10
10
|
readValue(
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
import { InstantiateOptions } from "./instantiate_options";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { UAMethod } from "./ua_method";
|
|
1
|
+
import type { UInt32 } from "node-opcua-basic-types";
|
|
2
|
+
import type { NodeClass } from "node-opcua-data-model";
|
|
3
|
+
import type { ExtensionObject } from "node-opcua-extension-object";
|
|
4
|
+
import type { NodeId, NodeIdLike } from "node-opcua-nodeid";
|
|
5
|
+
import type { DataType } from "node-opcua-variant";
|
|
6
|
+
import type { BaseNode } from "./base_node";
|
|
7
|
+
import type { BindVariableOptions } from "./bind_variable";
|
|
8
|
+
import type { InstantiateOptions } from "./instantiate_options";
|
|
9
|
+
import type { UAMethod } from "./ua_method";
|
|
10
|
+
import type { UAObject } from "./ua_object";
|
|
11
|
+
import type { UAObjectType } from "./ua_object_type";
|
|
12
|
+
import type { UAVariable, VariableAttributes } from "./ua_variable";
|
|
13
|
+
import type { UAVariableT } from "./ua_variable_t";
|
|
15
14
|
|
|
16
15
|
export interface InstantiateVariableOptions extends InstantiateOptions {
|
|
17
16
|
arrayDimensions?: number[] | null;
|
|
@@ -37,26 +36,26 @@ export interface InstantiateVariableOptions extends InstantiateOptions {
|
|
|
37
36
|
*/
|
|
38
37
|
valueRank?: number;
|
|
39
38
|
}
|
|
40
|
-
export
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
export interface UAVariableType extends BaseNode, VariableAttributes {
|
|
40
|
+
readonly nodeClass: NodeClass.VariableType;
|
|
41
|
+
readonly subtypeOfObj: UAVariableType | null;
|
|
42
|
+
readonly subtypeOf: NodeId | null;
|
|
44
43
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
dataType: NodeId;
|
|
45
|
+
valueRank: number;
|
|
46
|
+
minimumSamplingInterval: number;
|
|
47
|
+
arrayDimensions: UInt32[] | null;
|
|
48
|
+
historizing: boolean;
|
|
50
49
|
|
|
51
|
-
|
|
50
|
+
isAbstract: boolean;
|
|
52
51
|
|
|
53
|
-
|
|
52
|
+
isSubtypeOf(type: UAVariableType | NodeIdLike): boolean;
|
|
54
53
|
|
|
55
54
|
/** @deprecated - use isSubtypeOf instead */
|
|
56
|
-
|
|
55
|
+
isSupertypeOf(type: UAVariableType | NodeIdLike): boolean;
|
|
57
56
|
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
instantiate(options: InstantiateVariableOptions): UAVariable;
|
|
58
|
+
getBasicDataType(): DataType;
|
|
60
59
|
}
|
|
61
60
|
|
|
62
61
|
export interface UAVariableTypeT<T, DT extends DataType> extends UAVariableType {
|
package/source/ua_view.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { NodeClass } from "node-opcua-data-model";
|
|
2
|
-
import { BaseNode } from "./base_node";
|
|
3
|
-
import { EventNotifierFlags } from "./event_notifier_flags";
|
|
1
|
+
import type { NodeClass } from "node-opcua-data-model";
|
|
2
|
+
import type { BaseNode } from "./base_node";
|
|
3
|
+
import type { EventNotifierFlags } from "./event_notifier_flags";
|
|
4
4
|
|
|
5
5
|
export interface UAView extends BaseNode {
|
|
6
6
|
readonly nodeClass: NodeClass.View;
|