node-opcua-server 2.76.1 → 2.76.2
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_server.d.ts +110 -110
- package/dist/base_server.js +473 -473
- package/dist/factory.d.ts +12 -12
- package/dist/factory.js +23 -23
- package/dist/filter/check_where_clause_on_address_space.d.ts +3 -3
- package/dist/filter/check_where_clause_on_address_space.js +22 -22
- package/dist/filter/extract_event_fields.d.ts +10 -10
- package/dist/filter/extract_event_fields.js +17 -17
- package/dist/helper.d.ts +10 -10
- package/dist/helper.js +75 -75
- package/dist/history_server_capabilities.d.ts +35 -35
- package/dist/history_server_capabilities.js +43 -43
- package/dist/i_channel_data.d.ts +13 -13
- package/dist/i_channel_data.js +2 -2
- package/dist/i_register_server_manager.d.ts +16 -16
- package/dist/i_register_server_manager.js +2 -2
- package/dist/i_server_side_publish_engine.d.ts +36 -36
- package/dist/i_server_side_publish_engine.js +49 -49
- package/dist/i_socket_data.d.ts +11 -11
- package/dist/i_socket_data.js +2 -2
- package/dist/index.d.ts +16 -16
- package/dist/index.js +32 -32
- package/dist/monitored_item.d.ts +177 -177
- package/dist/monitored_item.js +1001 -1001
- package/dist/node_sampler.d.ts +3 -3
- package/dist/node_sampler.js +75 -75
- package/dist/opcua_server.d.ts +747 -747
- package/dist/opcua_server.js +2431 -2431
- package/dist/queue.d.ts +11 -11
- package/dist/queue.js +71 -71
- package/dist/register_server_manager.d.ts +96 -96
- package/dist/register_server_manager.js +584 -584
- package/dist/register_server_manager_hidden.d.ts +17 -17
- package/dist/register_server_manager_hidden.js +27 -27
- package/dist/register_server_manager_mdns_only.d.ts +22 -22
- package/dist/register_server_manager_mdns_only.js +55 -55
- package/dist/server_capabilities.d.ts +148 -148
- package/dist/server_capabilities.js +92 -92
- package/dist/server_end_point.d.ts +183 -183
- package/dist/server_end_point.js +817 -817
- package/dist/server_engine.d.ts +317 -317
- package/dist/server_engine.js +1716 -1716
- package/dist/server_publish_engine.d.ts +113 -113
- package/dist/server_publish_engine.js +541 -541
- package/dist/server_publish_engine_for_orphan_subscriptions.d.ts +16 -16
- package/dist/server_publish_engine_for_orphan_subscriptions.js +51 -51
- package/dist/server_session.d.ts +182 -182
- package/dist/server_session.js +739 -739
- package/dist/server_subscription.d.ts +421 -421
- package/dist/server_subscription.js +1346 -1346
- package/dist/sessions_compatible_for_transfer.d.ts +2 -2
- package/dist/sessions_compatible_for_transfer.js +39 -39
- package/dist/user_manager.d.ts +32 -32
- package/dist/user_manager.js +74 -74
- package/dist/user_manager_ua.d.ts +3 -3
- package/dist/user_manager_ua.js +39 -39
- package/dist/validate_filter.d.ts +5 -5
- package/dist/validate_filter.js +60 -60
- package/package.json +42 -41
|
@@ -1,421 +1,421 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module node-opcua-server
|
|
3
|
-
*/
|
|
4
|
-
/// <reference types="node" />
|
|
5
|
-
import { EventEmitter } from "events";
|
|
6
|
-
import { AddressSpace, BaseNode, Duration } from "node-opcua-address-space";
|
|
7
|
-
import { Byte, UInt32 } from "node-opcua-basic-types";
|
|
8
|
-
import { SubscriptionDiagnosticsDataType } from "node-opcua-common";
|
|
9
|
-
import { TimestampsToReturn } from "node-opcua-data-value";
|
|
10
|
-
import { NodeId } from "node-opcua-nodeid";
|
|
11
|
-
import { ObjectRegistry } from "node-opcua-object-registry";
|
|
12
|
-
import { DataChangeNotification, EventNotificationList, MonitoredItemCreateResult, NotificationMessage, StatusChangeNotification, MonitoredItemCreateRequest } from "node-opcua-service-subscription";
|
|
13
|
-
import { StatusCode } from "node-opcua-status-code";
|
|
14
|
-
import { MonitoredItem, QueueItem } from "./monitored_item";
|
|
15
|
-
import { ServerSession } from "./server_session";
|
|
16
|
-
import { IServerSidePublishEngine } from "./i_server_side_publish_engine";
|
|
17
|
-
export interface SubscriptionDiagnosticsDataTypePriv extends SubscriptionDiagnosticsDataType {
|
|
18
|
-
$subscription: Subscription;
|
|
19
|
-
}
|
|
20
|
-
export declare enum SubscriptionState {
|
|
21
|
-
CLOSED = 1,
|
|
22
|
-
CREATING = 2,
|
|
23
|
-
NORMAL = 3,
|
|
24
|
-
LATE = 4,
|
|
25
|
-
KEEPALIVE = 5,
|
|
26
|
-
TERMINATED = 6
|
|
27
|
-
}
|
|
28
|
-
interface IGlobalMonitoredItemCounter {
|
|
29
|
-
totalMonitoredItemCount: number;
|
|
30
|
-
}
|
|
31
|
-
export interface SubscriptionOptions {
|
|
32
|
-
sessionId?: NodeId;
|
|
33
|
-
/**
|
|
34
|
-
* (default:1000) the publishing interval.
|
|
35
|
-
*/
|
|
36
|
-
publishingInterval?: number;
|
|
37
|
-
/**
|
|
38
|
-
* (default:10) the max Life Time Count
|
|
39
|
-
*/
|
|
40
|
-
maxKeepAliveCount?: number;
|
|
41
|
-
lifeTimeCount?: number;
|
|
42
|
-
/**
|
|
43
|
-
* (default:true)
|
|
44
|
-
*/
|
|
45
|
-
publishingEnabled?: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* (default:0)
|
|
48
|
-
*/
|
|
49
|
-
maxNotificationsPerPublish?: number;
|
|
50
|
-
/**
|
|
51
|
-
* subscription priority Byte:(0-255)
|
|
52
|
-
*/
|
|
53
|
-
priority?: number;
|
|
54
|
-
publishEngine?: IServerSidePublishEngine;
|
|
55
|
-
/**
|
|
56
|
-
* a unique identifier
|
|
57
|
-
*/
|
|
58
|
-
id?: number;
|
|
59
|
-
serverCapabilities: ServerCapabilitiesPartial;
|
|
60
|
-
globalCounter: IGlobalMonitoredItemCounter;
|
|
61
|
-
}
|
|
62
|
-
export declare type Notification = DataChangeNotification | EventNotificationList | StatusChangeNotification;
|
|
63
|
-
export declare type Counter = number;
|
|
64
|
-
export interface ModifySubscriptionParameters {
|
|
65
|
-
/**
|
|
66
|
-
* requestedPublishingInterval =0 means fastest possible
|
|
67
|
-
*/
|
|
68
|
-
requestedPublishingInterval?: Duration;
|
|
69
|
-
requestedLifetimeCount?: Counter;
|
|
70
|
-
/**
|
|
71
|
-
* requestedMaxKeepAliveCount ===0 means no change
|
|
72
|
-
*/
|
|
73
|
-
requestedMaxKeepAliveCount?: Counter;
|
|
74
|
-
maxNotificationsPerPublish?: Counter;
|
|
75
|
-
priority?: Byte;
|
|
76
|
-
}
|
|
77
|
-
export interface GetMonitoredItemsResult {
|
|
78
|
-
/**
|
|
79
|
-
* array of serverHandles for all MonitoredItems of the subscription
|
|
80
|
-
* identified by subscriptionId.
|
|
81
|
-
*/
|
|
82
|
-
serverHandles: Uint32Array;
|
|
83
|
-
/**
|
|
84
|
-
* array of clientHandles for all MonitoredItems of the subscription
|
|
85
|
-
* identified by subscriptionId.
|
|
86
|
-
*/
|
|
87
|
-
clientHandles: Uint32Array;
|
|
88
|
-
statusCode: StatusCode;
|
|
89
|
-
}
|
|
90
|
-
export interface InternalNotification {
|
|
91
|
-
monitoredItemId?: number;
|
|
92
|
-
notification: QueueItem | StatusChangeNotification;
|
|
93
|
-
publishTime: Date;
|
|
94
|
-
start_tick: number;
|
|
95
|
-
}
|
|
96
|
-
export interface InternalCreateMonitoredItemResult {
|
|
97
|
-
monitoredItem?: MonitoredItem;
|
|
98
|
-
monitoredItemCreateRequest: MonitoredItemCreateRequest;
|
|
99
|
-
createResult: MonitoredItemCreateResult;
|
|
100
|
-
}
|
|
101
|
-
export interface MonitoredItemBase {
|
|
102
|
-
node: any | null;
|
|
103
|
-
}
|
|
104
|
-
export declare type CreateMonitoredItemHook = (subscription: Subscription, monitoredItem: MonitoredItemBase) => Promise<StatusCode>;
|
|
105
|
-
export declare type DeleteMonitoredItemHook = (subscription: Subscription, monitoredItem: MonitoredItemBase) => Promise<StatusCode>;
|
|
106
|
-
export interface ServerCapabilitiesPartial {
|
|
107
|
-
maxMonitoredItems: UInt32;
|
|
108
|
-
maxMonitoredItemsPerSubscription: UInt32;
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* The Subscription class used in the OPCUA server side.
|
|
112
|
-
*/
|
|
113
|
-
export declare class Subscription extends EventEmitter {
|
|
114
|
-
static minimumPublishingInterval: number;
|
|
115
|
-
static defaultPublishingInterval: number;
|
|
116
|
-
static maximumPublishingInterval: number;
|
|
117
|
-
static maxNotificationPerPublishHighLimit: number;
|
|
118
|
-
static minimumLifetimeDuration: number;
|
|
119
|
-
static maximumLifetimeDuration: number;
|
|
120
|
-
/**
|
|
121
|
-
* maximum number of monitored item in a subscription to be used
|
|
122
|
-
* when serverCapacity.maxMonitoredItems and serverCapacity.maxMonitoredItemsPerSubscription are not set.
|
|
123
|
-
*/
|
|
124
|
-
static defaultMaxMonitoredItemCount: number;
|
|
125
|
-
/**
|
|
126
|
-
* @deprecated use serverCapacity.maxMonitoredItems and serverCapacity.maxMonitoredItemsPerSubscription instead
|
|
127
|
-
*/
|
|
128
|
-
protected static get maxMonitoredItemCount(): number;
|
|
129
|
-
static registry: ObjectRegistry;
|
|
130
|
-
publishEngine?: IServerSidePublishEngine;
|
|
131
|
-
id: number;
|
|
132
|
-
priority: number;
|
|
133
|
-
/**
|
|
134
|
-
* the Subscription publishing interval
|
|
135
|
-
* @default 1000
|
|
136
|
-
*/
|
|
137
|
-
publishingInterval: number;
|
|
138
|
-
/**
|
|
139
|
-
* The keep alive count defines how many times the publish interval need to
|
|
140
|
-
* expires without having notifications available before the server send an
|
|
141
|
-
* empty message.
|
|
142
|
-
* OPCUA Spec says: a value of 0 is invalid.
|
|
143
|
-
* @default 10
|
|
144
|
-
*
|
|
145
|
-
*/
|
|
146
|
-
maxKeepAliveCount: number;
|
|
147
|
-
/**
|
|
148
|
-
* The life time count defines how many times the publish interval expires without
|
|
149
|
-
* having a connection to the client to deliver data.
|
|
150
|
-
* If the life time count reaches maxKeepAliveCount, the subscription will
|
|
151
|
-
* automatically terminate.
|
|
152
|
-
* OPCUA Spec: The life-time count shall be a minimum of three times the keep keep-alive count.
|
|
153
|
-
*
|
|
154
|
-
* Note: this has to be interpreted as without having a PublishRequest available
|
|
155
|
-
* @default 1
|
|
156
|
-
*/
|
|
157
|
-
lifeTimeCount: number;
|
|
158
|
-
/**
|
|
159
|
-
* The maximum number of notifications that the Client wishes to receive in a
|
|
160
|
-
* single Publish response. A value of zero indicates that there is no limit.
|
|
161
|
-
* The number of notifications per Publish is the sum of monitoredItems in the
|
|
162
|
-
* DataChangeNotification and events in the EventNotificationList.
|
|
163
|
-
*
|
|
164
|
-
* @property maxNotificationsPerPublish
|
|
165
|
-
* @default 0
|
|
166
|
-
*/
|
|
167
|
-
maxNotificationsPerPublish: number;
|
|
168
|
-
publishingEnabled: boolean;
|
|
169
|
-
subscriptionDiagnostics: SubscriptionDiagnosticsDataTypePriv;
|
|
170
|
-
publishIntervalCount: number;
|
|
171
|
-
/**
|
|
172
|
-
* number of monitored Item
|
|
173
|
-
*/
|
|
174
|
-
monitoredItemIdCounter: number;
|
|
175
|
-
private _state;
|
|
176
|
-
set state(value: SubscriptionState);
|
|
177
|
-
get state(): SubscriptionState;
|
|
178
|
-
messageSent: boolean;
|
|
179
|
-
$session?: ServerSession;
|
|
180
|
-
get sessionId(): NodeId;
|
|
181
|
-
get currentLifetimeCount(): number;
|
|
182
|
-
get currentKeepAliveCount(): number;
|
|
183
|
-
private _life_time_counter;
|
|
184
|
-
private _keep_alive_counter;
|
|
185
|
-
private _pending_notifications;
|
|
186
|
-
private _sent_notification_messages;
|
|
187
|
-
private readonly _sequence_number_generator;
|
|
188
|
-
private readonly monitoredItems;
|
|
189
|
-
private timerId;
|
|
190
|
-
private _hasUncollectedMonitoredItemNotifications;
|
|
191
|
-
private globalCounter;
|
|
192
|
-
private serverCapabilities;
|
|
193
|
-
constructor(options: SubscriptionOptions);
|
|
194
|
-
getSessionId(): NodeId;
|
|
195
|
-
toString(): string;
|
|
196
|
-
/**
|
|
197
|
-
* modify subscription parameters
|
|
198
|
-
* @param param
|
|
199
|
-
*/
|
|
200
|
-
modify(param: ModifySubscriptionParameters): void;
|
|
201
|
-
/**
|
|
202
|
-
* set publishing mode
|
|
203
|
-
* @param publishingEnabled
|
|
204
|
-
*/
|
|
205
|
-
setPublishingMode(publishingEnabled: boolean): StatusCode;
|
|
206
|
-
/**
|
|
207
|
-
* @private
|
|
208
|
-
*/
|
|
209
|
-
get keepAliveCounterHasExpired(): boolean;
|
|
210
|
-
/**
|
|
211
|
-
* Reset the Lifetime Counter Variable to the value specified for the lifetime of a Subscription in
|
|
212
|
-
* the CreateSubscription Service( 5.13.2).
|
|
213
|
-
* @private
|
|
214
|
-
*/
|
|
215
|
-
resetLifeTimeCounter(): void;
|
|
216
|
-
/**
|
|
217
|
-
* @private
|
|
218
|
-
*/
|
|
219
|
-
increaseLifeTimeCounter(): void;
|
|
220
|
-
/**
|
|
221
|
-
* True if the subscription life time has expired.
|
|
222
|
-
*
|
|
223
|
-
*/
|
|
224
|
-
get lifeTimeHasExpired(): boolean;
|
|
225
|
-
/**
|
|
226
|
-
* number of milliseconds before this subscription times out (lifeTimeHasExpired === true);
|
|
227
|
-
*/
|
|
228
|
-
get timeToExpiration(): number;
|
|
229
|
-
get timeToKeepAlive(): number;
|
|
230
|
-
/**
|
|
231
|
-
* Terminates the subscription.
|
|
232
|
-
* Calling this method will also remove any monitored items.
|
|
233
|
-
*
|
|
234
|
-
*/
|
|
235
|
-
terminate(): void;
|
|
236
|
-
setTriggering(triggeringItemId: number, linksToAdd: number[] | null, linksToRemove: number[] | null): {
|
|
237
|
-
statusCode: StatusCode;
|
|
238
|
-
addResults: StatusCode[];
|
|
239
|
-
removeResults: StatusCode[];
|
|
240
|
-
};
|
|
241
|
-
dispose(): void;
|
|
242
|
-
get aborted(): boolean;
|
|
243
|
-
/**
|
|
244
|
-
* number of pending notifications
|
|
245
|
-
*/
|
|
246
|
-
get pendingNotificationsCount(): number;
|
|
247
|
-
/**
|
|
248
|
-
* is 'true' if there are pending notifications for this subscription. (i.e moreNotifications)
|
|
249
|
-
*/
|
|
250
|
-
get hasPendingNotifications(): boolean;
|
|
251
|
-
/**
|
|
252
|
-
* number of sent notifications
|
|
253
|
-
*/
|
|
254
|
-
get sentNotificationMessageCount(): number;
|
|
255
|
-
/**
|
|
256
|
-
* @internal
|
|
257
|
-
*/
|
|
258
|
-
_flushSentNotifications(): NotificationMessage[];
|
|
259
|
-
/**
|
|
260
|
-
* number of monitored items handled by this subscription
|
|
261
|
-
*/
|
|
262
|
-
get monitoredItemCount(): number;
|
|
263
|
-
/**
|
|
264
|
-
* number of disabled monitored items.
|
|
265
|
-
*/
|
|
266
|
-
get disabledMonitoredItemCount(): number;
|
|
267
|
-
/**
|
|
268
|
-
* The number of unacknowledged messages saved in the republish queue.
|
|
269
|
-
*/
|
|
270
|
-
get unacknowledgedMessageCount(): number;
|
|
271
|
-
/**
|
|
272
|
-
* adjust monitored item sampling interval
|
|
273
|
-
* - an samplingInterval ===0 means that we use a event-base model ( no sampling)
|
|
274
|
-
* - otherwise the sampling is adjusted
|
|
275
|
-
* @private
|
|
276
|
-
*/
|
|
277
|
-
adjustSamplingInterval(samplingInterval: number, node: BaseNode): number;
|
|
278
|
-
/**
|
|
279
|
-
* create a monitored item
|
|
280
|
-
* @param addressSpace - address space
|
|
281
|
-
* @param timestampsToReturn - the timestamp to return
|
|
282
|
-
* @param monitoredItemCreateRequest - the parameters describing the monitored Item to create
|
|
283
|
-
*/
|
|
284
|
-
preCreateMonitoredItem(addressSpace: AddressSpace, timestampsToReturn: TimestampsToReturn, monitoredItemCreateRequest: MonitoredItemCreateRequest): InternalCreateMonitoredItemResult;
|
|
285
|
-
applyOnMonitoredItem(functor: (monitoredItem: MonitoredItem) => Promise<void>): Promise<void>;
|
|
286
|
-
postCreateMonitoredItem(monitoredItem: MonitoredItem, monitoredItemCreateRequest: MonitoredItemCreateRequest, createResult: MonitoredItemCreateResult): void;
|
|
287
|
-
createMonitoredItem(addressSpace: AddressSpace, timestampsToReturn: TimestampsToReturn, monitoredItemCreateRequest: MonitoredItemCreateRequest): MonitoredItemCreateResult;
|
|
288
|
-
/**
|
|
289
|
-
* get a monitoredItem by Id.
|
|
290
|
-
* @param monitoredItemId : the id of the monitored item to get.
|
|
291
|
-
* @return the monitored item matching monitoredItemId
|
|
292
|
-
*/
|
|
293
|
-
getMonitoredItem(monitoredItemId: number): MonitoredItem | null;
|
|
294
|
-
/**
|
|
295
|
-
* remove a monitored Item from the subscription.
|
|
296
|
-
* @param monitoredItemId : the id of the monitored item to get.
|
|
297
|
-
*/
|
|
298
|
-
removeMonitoredItem(monitoredItemId: number): StatusCode;
|
|
299
|
-
/**
|
|
300
|
-
* rue if monitored Item have uncollected Notifications
|
|
301
|
-
*/
|
|
302
|
-
get hasUncollectedMonitoredItemNotifications(): boolean;
|
|
303
|
-
get subscriptionId(): number;
|
|
304
|
-
getMessageForSequenceNumber(sequenceNumber: number): NotificationMessage | null;
|
|
305
|
-
/**
|
|
306
|
-
* returns true if the notification has expired
|
|
307
|
-
* @param notification
|
|
308
|
-
*/
|
|
309
|
-
notificationHasExpired(notification: {
|
|
310
|
-
start_tick: number;
|
|
311
|
-
}): boolean;
|
|
312
|
-
/**
|
|
313
|
-
* returns in an array the sequence numbers of the notifications that have been sent
|
|
314
|
-
* and that haven't been acknowledged yet.
|
|
315
|
-
*/
|
|
316
|
-
getAvailableSequenceNumbers(): number[];
|
|
317
|
-
/**
|
|
318
|
-
* acknowledges a notification identified by its sequence number
|
|
319
|
-
*/
|
|
320
|
-
acknowledgeNotification(sequenceNumber: number): StatusCode;
|
|
321
|
-
/**
|
|
322
|
-
* getMonitoredItems is used to get information about monitored items of a subscription.Its intended
|
|
323
|
-
* use is defined in Part 4. This method is the implementation of the Standard OPCUA GetMonitoredItems Method.
|
|
324
|
-
* from spec:
|
|
325
|
-
* This method can be used to get the list of monitored items in a subscription if CreateMonitoredItems
|
|
326
|
-
* failed due to a network interruption and the client does not know if the creation succeeded in the server.
|
|
327
|
-
*
|
|
328
|
-
*/
|
|
329
|
-
getMonitoredItems(): GetMonitoredItemsResult;
|
|
330
|
-
/**
|
|
331
|
-
* @private
|
|
332
|
-
*/
|
|
333
|
-
resendInitialValues(): Promise<void>;
|
|
334
|
-
/**
|
|
335
|
-
* @private
|
|
336
|
-
*/
|
|
337
|
-
notifyTransfer(): void;
|
|
338
|
-
/**
|
|
339
|
-
*
|
|
340
|
-
* the server invokes the resetLifeTimeAndKeepAliveCounters method of the subscription
|
|
341
|
-
* when the server has send a Publish Response, so that the subscription
|
|
342
|
-
* can reset its life time counter.
|
|
343
|
-
*
|
|
344
|
-
* @private
|
|
345
|
-
*/
|
|
346
|
-
resetLifeTimeAndKeepAliveCounters(): void;
|
|
347
|
-
private _updateCounters;
|
|
348
|
-
/**
|
|
349
|
-
* _publish_pending_notifications send a "notification" event:
|
|
350
|
-
*
|
|
351
|
-
* @private
|
|
352
|
-
* @precondition
|
|
353
|
-
* - pendingPublishRequestCount > 0
|
|
354
|
-
*/
|
|
355
|
-
_publish_pending_notifications(): void;
|
|
356
|
-
process_subscription(): void;
|
|
357
|
-
_get_future_sequence_number(): number;
|
|
358
|
-
private _process_keepAlive;
|
|
359
|
-
private _stop_timer;
|
|
360
|
-
private _start_timer;
|
|
361
|
-
private _get_next_sequence_number;
|
|
362
|
-
/**
|
|
363
|
-
* @private
|
|
364
|
-
*/
|
|
365
|
-
private _tick;
|
|
366
|
-
/**
|
|
367
|
-
* @private
|
|
368
|
-
*/
|
|
369
|
-
private _sendKeepAliveResponse;
|
|
370
|
-
/**
|
|
371
|
-
* Reset the Lifetime Counter Variable to the value specified for the lifetime of a Subscription in
|
|
372
|
-
* the CreateSubscription Service( 5.13.2).
|
|
373
|
-
* @private
|
|
374
|
-
*/
|
|
375
|
-
private resetKeepAliveCounter;
|
|
376
|
-
/**
|
|
377
|
-
* @private
|
|
378
|
-
*/
|
|
379
|
-
private increaseKeepAliveCounter;
|
|
380
|
-
/**
|
|
381
|
-
* @private
|
|
382
|
-
*/
|
|
383
|
-
private _addNotificationMessage;
|
|
384
|
-
/**
|
|
385
|
-
* @internal
|
|
386
|
-
* @param monitoredItemId
|
|
387
|
-
*/
|
|
388
|
-
private _removePendingNotificationsFor;
|
|
389
|
-
/**
|
|
390
|
-
* Extract the next Notification that is ready to be sent to the client.
|
|
391
|
-
* @return the Notification to send._pending_notifications
|
|
392
|
-
*/
|
|
393
|
-
private _popNotificationToSend;
|
|
394
|
-
/**
|
|
395
|
-
* discardOldSentNotification find all sent notification message that have expired keep-alive
|
|
396
|
-
* and destroy them.
|
|
397
|
-
* @private
|
|
398
|
-
*
|
|
399
|
-
* Subscriptions maintain a retransmission queue of sent NotificationMessages.
|
|
400
|
-
* NotificationMessages are retained in this queue until they are acknowledged or until they have
|
|
401
|
-
* been in the queue for a minimum of one keep-alive interval.
|
|
402
|
-
*
|
|
403
|
-
*/
|
|
404
|
-
private discardOldSentNotifications;
|
|
405
|
-
/**
|
|
406
|
-
* @param timestampsToReturn
|
|
407
|
-
* @param monitoredItemCreateRequest
|
|
408
|
-
* @param node
|
|
409
|
-
* @private
|
|
410
|
-
*/
|
|
411
|
-
private _createMonitoredItemStep2;
|
|
412
|
-
/**
|
|
413
|
-
*
|
|
414
|
-
* @param monitoredItem
|
|
415
|
-
* @param monitoredItemCreateRequest
|
|
416
|
-
* @private
|
|
417
|
-
*/
|
|
418
|
-
_createMonitoredItemStep3(monitoredItem: MonitoredItem | null, monitoredItemCreateRequest: MonitoredItemCreateRequest): void;
|
|
419
|
-
private _harvestMonitoredItems;
|
|
420
|
-
}
|
|
421
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* @module node-opcua-server
|
|
3
|
+
*/
|
|
4
|
+
/// <reference types="node" />
|
|
5
|
+
import { EventEmitter } from "events";
|
|
6
|
+
import { AddressSpace, BaseNode, Duration } from "node-opcua-address-space";
|
|
7
|
+
import { Byte, UInt32 } from "node-opcua-basic-types";
|
|
8
|
+
import { SubscriptionDiagnosticsDataType } from "node-opcua-common";
|
|
9
|
+
import { TimestampsToReturn } from "node-opcua-data-value";
|
|
10
|
+
import { NodeId } from "node-opcua-nodeid";
|
|
11
|
+
import { ObjectRegistry } from "node-opcua-object-registry";
|
|
12
|
+
import { DataChangeNotification, EventNotificationList, MonitoredItemCreateResult, NotificationMessage, StatusChangeNotification, MonitoredItemCreateRequest } from "node-opcua-service-subscription";
|
|
13
|
+
import { StatusCode } from "node-opcua-status-code";
|
|
14
|
+
import { MonitoredItem, QueueItem } from "./monitored_item";
|
|
15
|
+
import { ServerSession } from "./server_session";
|
|
16
|
+
import { IServerSidePublishEngine } from "./i_server_side_publish_engine";
|
|
17
|
+
export interface SubscriptionDiagnosticsDataTypePriv extends SubscriptionDiagnosticsDataType {
|
|
18
|
+
$subscription: Subscription;
|
|
19
|
+
}
|
|
20
|
+
export declare enum SubscriptionState {
|
|
21
|
+
CLOSED = 1,
|
|
22
|
+
CREATING = 2,
|
|
23
|
+
NORMAL = 3,
|
|
24
|
+
LATE = 4,
|
|
25
|
+
KEEPALIVE = 5,
|
|
26
|
+
TERMINATED = 6
|
|
27
|
+
}
|
|
28
|
+
interface IGlobalMonitoredItemCounter {
|
|
29
|
+
totalMonitoredItemCount: number;
|
|
30
|
+
}
|
|
31
|
+
export interface SubscriptionOptions {
|
|
32
|
+
sessionId?: NodeId;
|
|
33
|
+
/**
|
|
34
|
+
* (default:1000) the publishing interval.
|
|
35
|
+
*/
|
|
36
|
+
publishingInterval?: number;
|
|
37
|
+
/**
|
|
38
|
+
* (default:10) the max Life Time Count
|
|
39
|
+
*/
|
|
40
|
+
maxKeepAliveCount?: number;
|
|
41
|
+
lifeTimeCount?: number;
|
|
42
|
+
/**
|
|
43
|
+
* (default:true)
|
|
44
|
+
*/
|
|
45
|
+
publishingEnabled?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* (default:0)
|
|
48
|
+
*/
|
|
49
|
+
maxNotificationsPerPublish?: number;
|
|
50
|
+
/**
|
|
51
|
+
* subscription priority Byte:(0-255)
|
|
52
|
+
*/
|
|
53
|
+
priority?: number;
|
|
54
|
+
publishEngine?: IServerSidePublishEngine;
|
|
55
|
+
/**
|
|
56
|
+
* a unique identifier
|
|
57
|
+
*/
|
|
58
|
+
id?: number;
|
|
59
|
+
serverCapabilities: ServerCapabilitiesPartial;
|
|
60
|
+
globalCounter: IGlobalMonitoredItemCounter;
|
|
61
|
+
}
|
|
62
|
+
export declare type Notification = DataChangeNotification | EventNotificationList | StatusChangeNotification;
|
|
63
|
+
export declare type Counter = number;
|
|
64
|
+
export interface ModifySubscriptionParameters {
|
|
65
|
+
/**
|
|
66
|
+
* requestedPublishingInterval =0 means fastest possible
|
|
67
|
+
*/
|
|
68
|
+
requestedPublishingInterval?: Duration;
|
|
69
|
+
requestedLifetimeCount?: Counter;
|
|
70
|
+
/**
|
|
71
|
+
* requestedMaxKeepAliveCount ===0 means no change
|
|
72
|
+
*/
|
|
73
|
+
requestedMaxKeepAliveCount?: Counter;
|
|
74
|
+
maxNotificationsPerPublish?: Counter;
|
|
75
|
+
priority?: Byte;
|
|
76
|
+
}
|
|
77
|
+
export interface GetMonitoredItemsResult {
|
|
78
|
+
/**
|
|
79
|
+
* array of serverHandles for all MonitoredItems of the subscription
|
|
80
|
+
* identified by subscriptionId.
|
|
81
|
+
*/
|
|
82
|
+
serverHandles: Uint32Array;
|
|
83
|
+
/**
|
|
84
|
+
* array of clientHandles for all MonitoredItems of the subscription
|
|
85
|
+
* identified by subscriptionId.
|
|
86
|
+
*/
|
|
87
|
+
clientHandles: Uint32Array;
|
|
88
|
+
statusCode: StatusCode;
|
|
89
|
+
}
|
|
90
|
+
export interface InternalNotification {
|
|
91
|
+
monitoredItemId?: number;
|
|
92
|
+
notification: QueueItem | StatusChangeNotification;
|
|
93
|
+
publishTime: Date;
|
|
94
|
+
start_tick: number;
|
|
95
|
+
}
|
|
96
|
+
export interface InternalCreateMonitoredItemResult {
|
|
97
|
+
monitoredItem?: MonitoredItem;
|
|
98
|
+
monitoredItemCreateRequest: MonitoredItemCreateRequest;
|
|
99
|
+
createResult: MonitoredItemCreateResult;
|
|
100
|
+
}
|
|
101
|
+
export interface MonitoredItemBase {
|
|
102
|
+
node: any | null;
|
|
103
|
+
}
|
|
104
|
+
export declare type CreateMonitoredItemHook = (subscription: Subscription, monitoredItem: MonitoredItemBase) => Promise<StatusCode>;
|
|
105
|
+
export declare type DeleteMonitoredItemHook = (subscription: Subscription, monitoredItem: MonitoredItemBase) => Promise<StatusCode>;
|
|
106
|
+
export interface ServerCapabilitiesPartial {
|
|
107
|
+
maxMonitoredItems: UInt32;
|
|
108
|
+
maxMonitoredItemsPerSubscription: UInt32;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The Subscription class used in the OPCUA server side.
|
|
112
|
+
*/
|
|
113
|
+
export declare class Subscription extends EventEmitter {
|
|
114
|
+
static minimumPublishingInterval: number;
|
|
115
|
+
static defaultPublishingInterval: number;
|
|
116
|
+
static maximumPublishingInterval: number;
|
|
117
|
+
static maxNotificationPerPublishHighLimit: number;
|
|
118
|
+
static minimumLifetimeDuration: number;
|
|
119
|
+
static maximumLifetimeDuration: number;
|
|
120
|
+
/**
|
|
121
|
+
* maximum number of monitored item in a subscription to be used
|
|
122
|
+
* when serverCapacity.maxMonitoredItems and serverCapacity.maxMonitoredItemsPerSubscription are not set.
|
|
123
|
+
*/
|
|
124
|
+
static defaultMaxMonitoredItemCount: number;
|
|
125
|
+
/**
|
|
126
|
+
* @deprecated use serverCapacity.maxMonitoredItems and serverCapacity.maxMonitoredItemsPerSubscription instead
|
|
127
|
+
*/
|
|
128
|
+
protected static get maxMonitoredItemCount(): number;
|
|
129
|
+
static registry: ObjectRegistry;
|
|
130
|
+
publishEngine?: IServerSidePublishEngine;
|
|
131
|
+
id: number;
|
|
132
|
+
priority: number;
|
|
133
|
+
/**
|
|
134
|
+
* the Subscription publishing interval
|
|
135
|
+
* @default 1000
|
|
136
|
+
*/
|
|
137
|
+
publishingInterval: number;
|
|
138
|
+
/**
|
|
139
|
+
* The keep alive count defines how many times the publish interval need to
|
|
140
|
+
* expires without having notifications available before the server send an
|
|
141
|
+
* empty message.
|
|
142
|
+
* OPCUA Spec says: a value of 0 is invalid.
|
|
143
|
+
* @default 10
|
|
144
|
+
*
|
|
145
|
+
*/
|
|
146
|
+
maxKeepAliveCount: number;
|
|
147
|
+
/**
|
|
148
|
+
* The life time count defines how many times the publish interval expires without
|
|
149
|
+
* having a connection to the client to deliver data.
|
|
150
|
+
* If the life time count reaches maxKeepAliveCount, the subscription will
|
|
151
|
+
* automatically terminate.
|
|
152
|
+
* OPCUA Spec: The life-time count shall be a minimum of three times the keep keep-alive count.
|
|
153
|
+
*
|
|
154
|
+
* Note: this has to be interpreted as without having a PublishRequest available
|
|
155
|
+
* @default 1
|
|
156
|
+
*/
|
|
157
|
+
lifeTimeCount: number;
|
|
158
|
+
/**
|
|
159
|
+
* The maximum number of notifications that the Client wishes to receive in a
|
|
160
|
+
* single Publish response. A value of zero indicates that there is no limit.
|
|
161
|
+
* The number of notifications per Publish is the sum of monitoredItems in the
|
|
162
|
+
* DataChangeNotification and events in the EventNotificationList.
|
|
163
|
+
*
|
|
164
|
+
* @property maxNotificationsPerPublish
|
|
165
|
+
* @default 0
|
|
166
|
+
*/
|
|
167
|
+
maxNotificationsPerPublish: number;
|
|
168
|
+
publishingEnabled: boolean;
|
|
169
|
+
subscriptionDiagnostics: SubscriptionDiagnosticsDataTypePriv;
|
|
170
|
+
publishIntervalCount: number;
|
|
171
|
+
/**
|
|
172
|
+
* number of monitored Item
|
|
173
|
+
*/
|
|
174
|
+
monitoredItemIdCounter: number;
|
|
175
|
+
private _state;
|
|
176
|
+
set state(value: SubscriptionState);
|
|
177
|
+
get state(): SubscriptionState;
|
|
178
|
+
messageSent: boolean;
|
|
179
|
+
$session?: ServerSession;
|
|
180
|
+
get sessionId(): NodeId;
|
|
181
|
+
get currentLifetimeCount(): number;
|
|
182
|
+
get currentKeepAliveCount(): number;
|
|
183
|
+
private _life_time_counter;
|
|
184
|
+
private _keep_alive_counter;
|
|
185
|
+
private _pending_notifications;
|
|
186
|
+
private _sent_notification_messages;
|
|
187
|
+
private readonly _sequence_number_generator;
|
|
188
|
+
private readonly monitoredItems;
|
|
189
|
+
private timerId;
|
|
190
|
+
private _hasUncollectedMonitoredItemNotifications;
|
|
191
|
+
private globalCounter;
|
|
192
|
+
private serverCapabilities;
|
|
193
|
+
constructor(options: SubscriptionOptions);
|
|
194
|
+
getSessionId(): NodeId;
|
|
195
|
+
toString(): string;
|
|
196
|
+
/**
|
|
197
|
+
* modify subscription parameters
|
|
198
|
+
* @param param
|
|
199
|
+
*/
|
|
200
|
+
modify(param: ModifySubscriptionParameters): void;
|
|
201
|
+
/**
|
|
202
|
+
* set publishing mode
|
|
203
|
+
* @param publishingEnabled
|
|
204
|
+
*/
|
|
205
|
+
setPublishingMode(publishingEnabled: boolean): StatusCode;
|
|
206
|
+
/**
|
|
207
|
+
* @private
|
|
208
|
+
*/
|
|
209
|
+
get keepAliveCounterHasExpired(): boolean;
|
|
210
|
+
/**
|
|
211
|
+
* Reset the Lifetime Counter Variable to the value specified for the lifetime of a Subscription in
|
|
212
|
+
* the CreateSubscription Service( 5.13.2).
|
|
213
|
+
* @private
|
|
214
|
+
*/
|
|
215
|
+
resetLifeTimeCounter(): void;
|
|
216
|
+
/**
|
|
217
|
+
* @private
|
|
218
|
+
*/
|
|
219
|
+
increaseLifeTimeCounter(): void;
|
|
220
|
+
/**
|
|
221
|
+
* True if the subscription life time has expired.
|
|
222
|
+
*
|
|
223
|
+
*/
|
|
224
|
+
get lifeTimeHasExpired(): boolean;
|
|
225
|
+
/**
|
|
226
|
+
* number of milliseconds before this subscription times out (lifeTimeHasExpired === true);
|
|
227
|
+
*/
|
|
228
|
+
get timeToExpiration(): number;
|
|
229
|
+
get timeToKeepAlive(): number;
|
|
230
|
+
/**
|
|
231
|
+
* Terminates the subscription.
|
|
232
|
+
* Calling this method will also remove any monitored items.
|
|
233
|
+
*
|
|
234
|
+
*/
|
|
235
|
+
terminate(): void;
|
|
236
|
+
setTriggering(triggeringItemId: number, linksToAdd: number[] | null, linksToRemove: number[] | null): {
|
|
237
|
+
statusCode: StatusCode;
|
|
238
|
+
addResults: StatusCode[];
|
|
239
|
+
removeResults: StatusCode[];
|
|
240
|
+
};
|
|
241
|
+
dispose(): void;
|
|
242
|
+
get aborted(): boolean;
|
|
243
|
+
/**
|
|
244
|
+
* number of pending notifications
|
|
245
|
+
*/
|
|
246
|
+
get pendingNotificationsCount(): number;
|
|
247
|
+
/**
|
|
248
|
+
* is 'true' if there are pending notifications for this subscription. (i.e moreNotifications)
|
|
249
|
+
*/
|
|
250
|
+
get hasPendingNotifications(): boolean;
|
|
251
|
+
/**
|
|
252
|
+
* number of sent notifications
|
|
253
|
+
*/
|
|
254
|
+
get sentNotificationMessageCount(): number;
|
|
255
|
+
/**
|
|
256
|
+
* @internal
|
|
257
|
+
*/
|
|
258
|
+
_flushSentNotifications(): NotificationMessage[];
|
|
259
|
+
/**
|
|
260
|
+
* number of monitored items handled by this subscription
|
|
261
|
+
*/
|
|
262
|
+
get monitoredItemCount(): number;
|
|
263
|
+
/**
|
|
264
|
+
* number of disabled monitored items.
|
|
265
|
+
*/
|
|
266
|
+
get disabledMonitoredItemCount(): number;
|
|
267
|
+
/**
|
|
268
|
+
* The number of unacknowledged messages saved in the republish queue.
|
|
269
|
+
*/
|
|
270
|
+
get unacknowledgedMessageCount(): number;
|
|
271
|
+
/**
|
|
272
|
+
* adjust monitored item sampling interval
|
|
273
|
+
* - an samplingInterval ===0 means that we use a event-base model ( no sampling)
|
|
274
|
+
* - otherwise the sampling is adjusted
|
|
275
|
+
* @private
|
|
276
|
+
*/
|
|
277
|
+
adjustSamplingInterval(samplingInterval: number, node: BaseNode): number;
|
|
278
|
+
/**
|
|
279
|
+
* create a monitored item
|
|
280
|
+
* @param addressSpace - address space
|
|
281
|
+
* @param timestampsToReturn - the timestamp to return
|
|
282
|
+
* @param monitoredItemCreateRequest - the parameters describing the monitored Item to create
|
|
283
|
+
*/
|
|
284
|
+
preCreateMonitoredItem(addressSpace: AddressSpace, timestampsToReturn: TimestampsToReturn, monitoredItemCreateRequest: MonitoredItemCreateRequest): InternalCreateMonitoredItemResult;
|
|
285
|
+
applyOnMonitoredItem(functor: (monitoredItem: MonitoredItem) => Promise<void>): Promise<void>;
|
|
286
|
+
postCreateMonitoredItem(monitoredItem: MonitoredItem, monitoredItemCreateRequest: MonitoredItemCreateRequest, createResult: MonitoredItemCreateResult): void;
|
|
287
|
+
createMonitoredItem(addressSpace: AddressSpace, timestampsToReturn: TimestampsToReturn, monitoredItemCreateRequest: MonitoredItemCreateRequest): MonitoredItemCreateResult;
|
|
288
|
+
/**
|
|
289
|
+
* get a monitoredItem by Id.
|
|
290
|
+
* @param monitoredItemId : the id of the monitored item to get.
|
|
291
|
+
* @return the monitored item matching monitoredItemId
|
|
292
|
+
*/
|
|
293
|
+
getMonitoredItem(monitoredItemId: number): MonitoredItem | null;
|
|
294
|
+
/**
|
|
295
|
+
* remove a monitored Item from the subscription.
|
|
296
|
+
* @param monitoredItemId : the id of the monitored item to get.
|
|
297
|
+
*/
|
|
298
|
+
removeMonitoredItem(monitoredItemId: number): StatusCode;
|
|
299
|
+
/**
|
|
300
|
+
* rue if monitored Item have uncollected Notifications
|
|
301
|
+
*/
|
|
302
|
+
get hasUncollectedMonitoredItemNotifications(): boolean;
|
|
303
|
+
get subscriptionId(): number;
|
|
304
|
+
getMessageForSequenceNumber(sequenceNumber: number): NotificationMessage | null;
|
|
305
|
+
/**
|
|
306
|
+
* returns true if the notification has expired
|
|
307
|
+
* @param notification
|
|
308
|
+
*/
|
|
309
|
+
notificationHasExpired(notification: {
|
|
310
|
+
start_tick: number;
|
|
311
|
+
}): boolean;
|
|
312
|
+
/**
|
|
313
|
+
* returns in an array the sequence numbers of the notifications that have been sent
|
|
314
|
+
* and that haven't been acknowledged yet.
|
|
315
|
+
*/
|
|
316
|
+
getAvailableSequenceNumbers(): number[];
|
|
317
|
+
/**
|
|
318
|
+
* acknowledges a notification identified by its sequence number
|
|
319
|
+
*/
|
|
320
|
+
acknowledgeNotification(sequenceNumber: number): StatusCode;
|
|
321
|
+
/**
|
|
322
|
+
* getMonitoredItems is used to get information about monitored items of a subscription.Its intended
|
|
323
|
+
* use is defined in Part 4. This method is the implementation of the Standard OPCUA GetMonitoredItems Method.
|
|
324
|
+
* from spec:
|
|
325
|
+
* This method can be used to get the list of monitored items in a subscription if CreateMonitoredItems
|
|
326
|
+
* failed due to a network interruption and the client does not know if the creation succeeded in the server.
|
|
327
|
+
*
|
|
328
|
+
*/
|
|
329
|
+
getMonitoredItems(): GetMonitoredItemsResult;
|
|
330
|
+
/**
|
|
331
|
+
* @private
|
|
332
|
+
*/
|
|
333
|
+
resendInitialValues(): Promise<void>;
|
|
334
|
+
/**
|
|
335
|
+
* @private
|
|
336
|
+
*/
|
|
337
|
+
notifyTransfer(): void;
|
|
338
|
+
/**
|
|
339
|
+
*
|
|
340
|
+
* the server invokes the resetLifeTimeAndKeepAliveCounters method of the subscription
|
|
341
|
+
* when the server has send a Publish Response, so that the subscription
|
|
342
|
+
* can reset its life time counter.
|
|
343
|
+
*
|
|
344
|
+
* @private
|
|
345
|
+
*/
|
|
346
|
+
resetLifeTimeAndKeepAliveCounters(): void;
|
|
347
|
+
private _updateCounters;
|
|
348
|
+
/**
|
|
349
|
+
* _publish_pending_notifications send a "notification" event:
|
|
350
|
+
*
|
|
351
|
+
* @private
|
|
352
|
+
* @precondition
|
|
353
|
+
* - pendingPublishRequestCount > 0
|
|
354
|
+
*/
|
|
355
|
+
_publish_pending_notifications(): void;
|
|
356
|
+
process_subscription(): void;
|
|
357
|
+
_get_future_sequence_number(): number;
|
|
358
|
+
private _process_keepAlive;
|
|
359
|
+
private _stop_timer;
|
|
360
|
+
private _start_timer;
|
|
361
|
+
private _get_next_sequence_number;
|
|
362
|
+
/**
|
|
363
|
+
* @private
|
|
364
|
+
*/
|
|
365
|
+
private _tick;
|
|
366
|
+
/**
|
|
367
|
+
* @private
|
|
368
|
+
*/
|
|
369
|
+
private _sendKeepAliveResponse;
|
|
370
|
+
/**
|
|
371
|
+
* Reset the Lifetime Counter Variable to the value specified for the lifetime of a Subscription in
|
|
372
|
+
* the CreateSubscription Service( 5.13.2).
|
|
373
|
+
* @private
|
|
374
|
+
*/
|
|
375
|
+
private resetKeepAliveCounter;
|
|
376
|
+
/**
|
|
377
|
+
* @private
|
|
378
|
+
*/
|
|
379
|
+
private increaseKeepAliveCounter;
|
|
380
|
+
/**
|
|
381
|
+
* @private
|
|
382
|
+
*/
|
|
383
|
+
private _addNotificationMessage;
|
|
384
|
+
/**
|
|
385
|
+
* @internal
|
|
386
|
+
* @param monitoredItemId
|
|
387
|
+
*/
|
|
388
|
+
private _removePendingNotificationsFor;
|
|
389
|
+
/**
|
|
390
|
+
* Extract the next Notification that is ready to be sent to the client.
|
|
391
|
+
* @return the Notification to send._pending_notifications
|
|
392
|
+
*/
|
|
393
|
+
private _popNotificationToSend;
|
|
394
|
+
/**
|
|
395
|
+
* discardOldSentNotification find all sent notification message that have expired keep-alive
|
|
396
|
+
* and destroy them.
|
|
397
|
+
* @private
|
|
398
|
+
*
|
|
399
|
+
* Subscriptions maintain a retransmission queue of sent NotificationMessages.
|
|
400
|
+
* NotificationMessages are retained in this queue until they are acknowledged or until they have
|
|
401
|
+
* been in the queue for a minimum of one keep-alive interval.
|
|
402
|
+
*
|
|
403
|
+
*/
|
|
404
|
+
private discardOldSentNotifications;
|
|
405
|
+
/**
|
|
406
|
+
* @param timestampsToReturn
|
|
407
|
+
* @param monitoredItemCreateRequest
|
|
408
|
+
* @param node
|
|
409
|
+
* @private
|
|
410
|
+
*/
|
|
411
|
+
private _createMonitoredItemStep2;
|
|
412
|
+
/**
|
|
413
|
+
*
|
|
414
|
+
* @param monitoredItem
|
|
415
|
+
* @param monitoredItemCreateRequest
|
|
416
|
+
* @private
|
|
417
|
+
*/
|
|
418
|
+
_createMonitoredItemStep3(monitoredItem: MonitoredItem | null, monitoredItemCreateRequest: MonitoredItemCreateRequest): void;
|
|
419
|
+
private _harvestMonitoredItems;
|
|
420
|
+
}
|
|
421
|
+
export {};
|