node-opcua-client 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.
Files changed (83) hide show
  1. package/LICENSE +3 -1
  2. package/README.md +54 -0
  3. package/dist/alarms_and_conditions/client_alarm.d.ts +49 -45
  4. package/dist/alarms_and_conditions/client_alarm.js +109 -101
  5. package/dist/alarms_and_conditions/client_alarm.js.map +1 -1
  6. package/dist/alarms_and_conditions/client_alarm_list.d.ts +25 -25
  7. package/dist/alarms_and_conditions/client_alarm_list.js +97 -97
  8. package/dist/alarms_and_conditions/client_alarm_list.js.map +1 -1
  9. package/dist/alarms_and_conditions/client_alarm_tools.d.ts +4 -4
  10. package/dist/alarms_and_conditions/client_alarm_tools.js +156 -152
  11. package/dist/alarms_and_conditions/client_alarm_tools.js.map +1 -1
  12. package/dist/alarms_and_conditions/client_alarm_tools_acknowledge_all_conditions.d.ts +18 -18
  13. package/dist/alarms_and_conditions/client_alarm_tools_acknowledge_all_conditions.js +192 -190
  14. package/dist/alarms_and_conditions/client_alarm_tools_acknowledge_all_conditions.js.map +1 -1
  15. package/dist/alarms_and_conditions/client_alarm_tools_dump_event.d.ts +9 -9
  16. package/dist/alarms_and_conditions/client_alarm_tools_dump_event.js +73 -73
  17. package/dist/alarms_and_conditions/client_alarm_tools_extractConditionFields.d.ts +3 -8
  18. package/dist/alarms_and_conditions/client_alarm_tools_extractConditionFields.js +118 -120
  19. package/dist/alarms_and_conditions/client_alarm_tools_extractConditionFields.js.map +1 -1
  20. package/dist/alarms_and_conditions/client_tools.d.ts +7 -7
  21. package/dist/alarms_and_conditions/client_tools.js +180 -180
  22. package/dist/client_base.d.ts +277 -277
  23. package/dist/client_base.js +14 -14
  24. package/dist/client_monitored_item.d.ts +21 -21
  25. package/dist/client_monitored_item.js +11 -11
  26. package/dist/client_monitored_item_base.d.ts +39 -39
  27. package/dist/client_monitored_item_base.js +2 -2
  28. package/dist/client_monitored_item_group.d.ts +18 -18
  29. package/dist/client_monitored_item_group.js +13 -13
  30. package/dist/client_monitored_item_toolbox.d.ts +15 -15
  31. package/dist/client_monitored_item_toolbox.js +117 -117
  32. package/dist/client_session.d.ts +484 -484
  33. package/dist/client_session.js +10 -10
  34. package/dist/client_session_keepalive_manager.d.ts +34 -34
  35. package/dist/client_session_keepalive_manager.js +150 -150
  36. package/dist/client_subscription.d.ts +241 -241
  37. package/dist/client_subscription.js +14 -14
  38. package/dist/client_utils.d.ts +22 -22
  39. package/dist/client_utils.js +88 -88
  40. package/dist/common.d.ts +17 -17
  41. package/dist/common.js +5 -5
  42. package/dist/index.d.ts +55 -55
  43. package/dist/index.js +93 -93
  44. package/dist/opcua_client.d.ts +132 -132
  45. package/dist/opcua_client.js +33 -33
  46. package/dist/private/client_base_impl.d.ts +157 -157
  47. package/dist/private/client_base_impl.js +1337 -1337
  48. package/dist/private/client_monitored_item_base_impl.d.ts +3 -3
  49. package/dist/private/client_monitored_item_base_impl.js +4 -4
  50. package/dist/private/client_monitored_item_group_impl.d.ts +53 -53
  51. package/dist/private/client_monitored_item_group_impl.js +159 -159
  52. package/dist/private/client_monitored_item_impl.d.ts +93 -93
  53. package/dist/private/client_monitored_item_impl.js +305 -304
  54. package/dist/private/client_monitored_item_impl.js.map +1 -1
  55. package/dist/private/client_publish_engine.d.ts +62 -62
  56. package/dist/private/client_publish_engine.js +408 -408
  57. package/dist/private/client_session_impl.d.ts +621 -621
  58. package/dist/private/client_session_impl.js +1302 -1301
  59. package/dist/private/client_session_impl.js.map +1 -1
  60. package/dist/private/client_subscription_impl.d.ts +93 -93
  61. package/dist/private/client_subscription_impl.js +748 -743
  62. package/dist/private/client_subscription_impl.js.map +1 -1
  63. package/dist/private/i_private_client.d.ts +18 -18
  64. package/dist/private/i_private_client.js +2 -2
  65. package/dist/private/opcua_client_impl.d.ts +169 -169
  66. package/dist/private/opcua_client_impl.js +981 -981
  67. package/dist/reconnection.d.ts +9 -9
  68. package/dist/reconnection.js +408 -408
  69. package/dist/tools/findservers.d.ts +20 -20
  70. package/dist/tools/findservers.js +61 -61
  71. package/dist/tools/read_history_server_capabilities.d.ts +6 -6
  72. package/dist/tools/read_history_server_capabilities.js +99 -99
  73. package/dist/verify.d.ts +5 -5
  74. package/dist/verify.js +134 -134
  75. package/package.json +48 -48
  76. package/source/alarms_and_conditions/client_alarm.ts +28 -17
  77. package/source/alarms_and_conditions/client_alarm_list.ts +1 -0
  78. package/source/alarms_and_conditions/client_alarm_tools.ts +33 -23
  79. package/source/alarms_and_conditions/client_alarm_tools_acknowledge_all_conditions.ts +10 -4
  80. package/source/alarms_and_conditions/client_alarm_tools_extractConditionFields.ts +11 -11
  81. package/source/private/client_monitored_item_impl.ts +4 -3
  82. package/source/private/client_session_impl.ts +10 -2
  83. package/source/private/client_subscription_impl.ts +6 -2
