node-opcua-address-space-base 2.75.0 → 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.
Files changed (52) hide show
  1. package/dist/address_space.d.ts +168 -168
  2. package/dist/address_space.js +2 -2
  3. package/dist/base_node.d.ts +186 -186
  4. package/dist/base_node.js +3 -3
  5. package/dist/bind_variable.d.ts +52 -52
  6. package/dist/bind_variable.js +2 -2
  7. package/dist/clone_options.d.ts +44 -44
  8. package/dist/clone_options.js +18 -18
  9. package/dist/continuation_point.d.ts +2 -2
  10. package/dist/continuation_point.js +2 -2
  11. package/dist/event_notifier_flags.d.ts +7 -7
  12. package/dist/event_notifier_flags.js +11 -11
  13. package/dist/i_event_data.d.ts +17 -17
  14. package/dist/i_event_data.js +2 -2
  15. package/dist/index.d.ts +23 -23
  16. package/dist/index.js +39 -39
  17. package/dist/instantiate_options.d.ts +80 -80
  18. package/dist/instantiate_options.js +2 -2
  19. package/dist/modelling_rule_type.d.ts +1 -1
  20. package/dist/modelling_rule_type.js +2 -2
  21. package/dist/namespace.d.ts +279 -279
  22. package/dist/namespace.js +2 -2
  23. package/dist/session_context.d.ts +51 -51
  24. package/dist/session_context.js +2 -2
  25. package/dist/ua_data_type.d.ts +32 -32
  26. package/dist/ua_data_type.js +2 -2
  27. package/dist/ua_dynamic_variable_array.d.ts +12 -12
  28. package/dist/ua_dynamic_variable_array.js +2 -2
  29. package/dist/ua_event_type.d.ts +3 -3
  30. package/dist/ua_event_type.js +2 -2
  31. package/dist/ua_method.d.ts +41 -41
  32. package/dist/ua_method.js +4 -4
  33. package/dist/ua_object.d.ts +131 -127
  34. package/dist/ua_object.js +2 -2
  35. package/dist/ua_object_type.d.ts +27 -27
  36. package/dist/ua_object_type.js +2 -2
  37. package/dist/ua_property.d.ts +16 -16
  38. package/dist/ua_property.js +2 -2
  39. package/dist/ua_reference.d.ts +12 -12
  40. package/dist/ua_reference.js +2 -2
  41. package/dist/ua_reference_type.d.ts +18 -18
  42. package/dist/ua_reference_type.js +3 -3
  43. package/dist/ua_variable.d.ts +285 -285
  44. package/dist/ua_variable.js +2 -2
  45. package/dist/ua_variable_t.d.ts +15 -15
  46. package/dist/ua_variable_t.js +2 -2
  47. package/dist/ua_variable_type.d.ts +39 -39
  48. package/dist/ua_variable_type.js +3 -3
  49. package/dist/ua_view.d.ts +7 -7
  50. package/dist/ua_view.js +2 -2
  51. package/package.json +13 -25
  52. package/source/ua_object.ts +5 -0
