node-opcua-client 2.188.1 → 2.190.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/alarms_and_conditions/client_alarm_tools.d.ts.map +1 -1
- package/dist/alarms_and_conditions/client_alarm_tools.js +2 -1
- package/dist/alarms_and_conditions/client_alarm_tools.js.map +1 -1
- package/dist/client_monitored_item_toolbox.d.ts.map +1 -1
- package/dist/client_monitored_item_toolbox.js +8 -4
- package/dist/client_monitored_item_toolbox.js.map +1 -1
- package/dist/client_session_keepalive_manager.d.ts.map +1 -1
- package/dist/client_session_keepalive_manager.js +18 -12
- package/dist/client_session_keepalive_manager.js.map +1 -1
- package/dist/private/client_base_impl.d.ts +10 -1
- package/dist/private/client_base_impl.d.ts.map +1 -1
- package/dist/private/client_base_impl.js +188 -77
- package/dist/private/client_base_impl.js.map +1 -1
- package/dist/private/client_monitored_item_impl.d.ts.map +1 -1
- package/dist/private/client_monitored_item_impl.js +2 -1
- package/dist/private/client_monitored_item_impl.js.map +1 -1
- package/dist/private/client_publish_engine.d.ts.map +1 -1
- package/dist/private/client_publish_engine.js +16 -8
- package/dist/private/client_publish_engine.js.map +1 -1
- package/dist/private/client_session_impl.d.ts +21 -0
- package/dist/private/client_session_impl.d.ts.map +1 -1
- package/dist/private/client_session_impl.js +122 -57
- package/dist/private/client_session_impl.js.map +1 -1
- package/dist/private/client_subscription_impl.d.ts.map +1 -1
- package/dist/private/client_subscription_impl.js +27 -17
- package/dist/private/client_subscription_impl.js.map +1 -1
- package/dist/private/opcua_client_impl.d.ts.map +1 -1
- package/dist/private/opcua_client_impl.js +307 -29
- package/dist/private/opcua_client_impl.js.map +1 -1
- package/dist/private/reconnection/client_publish_engine_reconnection.d.ts.map +1 -1
- package/dist/private/reconnection/client_publish_engine_reconnection.js +6 -3
- package/dist/private/reconnection/client_publish_engine_reconnection.js.map +1 -1
- package/dist/private/reconnection/client_subscription_reconnection.d.ts.map +1 -1
- package/dist/private/reconnection/client_subscription_reconnection.js +6 -3
- package/dist/private/reconnection/client_subscription_reconnection.js.map +1 -1
- package/dist/private/reconnection/reconnection.d.ts.map +1 -1
- package/dist/private/reconnection/reconnection.js +6 -4
- package/dist/private/reconnection/reconnection.js.map +1 -1
- package/dist/private/verify_server_signature.d.ts +51 -0
- package/dist/private/verify_server_signature.d.ts.map +1 -0
- package/dist/private/verify_server_signature.js +76 -0
- package/dist/private/verify_server_signature.js.map +1 -0
- package/dist/reverse/client_reverse_connect.js +2 -2
- package/dist/reverse/client_reverse_connect.js.map +1 -1
- package/dist/tools/read_history_server_capabilities.js +6 -3
- package/dist/tools/read_history_server_capabilities.js.map +1 -1
- package/dist/verify.d.ts +6 -0
- package/dist/verify.d.ts.map +1 -1
- package/dist/verify.js +32 -10
- package/dist/verify.js.map +1 -1
- package/package.json +47 -47
- package/source/alarms_and_conditions/client_alarm_tools.ts +2 -1
- package/source/client_monitored_item_toolbox.ts +8 -4
- package/source/client_session_keepalive_manager.ts +18 -12
- package/source/private/client_base_impl.ts +206 -78
- package/source/private/client_monitored_item_impl.ts +2 -1
- package/source/private/client_publish_engine.ts +16 -8
- package/source/private/client_session_impl.ts +122 -57
- package/source/private/client_subscription_impl.ts +27 -17
- package/source/private/opcua_client_impl.ts +383 -29
- package/source/private/reconnection/client_publish_engine_reconnection.ts +6 -3
- package/source/private/reconnection/client_subscription_reconnection.ts +6 -3
- package/source/private/reconnection/reconnection.ts +6 -4
- package/source/private/verify_server_signature.ts +109 -0
- package/source/reverse/client_reverse_connect.ts +2 -2
- package/source/tools/read_history_server_capabilities.ts +6 -3
- package/source/verify.ts +34 -12
|
@@ -281,10 +281,11 @@ export class ClientMonitoredItemImpl extends EventEmitter implements ClientMonit
|
|
|
281
281
|
|
|
282
282
|
const filter = this.monitoringParameters.filter;
|
|
283
283
|
|
|
284
|
-
|
|
284
|
+
/* c8 ignore start */
|
|
285
285
|
if (!filter) {
|
|
286
286
|
return { error: "Internal Error" };
|
|
287
287
|
}
|
|
288
|
+
/* c8 ignore stop */
|
|
288
289
|
|
|
289
290
|
if (filter.schema.name !== "EventFilter") {
|
|
290
291
|
return {
|
|
@@ -285,7 +285,7 @@ export class ClientSidePublishEngine {
|
|
|
285
285
|
}
|
|
286
286
|
|
|
287
287
|
if (err) {
|
|
288
|
-
/* c8 ignore
|
|
288
|
+
/* c8 ignore start */
|
|
289
289
|
if (doDebug) {
|
|
290
290
|
debugLog(
|
|
291
291
|
chalk.cyan("ClientSidePublishEngine.prototype.internalSendPublishRequest callback : "),
|
|
@@ -293,21 +293,23 @@ export class ClientSidePublishEngine {
|
|
|
293
293
|
);
|
|
294
294
|
debugLog(`'${err.message}'`);
|
|
295
295
|
}
|
|
296
|
+
/* c8 ignore stop */
|
|
296
297
|
|
|
297
298
|
if (err.message.match("not connected")) {
|
|
298
|
-
/* c8 ignore
|
|
299
|
+
/* c8 ignore start */
|
|
299
300
|
if (doDebug) {
|
|
300
301
|
debugLog(
|
|
301
302
|
chalk.bgWhite.red(" WARNING : CLIENT IS NOT CONNECTED :" + " MAY BE RECONNECTION IS IN PROGRESS")
|
|
302
303
|
);
|
|
303
304
|
debugLog("this.activeSubscriptionCount =", this.activeSubscriptionCount);
|
|
304
305
|
}
|
|
306
|
+
/* c8 ignore stop */
|
|
305
307
|
// the previous publish request has ended up with an error because
|
|
306
308
|
// the connection has failed ...
|
|
307
309
|
// There is no need to send more publish request for the time being until reconnection is completed
|
|
308
310
|
active = false;
|
|
309
311
|
}
|
|
310
|
-
/* c8 ignore
|
|
312
|
+
/* c8 ignore start */
|
|
311
313
|
if (err.message.match(/BadNoSubscription/) && this.activeSubscriptionCount >= 1) {
|
|
312
314
|
// there is something wrong happening here.
|
|
313
315
|
// the server tells us that there is no subscription for this session
|
|
@@ -320,6 +322,7 @@ export class ClientSidePublishEngine {
|
|
|
320
322
|
}
|
|
321
323
|
active = false;
|
|
322
324
|
}
|
|
325
|
+
/* c8 ignore stop */
|
|
323
326
|
|
|
324
327
|
if (err.message.match(/BadSessionClosed|BadSessionIdInvalid/)) {
|
|
325
328
|
//
|
|
@@ -327,13 +330,14 @@ export class ClientSidePublishEngine {
|
|
|
327
330
|
// may be the session timeout is shorted than the subscription life time
|
|
328
331
|
// and the client does not send intermediate keepAlive request to keep the connection working.
|
|
329
332
|
//
|
|
330
|
-
/* c8 ignore
|
|
333
|
+
/* c8 ignore start */
|
|
331
334
|
if (doDebug) {
|
|
332
335
|
debugLog(chalk.bgWhite.red(" WARNING : Server tells that the session has closed ..."));
|
|
333
336
|
debugLog(
|
|
334
337
|
" the ClientSidePublishEngine shall now be disabled," + " as server will reject any further request"
|
|
335
338
|
);
|
|
336
339
|
}
|
|
340
|
+
/* c8 ignore stop */
|
|
337
341
|
// close all active subscription....
|
|
338
342
|
active = false;
|
|
339
343
|
}
|
|
@@ -364,20 +368,22 @@ export class ClientSidePublishEngine {
|
|
|
364
368
|
// completed the session transfer. We should pause and let the
|
|
365
369
|
// reconnection flow replenish publish requests once the session
|
|
366
370
|
// transfer completes.
|
|
367
|
-
/* c8 ignore
|
|
371
|
+
/* c8 ignore start */
|
|
368
372
|
doDebug &&
|
|
369
373
|
debugLog(
|
|
370
374
|
chalk.bgWhite.yellow(
|
|
371
375
|
" WARNING: BadSecureChannelIdInvalid on PublishRequest" + " - session transfer may be in progress"
|
|
372
376
|
)
|
|
373
377
|
);
|
|
378
|
+
/* c8 ignore stop */
|
|
374
379
|
active = false;
|
|
375
380
|
}
|
|
376
381
|
} else if (response) {
|
|
377
|
-
/* c8 ignore
|
|
382
|
+
/* c8 ignore start */
|
|
378
383
|
if (doDebug) {
|
|
379
384
|
debugLog(chalk.cyan("ClientSidePublishEngine.prototype.internalSendPublishRequest callback "));
|
|
380
385
|
}
|
|
386
|
+
/* c8 ignore stop */
|
|
381
387
|
this._receive_publish_response(response);
|
|
382
388
|
}
|
|
383
389
|
|
|
@@ -429,19 +435,21 @@ export class ClientSidePublishEngine {
|
|
|
429
435
|
// delegate notificationData to the subscription callback
|
|
430
436
|
subscription.onNotificationMessage(notificationMessage);
|
|
431
437
|
} catch (err) {
|
|
432
|
-
/* c8 ignore
|
|
438
|
+
/* c8 ignore start */
|
|
433
439
|
if (doDebug) {
|
|
434
440
|
debugLog(err);
|
|
435
441
|
debugLog("Exception in onNotificationMessage");
|
|
436
442
|
}
|
|
443
|
+
/* c8 ignore stop */
|
|
437
444
|
}
|
|
438
445
|
} else {
|
|
439
|
-
/* c8 ignore
|
|
446
|
+
/* c8 ignore start */
|
|
440
447
|
if (doDebug) {
|
|
441
448
|
debugLog(" ignoring notificationMessage", notificationMessage, " for subscription", subscriptionId);
|
|
442
449
|
debugLog(" because there is no subscription.");
|
|
443
450
|
debugLog(" or because there is no session for the subscription (session terminated ?).");
|
|
444
451
|
}
|
|
452
|
+
/* c8 ignore stop */
|
|
445
453
|
}
|
|
446
454
|
}
|
|
447
455
|
}
|