@@ -1,241 +1,241 @@
1
- /**
2
- * @module node-opcua-client
3
- */
4
- /// <reference types="node" />
5
- import { EventEmitter } from "events";
6
- import { Byte, Double, UInt32 } from "node-opcua-basic-types";
7
- import { DiagnosticInfo } from "node-opcua-data-model";
8
- import { ReadValueIdOptions, TimestampsToReturn } from "node-opcua-service-read";
9
- import { MonitoringMode, MonitoringParametersOptions, NotificationMessage, SetTriggeringResponse } from "node-opcua-service-subscription";
10
- import { Callback, StatusCode } from "node-opcua-status-code";
11
- import { ErrorCallback } from "node-opcua-status-code";
12
- import { ClientMonitoredItem } from "./client_monitored_item";
13
- import { ClientMonitoredItemBase } from "./client_monitored_item_base";
14
- import { ClientMonitoredItemGroup } from "./client_monitored_item_group";
15
- import { ClientSession, MonitoredItemData, SubscriptionId } from "./client_session";
16
- export interface ClientSubscriptionOptions {
17
- requestedPublishingInterval?: number;
18
- requestedLifetimeCount?: number;
19
- requestedMaxKeepAliveCount?: number;
20
- maxNotificationsPerPublish?: number;
21
- publishingEnabled?: boolean;
22
- priority?: number;
23
- }
24
- export declare type ClientHandle = number;
25
- export interface ClientMonitoredItemBaseMap {
26
- [key: string]: ClientMonitoredItemBase;
27
- }
28
- export interface ModifySubscriptionOptions {
29
- requestedPublishingInterval?: Double;
30
- requestedLifetimeCount?: UInt32;
31
- requestedMaxKeepAliveCount?: UInt32;
32
- maxNotificationsPerPublish?: UInt32;
33
- priority?: Byte;
34
- }
35
- export interface ModifySubscriptionResult {
36
- revisedPublishingInterval: Double;
37
- revisedLifetimeCount: UInt32;
38
- revisedMaxKeepAliveCount: UInt32;
39
- }
40
- export interface ClientSubscription extends EventEmitter {
41
- subscriptionId: SubscriptionId;
42
- publishingInterval: number;
43
- lifetimeCount: number;
44
- maxKeepAliveCount: number;
45
- maxNotificationsPerPublish: number;
46
- publishingEnabled: boolean;
47
- priority: number;
48
- monitoredItems: ClientMonitoredItemBaseMap;
49
- timeoutHint: number;
50
- /**
51
- * return the session associated with the subscription.
52
- * (may throw if the session is not valid)
53
- */
54
- session: ClientSession;
55
- /**
56
- * return true if the subscription is attached to a valid session
57
- */
58
- hasSession: boolean;
59
- /**
60
- * true is the subscription is fully active
61
- */
62
- isActive: boolean;
63
- /**
64
- * add a monitor item to the subscription
65
- *
66
- * @method monitor
67
- *
68
- * Monitoring a simple Value Change
69
- * ---------------------------------
70
- *
71
- * @example:
72
- *
73
- * clientSubscription.monitor(
74
- * // itemToMonitor:
75
- * {
76
- * nodeId: "ns=0;i=2258",
77
- * attributeId: AttributeIds.Value,
78
- * indexRange: null,
79
- * dataEncoding: { namespaceIndex: 0, name: null }
80
- * },
81
- * // requestedParameters:
82
- * {
83
- * samplingInterval: 3000,
84
- * filter: null,
85
- * queueSize: 1,
86
- * discardOldest: true
87
- * },
88
- * TimestampsToReturn.Neither
89
- * );
90
- *
91
- * Monitoring a Value Change With a DataChange Filter
92
- * ---------------------------------------------------
93
- *
94
- * options.trigger {DataChangeTrigger} {Status|StatusValue|StatusValueTimestamp}
95
- * options.deadbandType {DeadbandType} {None|Absolute|Percent}
96
- * options.deadbandValue {Double}
97
- *
98
- * @example:
99
- *
100
- * clientSubscription.monitor(
101
- * // itemToMonitor:
102
- * {
103
- * nodeId: "ns=0;i=2258",
104
- * attributeId: AttributeIds.Value,
105
- * },
106
- * // requestedParameters:
107
- * {
108
- * samplingInterval: 3000,
109
- * filter: new DataChangeFilter({
110
- * trigger: DataChangeTrigger.StatusValue,
111
- * deadbandType: DeadbandType.Absolute,
112
- * deadbandValue: 0.1
113
- * }),
114
- * queueSize: 1,
115
- * discardOldest: true
116
- * },
117
- * TimestampsToReturn.Neither
118
- * );
119
- *
120
- *
121
- * Monitoring an Event
122
- * -------------------
123
- *
124
- * If the monitor attributeId is EventNotifier then the filter must be specified
125
- *
126
- * @example:
127
- *
128
- * var filter = new EventFilter({
129
- * selectClauses: [
130
- * { browsePath: [ {name: 'ActiveState' }, {name: 'id'} ]},
131
- * { browsePath: [ {name: 'ConditionName'} ]}
132
- * ],
133
- * whereClause: []
134
- * });
135
- *
136
- * clientSubscription.monitor(
137
- * // itemToMonitor:
138
- * {
139
- * nodeId: "ns=0;i=2258",
140
- * attributeId: AttributeIds.EventNotifier,
141
- * indexRange: null,
142
- * dataEncoding: { namespaceIndex: 0, name: null }
143
- * },
144
- * // requestedParameters:
145
- * {
146
- * samplingInterval: 3000,
147
- *
148
- * filter: filter,
149
- *
150
- * queueSize: 1,
151
- * discardOldest: true
152
- * },
153
- * TimestampsToReturn.Neither
154
- * );
155
- *
156
- *
157
- *
158
- *
159
- *
160
- *
161
- */
162
- monitor(itemToMonitor: ReadValueIdOptions, requestedParameters: MonitoringParametersOptions, timestampsToReturn: TimestampsToReturn, monitoringMode?: MonitoringMode): Promise<ClientMonitoredItem>;
163
- monitor(itemToMonitor: ReadValueIdOptions, requestedParameters: MonitoringParametersOptions, timestampsToReturn: TimestampsToReturn, monitoringMode: MonitoringMode, callback: Callback<ClientMonitoredItem>): void;
164
- /**
165
- * @method monitorItems
166
- * @param itemsToMonitor
167
- * @param requestedParameters
168
- * @param timestampsToReturn
169
- * @return a ClientMonitoredItemGroup
170
- * @async
171
- */
172
- monitorItems(itemsToMonitor: ReadValueIdOptions[], requestedParameters: MonitoringParametersOptions, timestampsToReturn: TimestampsToReturn): Promise<ClientMonitoredItemGroup>;
173
- /**
174
- * @method monitorItems
175
- * @param itemsToMonitor
176
- * @param requestedParameters
177
- * @param timestampsToReturn
178
- * @param done
179
- * @async
180
- */
181
- monitorItems(itemsToMonitor: ReadValueIdOptions[], requestedParameters: MonitoringParametersOptions, timestampsToReturn: TimestampsToReturn, callback: Callback<ClientMonitoredItemGroup>): void;
182
- getMonitoredItems(): Promise<MonitoredItemData>;
183
- getMonitoredItems(callback: (err: Error | null, result?: MonitoredItemData) => void): void;
184
- modify(options: ModifySubscriptionOptions, callback: Callback<ModifySubscriptionResult>): void;
185
- modify(options: ModifySubscriptionOptions): Promise<ModifySubscriptionResult>;
186
- setTriggering(triggeringItem: ClientMonitoredItemBase, linksToAdd: ClientMonitoredItemBase[] | null, linksToRemove: ClientMonitoredItemBase[] | null, callback: Callback<SetTriggeringResponse>): void;
187
- setTriggering(triggeringItem: ClientMonitoredItemBase, linksToAdd: ClientMonitoredItemBase[] | null, linksToRemove: ClientMonitoredItemBase[] | null): Promise<SetTriggeringResponse>;
188
- terminate(): Promise<void>;
189
- terminate(callback: ErrorCallback): void;
190
- }
191
- export declare interface ClientSubscription {
192
- once(event: string | symbol, listener: (...args: any[]) => void): this;
193
- on(event: string | symbol, listener: (...args: any[]) => void): this;
194
- /**
195
- * notify the observers that the subscription has now started
196
- * @event started
197
- */
198
- on(event: "started", eventHandler: (subscriptionId: number) => void): this;
199
- /**
200
- * notify the observers tha the client subscription has terminated
201
- * @event terminated
202
- */
203
- on(event: "terminated", eventHandler: () => void): this;
204
- /**
205
- * notify the observers that a new monitored item has been added to the subscription.
206
- * @event item_added
207
- */
208
- on(event: "item_added", eventHandler: (monitoredItem: ClientMonitoredItem) => void): this;
209
- /**
210
- * notify the observers that a keep alive Publish Response has been received from the server.
211
- * @event keepalive
212
- */
213
- on(event: "keepalive", eventHandler: () => void): this;
214
- /**
215
- * notify the observers that an error has occurred
216
- * @event internal_error
217
- * @param event
218
- * @param eventHandler
219
- */
220
- on(event: "internal_error", eventHandler: (err: Error) => void): this;
221
- on(event: "raw_notification", eventHandler: (notificationMessage: NotificationMessage) => void): this;
222
- /**
223
- * notify the observers that some notifications has been received from the server in a PublishResponse
224
- * each modified monitored Item
225
- * @event received_notifications
226
- */
227
- on(event: "received_notifications", eventHandler: (notificationMessage: NotificationMessage) => void): this;
228
- /**
229
- * notify the observers that the server has send a status changed notification (such as BadTimeout )
230
- * @event status_changed
231
- */
232
- on(event: "status_changed", eventHandler: (status: StatusCode, diagnosticInfo: DiagnosticInfo) => void): this;
233
- on(event: "error", eventHandler: (err: Error) => void): this;
234
- }
235
- export declare interface ClientSubscription {
236
- _createMonitoredItem(itemToMonitor: ReadValueIdOptions, monitoringParameters: MonitoringParametersOptions, timestampsToReturn: TimestampsToReturn): ClientMonitoredItem;
237
- }
238
- export declare class ClientSubscription {
239
- static create(clientSession: ClientSession, options: ClientSubscriptionOptions): ClientSubscription;
240
- static ignoreNextWarning: boolean;
241
- }
1
+ /**
2
+ * @module node-opcua-client
3
+ */
4
+ /// <reference types="node" />
5
+ import { EventEmitter } from "events";
6
+ import { Byte, Double, UInt32 } from "node-opcua-basic-types";
7
+ import { DiagnosticInfo } from "node-opcua-data-model";
8
+ import { ReadValueIdOptions, TimestampsToReturn } from "node-opcua-service-read";
9
+ import { MonitoringMode, MonitoringParametersOptions, NotificationMessage, SetTriggeringResponse } from "node-opcua-service-subscription";
10
+ import { Callback, StatusCode } from "node-opcua-status-code";
11
+ import { ErrorCallback } from "node-opcua-status-code";
12
+ import { ClientMonitoredItem } from "./client_monitored_item";
13
+ import { ClientMonitoredItemBase } from "./client_monitored_item_base";
14
+ import { ClientMonitoredItemGroup } from "./client_monitored_item_group";
15
+ import { ClientSession, MonitoredItemData, SubscriptionId } from "./client_session";
16
+ export interface ClientSubscriptionOptions {
17
+ requestedPublishingInterval?: number;
18
+ requestedLifetimeCount?: number;
19
+ requestedMaxKeepAliveCount?: number;
20
+ maxNotificationsPerPublish?: number;
21
+ publishingEnabled?: boolean;
22
+ priority?: number;
23
+ }
24
+ export declare type ClientHandle = number;
25
+ export interface ClientMonitoredItemBaseMap {
26
+ [key: string]: ClientMonitoredItemBase;
27
+ }
28
+ export interface ModifySubscriptionOptions {
29
+ requestedPublishingInterval?: Double;
30
+ requestedLifetimeCount?: UInt32;
31
+ requestedMaxKeepAliveCount?: UInt32;
32
+ maxNotificationsPerPublish?: UInt32;
33
+ priority?: Byte;
34
+ }
35
+ export interface ModifySubscriptionResult {
36
+ revisedPublishingInterval: Double;
37
+ revisedLifetimeCount: UInt32;
38
+ revisedMaxKeepAliveCount: UInt32;
39
+ }
40
+ export interface ClientSubscription extends EventEmitter {
41
+ subscriptionId: SubscriptionId;
42
+ publishingInterval: number;
43
+ lifetimeCount: number;
44
+ maxKeepAliveCount: number;
45
+ maxNotificationsPerPublish: number;
46
+ publishingEnabled: boolean;
47
+ priority: number;
48
+ monitoredItems: ClientMonitoredItemBaseMap;
49
+ timeoutHint: number;
50
+ /**
51
+ * return the session associated with the subscription.
52
+ * (may throw if the session is not valid)
53
+ */
54
+ session: ClientSession;
55
+ /**
56
+ * return true if the subscription is attached to a valid session
57
+ */
58
+ hasSession: boolean;
59
+ /**
60
+ * true is the subscription is fully active
61
+ */
62
+ isActive: boolean;
63
+ /**
64
+ * add a monitor item to the subscription
65
+ *
66
+ * @method monitor
67
+ *
68
+ * Monitoring a simple Value Change
69
+ * ---------------------------------
70
+ *
71
+ * @example:
72
+ *
73
+ * clientSubscription.monitor(
74
+ * // itemToMonitor:
75
+ * {
76
+ * nodeId: "ns=0;i=2258",
77
+ * attributeId: AttributeIds.Value,
78
+ * indexRange: null,
79
+ * dataEncoding: { namespaceIndex: 0, name: null }
80
+ * },
81
+ * // requestedParameters:
82
+ * {
83
+ * samplingInterval: 3000,
84
+ * filter: null,
85
+ * queueSize: 1,
86
+ * discardOldest: true
87
+ * },
88
+ * TimestampsToReturn.Neither
89
+ * );
90
+ *
91
+ * Monitoring a Value Change With a DataChange Filter
92
+ * ---------------------------------------------------
93
+ *
94
+ * options.trigger {DataChangeTrigger} {Status|StatusValue|StatusValueTimestamp}
95
+ * options.deadbandType {DeadbandType} {None|Absolute|Percent}
96
+ * options.deadbandValue {Double}
97
+ *
98
+ * @example:
99
+ *
100
+ * clientSubscription.monitor(
101
+ * // itemToMonitor:
102
+ * {
103
+ * nodeId: "ns=0;i=2258",
104
+ * attributeId: AttributeIds.Value,
105
+ * },
106
+ * // requestedParameters:
107
+ * {
108
+ * samplingInterval: 3000,
109
+ * filter: new DataChangeFilter({
110
+ * trigger: DataChangeTrigger.StatusValue,
111
+ * deadbandType: DeadbandType.Absolute,
112
+ * deadbandValue: 0.1
113
+ * }),
114
+ * queueSize: 1,
115
+ * discardOldest: true
116
+ * },
117
+ * TimestampsToReturn.Neither
118
+ * );
119
+ *
120
+ *
121
+ * Monitoring an Event
122
+ * -------------------
123
+ *
124
+ * If the monitor attributeId is EventNotifier then the filter must be specified
125
+ *
126
+ * @example:
127
+ *
128
+ * var filter = new EventFilter({
129
+ * selectClauses: [
130
+ * { browsePath: [ {name: 'ActiveState' }, {name: 'id'} ]},
131
+ * { browsePath: [ {name: 'ConditionName'} ]}
132
+ * ],
133
+ * whereClause: []
134
+ * });
135
+ *
136
+ * clientSubscription.monitor(
137
+ * // itemToMonitor:
138
+ * {
139
+ * nodeId: "ns=0;i=2258",
140
+ * attributeId: AttributeIds.EventNotifier,
141
+ * indexRange: null,
142
+ * dataEncoding: { namespaceIndex: 0, name: null }
143
+ * },
144
+ * // requestedParameters:
145
+ * {
146
+ * samplingInterval: 3000,
147
+ *
148
+ * filter: filter,
149
+ *
150
+ * queueSize: 1,
151
+ * discardOldest: true
152
+ * },
153
+ * TimestampsToReturn.Neither
154
+ * );
155
+ *
156
+ *
157
+ *
158
+ *
159
+ *
160
+ *
161
+ */
162
+ monitor(itemToMonitor: ReadValueIdOptions, requestedParameters: MonitoringParametersOptions, timestampsToReturn: TimestampsToReturn, monitoringMode?: MonitoringMode): Promise<ClientMonitoredItem>;
163
+ monitor(itemToMonitor: ReadValueIdOptions, requestedParameters: MonitoringParametersOptions, timestampsToReturn: TimestampsToReturn, monitoringMode: MonitoringMode, callback: Callback<ClientMonitoredItem>): void;
164
+ /**
165
+ * @method monitorItems
166
+ * @param itemsToMonitor
167
+ * @param requestedParameters
168
+ * @param timestampsToReturn
169
+ * @return a ClientMonitoredItemGroup
170
+ * @async
171
+ */
172
+ monitorItems(itemsToMonitor: ReadValueIdOptions[], requestedParameters: MonitoringParametersOptions, timestampsToReturn: TimestampsToReturn): Promise<ClientMonitoredItemGroup>;
173
+ /**
174
+ * @method monitorItems
175
+ * @param itemsToMonitor
176
+ * @param requestedParameters
177
+ * @param timestampsToReturn
178
+ * @param done
179
+ * @async
180
+ */
181
+ monitorItems(itemsToMonitor: ReadValueIdOptions[], requestedParameters: MonitoringParametersOptions, timestampsToReturn: TimestampsToReturn, callback: Callback<ClientMonitoredItemGroup>): void;
182
+ getMonitoredItems(): Promise<MonitoredItemData>;
183
+ getMonitoredItems(callback: (err: Error | null, result?: MonitoredItemData) => void): void;
184
+ modify(options: ModifySubscriptionOptions, callback: Callback<ModifySubscriptionResult>): void;
185
+ modify(options: ModifySubscriptionOptions): Promise<ModifySubscriptionResult>;
186
+ setTriggering(triggeringItem: ClientMonitoredItemBase, linksToAdd: ClientMonitoredItemBase[] | null, linksToRemove: ClientMonitoredItemBase[] | null, callback: Callback<SetTriggeringResponse>): void;
187
+ setTriggering(triggeringItem: ClientMonitoredItemBase, linksToAdd: ClientMonitoredItemBase[] | null, linksToRemove: ClientMonitoredItemBase[] | null): Promise<SetTriggeringResponse>;
188
+ terminate(): Promise<void>;
189
+ terminate(callback: ErrorCallback): void;
190
+ }
191
+ export declare interface ClientSubscription {
192
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
193
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
194
+ /**
195
+ * notify the observers that the subscription has now started
196
+ * @event started
197
+ */
198
+ on(event: "started", eventHandler: (subscriptionId: number) => void): this;
199
+ /**
200
+ * notify the observers tha the client subscription has terminated
201
+ * @event terminated
202
+ */
203
+ on(event: "terminated", eventHandler: () => void): this;
204
+ /**
205
+ * notify the observers that a new monitored item has been added to the subscription.
206
+ * @event item_added
207
+ */
208
+ on(event: "item_added", eventHandler: (monitoredItem: ClientMonitoredItem) => void): this;
209
+ /**
210
+ * notify the observers that a keep alive Publish Response has been received from the server.
211
+ * @event keepalive
212
+ */
213
+ on(event: "keepalive", eventHandler: () => void): this;
214
+ /**
215
+ * notify the observers that an error has occurred
216
+ * @event internal_error
217
+ * @param event
218
+ * @param eventHandler
219
+ */
220
+ on(event: "internal_error", eventHandler: (err: Error) => void): this;
221
+ on(event: "raw_notification", eventHandler: (notificationMessage: NotificationMessage) => void): this;
222
+ /**
223
+ * notify the observers that some notifications has been received from the server in a PublishResponse
224
+ * each modified monitored Item
225
+ * @event received_notifications
226
+ */
227
+ on(event: "received_notifications", eventHandler: (notificationMessage: NotificationMessage) => void): this;
228
+ /**
229
+ * notify the observers that the server has send a status changed notification (such as BadTimeout )
230
+ * @event status_changed
231
+ */
232
+ on(event: "status_changed", eventHandler: (status: StatusCode, diagnosticInfo: DiagnosticInfo) => void): this;
233
+ on(event: "error", eventHandler: (err: Error) => void): this;
234
+ }
235
+ export declare interface ClientSubscription {
236
+ _createMonitoredItem(itemToMonitor: ReadValueIdOptions, monitoringParameters: MonitoringParametersOptions, timestampsToReturn: TimestampsToReturn): ClientMonitoredItem;
237
+ }
238
+ export declare class ClientSubscription {
239
+ static create(clientSession: ClientSession, options: ClientSubscriptionOptions): ClientSubscription;
240
+ static ignoreNextWarning: boolean;
241
+ }
@@ -1,15 +1,15 @@
1
- "use strict";
2
- /**
3
- * @module node-opcua-client
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ClientSubscription = void 0;
7
- class ClientSubscription {
8
- static create(clientSession, options) {
9
- /* istanbul ignore next*/
10
- throw new Error("Not Implemented");
11
- }
12
- }
13
- exports.ClientSubscription = ClientSubscription;
14
- ClientSubscription.ignoreNextWarning = false;
1
+ "use strict";
2
+ /**
3
+ * @module node-opcua-client
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ClientSubscription = void 0;
7
+ class ClientSubscription {
8
+ static create(clientSession, options) {
9
+ /* istanbul ignore next*/
10
+ throw new Error("Not Implemented");
11
+ }
12
+ }
13
+ exports.ClientSubscription = ClientSubscription;
14
+ ClientSubscription.ignoreNextWarning = false;
15
15
  //# sourceMappingURL=client_subscription.js.map