@@ -1,51 +1,51 @@
1
- import { Certificate } from "node-opcua-crypto";
2
- import { DataValue } from "node-opcua-data-value";
3
- import { PreciseClock } from "node-opcua-date-time";
4
- import { NodeId, NodeIdLike } from "node-opcua-nodeid";
5
- import { MessageSecurityMode, PermissionType, ReferenceDescription, UserIdentityToken } from "node-opcua-types";
6
- import { StatusCode } from "node-opcua-status-code";
7
- import { ContinuationPoint } from "./continuation_point";
8
- import { BaseNode } from "./base_node";
9
- import { UAObject } from "./ua_object";
10
- import { UAObjectType } from ".";
11
- export interface IChannelBase {
12
- clientCertificate: Certificate | null;
13
- securityMode: MessageSecurityMode;
14
- securityPolicy: string;
15
- }
16
- export interface IContinuationPointInfo<T> {
17
- values: T[] | null;
18
- continuationPoint: ContinuationPoint | undefined;
19
- statusCode: StatusCode;
20
- }
21
- export interface ContinuationData {
22
- continuationPoint: ContinuationPoint | null;
23
- releaseContinuationPoints?: boolean;
24
- index?: number;
25
- }
26
- export interface IContinuationPointManager {
27
- registerHistoryReadRaw(maxElements: number, values: DataValue[], continuationData: ContinuationData): IContinuationPointInfo<DataValue>;
28
- getNextHistoryReadRaw(numValues: number, continuationData: ContinuationData): IContinuationPointInfo<DataValue>;
29
- registerReferences(maxElements: number, values: ReferenceDescription[], continuationData: ContinuationData): IContinuationPointInfo<ReferenceDescription>;
30
- getNextReferences(numValues: number, continuationData: ContinuationData): IContinuationPointInfo<ReferenceDescription>;
31
- }
32
- export interface ISessionBase {
33
- userIdentityToken?: UserIdentityToken;
34
- channel?: IChannelBase;
35
- getSessionId(): NodeId;
36
- continuationPointManager: IContinuationPointManager;
37
- }
38
- export interface ContinuationPointData {
39
- dataValues: DataValue[];
40
- }
41
- export interface ISessionContext {
42
- session?: ISessionBase;
43
- getCurrentUserRoles(): NodeId[];
44
- checkPermission(node: BaseNode, action: PermissionType): boolean;
45
- isBrowseAccessRestricted(node: BaseNode): boolean;
46
- currentUserHasRole(role: NodeIdLike): boolean;
47
- isAccessRestricted(node: BaseNode): boolean;
48
- object?: UAObject | UAObjectType;
49
- currentTime?: PreciseClock;
50
- userIdentity?: string;
51
- }
1
+ import { Certificate } from "node-opcua-crypto";
2
+ import { DataValue } from "node-opcua-data-value";
3
+ import { PreciseClock } from "node-opcua-date-time";
4
+ import { NodeId, NodeIdLike } from "node-opcua-nodeid";
5
+ import { MessageSecurityMode, PermissionType, ReferenceDescription, UserIdentityToken } from "node-opcua-types";
6
+ import { StatusCode } from "node-opcua-status-code";
7
+ import { ContinuationPoint } from "./continuation_point";
8
+ import { BaseNode } from "./base_node";
9
+ import { UAObject } from "./ua_object";
10
+ import { UAObjectType } from ".";
11
+ export interface IChannelBase {
12
+ clientCertificate: Certificate | null;
13
+ securityMode: MessageSecurityMode;
14
+ securityPolicy: string;
15
+ }
16
+ export interface IContinuationPointInfo<T> {
17
+ values: T[] | null;
18
+ continuationPoint: ContinuationPoint | undefined;
19
+ statusCode: StatusCode;
20
+ }
21
+ export interface ContinuationData {
22
+ continuationPoint: ContinuationPoint | null;
23
+ releaseContinuationPoints?: boolean;
24
+ index?: number;
25
+ }
26
+ export interface IContinuationPointManager {
27
+ registerHistoryReadRaw(maxElements: number, values: DataValue[], continuationData: ContinuationData): IContinuationPointInfo<DataValue>;
28
+ getNextHistoryReadRaw(numValues: number, continuationData: ContinuationData): IContinuationPointInfo<DataValue>;
29
+ registerReferences(maxElements: number, values: ReferenceDescription[], continuationData: ContinuationData): IContinuationPointInfo<ReferenceDescription>;
30
+ getNextReferences(numValues: number, continuationData: ContinuationData): IContinuationPointInfo<ReferenceDescription>;
31
+ }
32
+ export interface ISessionBase {
33
+ userIdentityToken?: UserIdentityToken;
34
+ channel?: IChannelBase;
35
+ getSessionId(): NodeId;
36
+ continuationPointManager: IContinuationPointManager;
37
+ }
38
+ export interface ContinuationPointData {
39
+ dataValues: DataValue[];
40
+ }
41
+ export interface ISessionContext {
42
+ session?: ISessionBase;
43
+ getCurrentUserRoles(): NodeId[];
44
+ checkPermission(node: BaseNode, action: PermissionType): boolean;
45
+ isBrowseAccessRestricted(node: BaseNode): boolean;
46
+ currentUserHasRole(role: NodeIdLike): boolean;
47
+ isAccessRestricted(node: BaseNode): boolean;
48
+ object?: UAObject | UAObjectType;
49
+ currentTime?: PreciseClock;
50
+ userIdentity?: string;
51
+ }
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=session_context.js.map
@@ -1,32 +1,32 @@
1
- import { NodeClass } from "node-opcua-data-model";
2
- import { ExpandedNodeId, NodeId, NodeIdLike } from "node-opcua-nodeid";
3
- import { DataType } from "node-opcua-variant";
4
- import { DataTypeDefinition, EnumDefinition, StructureDefinition } from "node-opcua-types";
5
- import { BaseNode } from "./base_node";
6
- export interface UADataType extends BaseNode {
7
- readonly nodeClass: NodeClass.DataType;
8
- readonly subtypeOfObj: UADataType | null;
9
- readonly subtypeOf: NodeId | null;
10
- readonly isAbstract: boolean;
11
- readonly binaryEncodingDefinition: string | null;
12
- readonly binaryEncodingNodeId: ExpandedNodeId | null;
13
- readonly binaryEncoding: BaseNode | null;
14
- readonly xmlEncodingDefinition: string | null;
15
- readonly xmlEncodingNodeId: ExpandedNodeId | null;
16
- readonly xmlEncoding: BaseNode | null;
17
- readonly jsonEncodingNodeId: ExpandedNodeId | null;
18
- readonly jsonEncoding: BaseNode | null;
19
- readonly basicDataType: DataType;
20
- readonly symbolicName: string;
21
- isSupertypeOf(referenceType: NodeIdLike | UADataType): boolean;
22
- getEncodingNode(encodingName: string): BaseNode | null;
23
- /**
24
- *
25
- */
26
- getDefinition(): DataTypeDefinition;
27
- isStructure(): boolean;
28
- getStructureDefinition(): StructureDefinition;
29
- isEnumeration(): boolean;
30
- getEnumDefinition(): EnumDefinition;
31
- getBasicDataType(): DataType;
32
- }
1
+ import { NodeClass } from "node-opcua-data-model";
2
+ import { ExpandedNodeId, NodeId, NodeIdLike } from "node-opcua-nodeid";
3
+ import { DataType } from "node-opcua-variant";
4
+ import { DataTypeDefinition, EnumDefinition, StructureDefinition } from "node-opcua-types";
5
+ import { BaseNode } from "./base_node";
6
+ export interface UADataType extends BaseNode {
7
+ readonly nodeClass: NodeClass.DataType;
8
+ readonly subtypeOfObj: UADataType | null;
9
+ readonly subtypeOf: NodeId | null;
10
+ readonly isAbstract: boolean;
11
+ readonly binaryEncodingDefinition: string | null;
12
+ readonly binaryEncodingNodeId: ExpandedNodeId | null;
13
+ readonly binaryEncoding: BaseNode | null;
14
+ readonly xmlEncodingDefinition: string | null;
15
+ readonly xmlEncodingNodeId: ExpandedNodeId | null;
16
+ readonly xmlEncoding: BaseNode | null;
17
+ readonly jsonEncodingNodeId: ExpandedNodeId | null;
18
+ readonly jsonEncoding: BaseNode | null;
19
+ readonly basicDataType: DataType;
20
+ readonly symbolicName: string;
21
+ isSupertypeOf(referenceType: NodeIdLike | UADataType): boolean;
22
+ getEncodingNode(encodingName: string): BaseNode | null;
23
+ /**
24
+ *
25
+ */
26
+ getDefinition(): DataTypeDefinition;
27
+ isStructure(): boolean;
28
+ getStructureDefinition(): StructureDefinition;
29
+ isEnumeration(): boolean;
30
+ getEnumDefinition(): EnumDefinition;
31
+ getBasicDataType(): DataType;
32
+ }
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=ua_data_type.js.map
@@ -1,12 +1,12 @@
1
- import { QualifiedName } from "node-opcua-data-model";
2
- import { ExtensionObject } from "node-opcua-extension-object";
3
- import { UADataType } from "./ua_data_type";
4
- import { UAVariable } from "./ua_variable";
5
- import { UAVariableType } from "./ua_variable_type";
6
- export interface UADynamicVariableArray<T extends ExtensionObject> extends UAVariable {
7
- $$variableType: UAVariableType;
8
- $$dataType: UADataType;
9
- $$extensionObjectArray: T[];
10
- $$getElementBrowseName: (obj: T) => QualifiedName;
11
- $$indexPropertyName: string;
12
- }
1
+ import { QualifiedName } from "node-opcua-data-model";
2
+ import { ExtensionObject } from "node-opcua-extension-object";
3
+ import { UADataType } from "./ua_data_type";
4
+ import { UAVariable } from "./ua_variable";
5
+ import { UAVariableType } from "./ua_variable_type";
6
+ export interface UADynamicVariableArray<T extends ExtensionObject> extends UAVariable {
7
+ $$variableType: UAVariableType;
8
+ $$dataType: UADataType;
9
+ $$extensionObjectArray: T[];
10
+ $$getElementBrowseName: (obj: T) => QualifiedName;
11
+ $$indexPropertyName: string;
12
+ }
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=ua_dynamic_variable_array.js.map
@@ -1,3 +1,3 @@
1
- import { UAObjectType } from "./ua_object_type";
2
- export interface UAEventType extends UAObjectType {
3
- }
1
+ import { UAObjectType } from "./ua_object_type";
2
+ export interface UAEventType extends UAObjectType {
3
+ }
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=ua_event_type.js.map
@@ -1,41 +1,41 @@
1
- import { NodeClass } from "node-opcua-data-model";
2
- import { NodeId } from "node-opcua-nodeid";
3
- import { Argument, CallMethodResultOptions } from "node-opcua-types";
4
- import { Variant, VariantLike } from "node-opcua-variant";
5
- import { CallbackT } from "node-opcua-status-code";
6
- import { BaseNode } from "./base_node";
7
- import { ISessionContext } from "./session_context";
8
- import { UAObject } from "./ua_object";
9
- import { UAObjectType } from "./ua_object_type";
10
- import { UAVariable } from "./ua_variable";
11
- import { CloneExtraInfo, CloneFilter, CloneOptions } from "./clone_options";
12
- export declare type MethodFunctorC = (this: UAMethod, inputArguments: Variant[], context: ISessionContext, callback: CallbackT<CallMethodResultOptions>) => void;
13
- export declare type MethodFunctorA = (this: UAMethod, inputArguments: Variant[], context: ISessionContext) => Promise<CallMethodResultOptions>;
14
- export declare type MethodFunctor = MethodFunctorC | MethodFunctorA;
15
- export declare class UAMethod extends BaseNode {
16
- readonly nodeClass: NodeClass.Method;
17
- readonly typeDefinition: NodeId;
18
- readonly typeDefinitionObj: UAObjectType;
19
- readonly parent: UAObject | null;
20
- readonly inputArguments?: UAVariable;
21
- readonly outputArguments?: UAVariable;
22
- readonly methodDeclarationId: NodeId;
23
- /**
24
- *
25
- */
26
- _getExecutableFlag?: (sessionContext: ISessionContext | null) => boolean;
27
- bindMethod(methodFunction: MethodFunctor): void;
28
- getExecutableFlag(context: ISessionContext): boolean;
29
- getInputArguments(): Argument[];
30
- getOutputArguments(): Argument[];
31
- /**
32
- * @async
33
- * @param inputArguments
34
- * @param context
35
- * @param callback
36
- */
37
- execute(object: UAObject | UAObjectType | null, inputArguments: VariantLike[] | null, context: ISessionContext, callback: CallbackT<CallMethodResultOptions>): void;
38
- execute(object: UAObject | UAObjectType | null, inputArguments: null | VariantLike[], context: ISessionContext): Promise<CallMethodResultOptions>;
39
- clone(options: CloneOptions, optionalFilter?: CloneFilter, extraInfo?: CloneExtraInfo): UAMethod;
40
- isBound(): boolean;
41
- }
1
+ import { NodeClass } from "node-opcua-data-model";
2
+ import { NodeId } from "node-opcua-nodeid";
3
+ import { Argument, CallMethodResultOptions } from "node-opcua-types";
4
+ import { Variant, VariantLike } from "node-opcua-variant";
5
+ import { CallbackT } from "node-opcua-status-code";
6
+ import { BaseNode } from "./base_node";
7
+ import { ISessionContext } from "./session_context";
8
+ import { UAObject } from "./ua_object";
9
+ import { UAObjectType } from "./ua_object_type";
10
+ import { UAVariable } from "./ua_variable";
11
+ import { CloneExtraInfo, CloneFilter, CloneOptions } from "./clone_options";
12
+ export declare type MethodFunctorC = (this: UAMethod, inputArguments: Variant[], context: ISessionContext, callback: CallbackT<CallMethodResultOptions>) => void;
13
+ export declare type MethodFunctorA = (this: UAMethod, inputArguments: Variant[], context: ISessionContext) => Promise<CallMethodResultOptions>;
14
+ export declare type MethodFunctor = MethodFunctorC | MethodFunctorA;
15
+ export declare class UAMethod extends BaseNode {
16
+ readonly nodeClass: NodeClass.Method;
17
+ readonly typeDefinition: NodeId;
18
+ readonly typeDefinitionObj: UAObjectType;
19
+ readonly parent: UAObject | null;
20
+ readonly inputArguments?: UAVariable;
21
+ readonly outputArguments?: UAVariable;
22
+ readonly methodDeclarationId: NodeId;
23
+ /**
24
+ *
25
+ */
26
+ _getExecutableFlag?: (sessionContext: ISessionContext | null) => boolean;
27
+ bindMethod(methodFunction: MethodFunctor): void;
28
+ getExecutableFlag(context: ISessionContext): boolean;
29
+ getInputArguments(): Argument[];
30
+ getOutputArguments(): Argument[];
31
+ /**
32
+ * @async
33
+ * @param inputArguments
34
+ * @param context
35
+ * @param callback
36
+ */
37
+ execute(object: UAObject | UAObjectType | null, inputArguments: VariantLike[] | null, context: ISessionContext, callback: CallbackT<CallMethodResultOptions>): void;
38
+ execute(object: UAObject | UAObjectType | null, inputArguments: null | VariantLike[], context: ISessionContext): Promise<CallMethodResultOptions>;
39
+ clone(options: CloneOptions, optionalFilter?: CloneFilter, extraInfo?: CloneExtraInfo): UAMethod;
40
+ isBound(): boolean;
41
+ }
package/dist/ua_method.js CHANGED
@@ -1,5 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //
4
- const base_node_1 = require("./base_node");
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //
4
+ const base_node_1 = require("./base_node");
5
5
  //# sourceMappingURL=ua_method.js.map
@@ -1,127 +1,131 @@
1
- /// <reference types="node" />
2
- import { NodeId } from "node-opcua-nodeid";
3
- import { DataType, Variant, VariantArrayType } from "node-opcua-variant";
4
- import { Byte, DateTime, Int16, Int32, SByte, StatusCode, UAString, UInt16, UInt32 } from "node-opcua-basic-types";
5
- import { LocalizedTextLike, NodeClass, QualifiedNameOptions } from "node-opcua-data-model";
6
- import { ExtensionObject } from "node-opcua-extension-object";
7
- import { CloneOptions, CloneFilter, CloneExtraInfo } from "./clone_options";
8
- import { BaseNode, IPropertyAndComponentHolder } from "./base_node";
9
- import { UAObjectType } from "./ua_object_type";
10
- import { IEventData } from "./i_event_data";
11
- import { UAEventType } from "./ua_event_type";
12
- import { UAMethod } from "./ua_method";
13
- import { EventNotifierFlags } from "./event_notifier_flags";
14
- export declare type EventTypeLike = string | NodeId | UAEventType;
15
- export interface PseudoVariantNull {
16
- dataType: "Null" | DataType.Null;
17
- }
18
- export interface PseudoVariantString {
19
- dataType: "String" | DataType.String;
20
- value: UAString;
21
- }
22
- export interface PseudoVariantBoolean {
23
- dataType: "Boolean" | DataType.Boolean;
24
- value: boolean;
25
- }
26
- export interface PseudoVariantDouble {
27
- dataType: "Double" | DataType.Double;
28
- value: number;
29
- }
30
- export interface PseudoVariantFloat {
31
- dataType: "Float" | DataType.Float;
32
- value: number;
33
- }
34
- export interface PseudoVariantNodeId {
35
- dataType: "NodeId" | DataType.NodeId;
36
- value: NodeId;
37
- }
38
- export interface PseudoVariantUInt32 {
39
- dataType: "UInt32" | DataType.UInt32;
40
- value: UInt32;
41
- }
42
- export interface PseudoVariantUInt16 {
43
- dataType: "UInt16" | DataType.UInt16;
44
- value: UInt16;
45
- }
46
- export interface PseudoVariantByte {
47
- dataType: "UInt8" | DataType.Byte;
48
- value: Byte;
49
- }
50
- export interface PseudoVariantInt32 {
51
- dataType: "Int32" | DataType.UInt32;
52
- value: Int32;
53
- }
54
- export interface PseudoVariantInt16 {
55
- dataType: "Int16" | DataType.UInt16;
56
- value: Int16;
57
- }
58
- export interface PseudoVariantSByte {
59
- dataType: "SByte" | DataType.SByte;
60
- value: SByte;
61
- }
62
- export interface PseudoVariantDateTime {
63
- dataType: "DateTime" | DataType.DateTime;
64
- value: DateTime;
65
- }
66
- export interface PseudoVariantLocalizedText {
67
- dataType: "LocalizedText" | DataType.LocalizedText;
68
- value: LocalizedTextLike;
69
- }
70
- export interface PseudoVariantDuration {
71
- dataType: "Duration";
72
- value: number;
73
- }
74
- export interface PseudoVariantStatusCode {
75
- dataType: "StatusCode" | DataType.StatusCode;
76
- value: StatusCode;
77
- }
78
- export interface PseudoVariantByteString {
79
- dataType: "ByteString" | DataType.ByteString;
80
- value: Buffer | null;
81
- }
82
- export interface PseudoVariantExtensionObject {
83
- dataType: "ExtensionObject" | DataType.ExtensionObject;
84
- value: ExtensionObject;
85
- }
86
- export interface PseudoVariantExtensionObjectArray {
87
- dataType: "ExtensionObject" | DataType.ExtensionObject;
88
- arrayType: VariantArrayType.Array;
89
- value: ExtensionObject[];
90
- }
91
- export interface PseudoVariantVariantArray {
92
- dataType: "Variant" | DataType.Variant;
93
- arrayType: VariantArrayType.Array;
94
- value: Variant[];
95
- }
96
- export interface PseudoVariantVariant {
97
- dataType: "Variant" | DataType.Variant;
98
- value: Variant;
99
- }
100
- export declare type PseudoVariantNumber = PseudoVariantUInt32 | PseudoVariantUInt16 | PseudoVariantByte | PseudoVariantInt32 | PseudoVariantInt16 | PseudoVariantSByte | PseudoVariantDouble | PseudoVariantFloat;
101
- export declare type PseudoVariant = PseudoVariantNull | PseudoVariantString | PseudoVariantBoolean | PseudoVariantByteString | PseudoVariantNodeId | PseudoVariantDateTime | PseudoVariantByteString | PseudoVariantDuration | PseudoVariantLocalizedText | PseudoVariantStatusCode | PseudoVariantNumber | PseudoVariantExtensionObject | PseudoVariantExtensionObjectArray | PseudoVariantVariant | PseudoVariantVariantArray;
102
- export interface RaiseEventData {
103
- $eventDataSource?: UAEventType;
104
- sourceNode?: PseudoVariantNodeId | Variant;
105
- [key: string]: PseudoVariant | Variant | UAEventType | undefined;
106
- }
107
- export interface EventRaiser {
108
- raiseEvent(eventType: EventTypeLike, eventData: RaiseEventData): void;
109
- }
110
- export interface UAObject extends BaseNode, EventRaiser, IPropertyAndComponentHolder {
111
- readonly nodeClass: NodeClass.Object;
112
- get parent(): BaseNode | null;
113
- get typeDefinitionObj(): UAObjectType;
114
- get typeDefinition(): NodeId;
115
- readonly eventNotifier: EventNotifierFlags;
116
- readonly hasMethods: boolean;
117
- getFolderElementByName(browseName: QualifiedNameOptions): BaseNode | null;
118
- getFolderElementByName(browseName: string, namespaceIndex?: number): BaseNode | null;
119
- getMethodById(nodeId: NodeId): UAMethod | null;
120
- getMethodByName(methodName: QualifiedNameOptions): UAMethod | null;
121
- getMethodByName(methodName: string, namespaceIndex?: number): UAMethod | null;
122
- getMethods(): UAMethod[];
123
- raiseEvent(eventType: EventTypeLike | BaseNode, eventData: RaiseEventData): void;
124
- on(eventName: "event", eventHandler: (eventData: IEventData) => void): this;
125
- setEventNotifier(eventNotifierFlags: EventNotifierFlags): void;
126
- clone(options: CloneOptions, optionalFilter?: CloneFilter, extraInfo?: CloneExtraInfo): UAObject;
127
- }
1
+ /// <reference types="node" />
2
+ import { NodeId } from "node-opcua-nodeid";
3
+ import { DataType, Variant, VariantArrayType } from "node-opcua-variant";
4
+ import { Byte, DateTime, Int16, Int32, SByte, StatusCode, UAString, UInt16, UInt32 } from "node-opcua-basic-types";
5
+ import { LocalizedTextLike, NodeClass, QualifiedNameOptions } from "node-opcua-data-model";
6
+ import { ExtensionObject } from "node-opcua-extension-object";
7
+ import { CloneOptions, CloneFilter, CloneExtraInfo } from "./clone_options";
8
+ import { BaseNode, IPropertyAndComponentHolder } from "./base_node";
9
+ import { UAObjectType } from "./ua_object_type";
10
+ import { IEventData } from "./i_event_data";
11
+ import { UAEventType } from "./ua_event_type";
12
+ import { UAMethod } from "./ua_method";
13
+ import { EventNotifierFlags } from "./event_notifier_flags";
14
+ export declare type EventTypeLike = string | NodeId | UAEventType;
15
+ export interface PseudoVariantNull {
16
+ dataType: "Null" | DataType.Null;
17
+ }
18
+ export interface PseudoVariantString {
19
+ dataType: "String" | DataType.String;
20
+ value: UAString;
21
+ }
22
+ export interface PseudoVariantStringPredefined<S extends string> {
23
+ dataType: "String" | DataType.String;
24
+ value: S;
25
+ }
26
+ export interface PseudoVariantBoolean {
27
+ dataType: "Boolean" | DataType.Boolean;
28
+ value: boolean;
29
+ }
30
+ export interface PseudoVariantDouble {
31
+ dataType: "Double" | DataType.Double;
32
+ value: number;
33
+ }
34
+ export interface PseudoVariantFloat {
35
+ dataType: "Float" | DataType.Float;
36
+ value: number;
37
+ }
38
+ export interface PseudoVariantNodeId {
39
+ dataType: "NodeId" | DataType.NodeId;
40
+ value: NodeId;
41
+ }
42
+ export interface PseudoVariantUInt32 {
43
+ dataType: "UInt32" | DataType.UInt32;
44
+ value: UInt32;
45
+ }
46
+ export interface PseudoVariantUInt16 {
47
+ dataType: "UInt16" | DataType.UInt16;
48
+ value: UInt16;
49
+ }
50
+ export interface PseudoVariantByte {
51
+ dataType: "UInt8" | DataType.Byte;
52
+ value: Byte;
53
+ }
54
+ export interface PseudoVariantInt32 {
55
+ dataType: "Int32" | DataType.UInt32;
56
+ value: Int32;
57
+ }
58
+ export interface PseudoVariantInt16 {
59
+ dataType: "Int16" | DataType.UInt16;
60
+ value: Int16;
61
+ }
62
+ export interface PseudoVariantSByte {
63
+ dataType: "SByte" | DataType.SByte;
64
+ value: SByte;
65
+ }
66
+ export interface PseudoVariantDateTime {
67
+ dataType: "DateTime" | DataType.DateTime;
68
+ value: DateTime;
69
+ }
70
+ export interface PseudoVariantLocalizedText {
71
+ dataType: "LocalizedText" | DataType.LocalizedText;
72
+ value: LocalizedTextLike;
73
+ }
74
+ export interface PseudoVariantDuration {
75
+ dataType: "Duration";
76
+ value: number;
77
+ }
78
+ export interface PseudoVariantStatusCode {
79
+ dataType: "StatusCode" | DataType.StatusCode;
80
+ value: StatusCode;
81
+ }
82
+ export interface PseudoVariantByteString {
83
+ dataType: "ByteString" | DataType.ByteString;
84
+ value: Buffer | null;
85
+ }
86
+ export interface PseudoVariantExtensionObject {
87
+ dataType: "ExtensionObject" | DataType.ExtensionObject;
88
+ value: ExtensionObject;
89
+ }
90
+ export interface PseudoVariantExtensionObjectArray {
91
+ dataType: "ExtensionObject" | DataType.ExtensionObject;
92
+ arrayType: VariantArrayType.Array;
93
+ value: ExtensionObject[];
94
+ }
95
+ export interface PseudoVariantVariantArray {
96
+ dataType: "Variant" | DataType.Variant;
97
+ arrayType: VariantArrayType.Array;
98
+ value: Variant[];
99
+ }
100
+ export interface PseudoVariantVariant {
101
+ dataType: "Variant" | DataType.Variant;
102
+ value: Variant;
103
+ }
104
+ export declare type PseudoVariantNumber = PseudoVariantUInt32 | PseudoVariantUInt16 | PseudoVariantByte | PseudoVariantInt32 | PseudoVariantInt16 | PseudoVariantSByte | PseudoVariantDouble | PseudoVariantFloat;
105
+ export declare type PseudoVariant = PseudoVariantNull | PseudoVariantString | PseudoVariantBoolean | PseudoVariantByteString | PseudoVariantNodeId | PseudoVariantDateTime | PseudoVariantByteString | PseudoVariantDuration | PseudoVariantLocalizedText | PseudoVariantStatusCode | PseudoVariantNumber | PseudoVariantExtensionObject | PseudoVariantExtensionObjectArray | PseudoVariantVariant | PseudoVariantVariantArray;
106
+ export interface RaiseEventData {
107
+ $eventDataSource?: UAEventType;
108
+ sourceNode?: PseudoVariantNodeId | Variant;
109
+ [key: string]: PseudoVariant | Variant | UAEventType | undefined;
110
+ }
111
+ export interface EventRaiser {
112
+ raiseEvent(eventType: EventTypeLike, eventData: RaiseEventData): void;
113
+ }
114
+ export interface UAObject extends BaseNode, EventRaiser, IPropertyAndComponentHolder {
115
+ readonly nodeClass: NodeClass.Object;
116
+ get parent(): BaseNode | null;
117
+ get typeDefinitionObj(): UAObjectType;
118
+ get typeDefinition(): NodeId;
119
+ readonly eventNotifier: EventNotifierFlags;
120
+ readonly hasMethods: boolean;
121
+ getFolderElementByName(browseName: QualifiedNameOptions): BaseNode | null;
122
+ getFolderElementByName(browseName: string, namespaceIndex?: number): BaseNode | null;
123
+ getMethodById(nodeId: NodeId): UAMethod | null;
124
+ getMethodByName(methodName: QualifiedNameOptions): UAMethod | null;
125
+ getMethodByName(methodName: string, namespaceIndex?: number): UAMethod | null;
126
+ getMethods(): UAMethod[];
127
+ raiseEvent(eventType: EventTypeLike | BaseNode, eventData: RaiseEventData): void;
128
+ on(eventName: "event", eventHandler: (eventData: IEventData) => void): this;
129
+ setEventNotifier(eventNotifierFlags: EventNotifierFlags): void;
130
+ clone(options: CloneOptions, optionalFilter?: CloneFilter, extraInfo?: CloneExtraInfo): UAObject;
131
+ }
package/dist/ua_object.js CHANGED
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=ua_object.js.map