@@ -1,22 +1,22 @@
1
- /**
2
- * @module node-opcua-client
3
- */
4
- import { NodeIdLike } from "node-opcua-nodeid";
5
- import { Variant } from "node-opcua-variant";
6
- import { ClientSession, ResponseCallback } from "./client_session";
7
- interface AnalogDataItemSnapshot {
8
- engineeringUnits: Variant | null;
9
- engineeringUnitsRange: Variant | null;
10
- instrumentRange: Variant | null;
11
- valuePrecision: Variant | null;
12
- definition: Variant | null;
13
- }
14
- /**
15
- * @method readUAAnalogItem
16
- * @param session
17
- * @param nodeId
18
- * @param callback
19
- */
20
- export declare function readUAAnalogItem(session: ClientSession, nodeId: NodeIdLike): Promise<AnalogDataItemSnapshot>;
21
- export declare function readUAAnalogItem(session: ClientSession, nodeId: NodeIdLike, callback: ResponseCallback<AnalogDataItemSnapshot>): void;
22
- export {};
1
+ /**
2
+ * @module node-opcua-client
3
+ */
4
+ import { NodeIdLike } from "node-opcua-nodeid";
5
+ import { Variant } from "node-opcua-variant";
6
+ import { ClientSession, ResponseCallback } from "./client_session";
7
+ interface AnalogDataItemSnapshot {
8
+ engineeringUnits: Variant | null;
9
+ engineeringUnitsRange: Variant | null;
10
+ instrumentRange: Variant | null;
11
+ valuePrecision: Variant | null;
12
+ definition: Variant | null;
13
+ }
14
+ /**
15
+ * @method readUAAnalogItem
16
+ * @param session
17
+ * @param nodeId
18
+ * @param callback
19
+ */
20
+ export declare function readUAAnalogItem(session: ClientSession, nodeId: NodeIdLike): Promise<AnalogDataItemSnapshot>;
21
+ export declare function readUAAnalogItem(session: ClientSession, nodeId: NodeIdLike, callback: ResponseCallback<AnalogDataItemSnapshot>): void;
22
+ export {};