node-opcua-client 2.140.0 → 2.142.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_tools.js +5 -5
- package/dist/alarms_and_conditions/client_tools.js.map +1 -1
- package/dist/private/client_base_impl.js +39 -44
- package/dist/private/client_base_impl.js.map +1 -1
- package/dist/private/client_monitored_item_group_impl.js +4 -4
- package/dist/private/client_monitored_item_group_impl.js.map +1 -1
- package/dist/private/client_monitored_item_impl.js +4 -4
- package/dist/private/client_monitored_item_impl.js.map +1 -1
- package/dist/private/client_session_impl.js +36 -36
- package/dist/private/client_session_impl.js.map +1 -1
- package/dist/private/client_subscription_impl.js +8 -8
- package/dist/private/client_subscription_impl.js.map +1 -1
- package/dist/private/opcua_client_impl.js +7 -7
- package/dist/private/opcua_client_impl.js.map +1 -1
- package/dist/tools/findservers.js +3 -3
- package/dist/tools/findservers.js.map +1 -1
- package/dist/tools/read_history_server_capabilities.js +2 -2
- package/dist/tools/read_history_server_capabilities.js.map +1 -1
- package/package.json +31 -32
- package/source/alarms_and_conditions/client_tools.ts +5 -5
- package/source/private/client_base_impl.ts +26 -34
- package/source/private/client_monitored_item_group_impl.ts +4 -4
- package/source/private/client_monitored_item_impl.ts +4 -4
- package/source/private/client_session_impl.ts +36 -36
- package/source/private/client_subscription_impl.ts +8 -8
- package/source/private/opcua_client_impl.ts +7 -7
- package/source/tools/findservers.ts +3 -3
- package/source/tools/read_history_server_capabilities.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-opcua-client",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.142.0",
|
|
4
4
|
"description": "pure nodejs OPCUA SDK - module client",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"clean": "npx rimraf -g node_modules dist *.tsbuildinfo certificates",
|
|
@@ -17,56 +17,55 @@
|
|
|
17
17
|
"@types/async": "^3.2.24",
|
|
18
18
|
"async": "^3.2.6",
|
|
19
19
|
"chalk": "4.1.2",
|
|
20
|
-
"node-opcua-alarm-condition": "2.
|
|
20
|
+
"node-opcua-alarm-condition": "2.142.0",
|
|
21
21
|
"node-opcua-assert": "2.139.0",
|
|
22
22
|
"node-opcua-basic-types": "2.139.0",
|
|
23
23
|
"node-opcua-buffer-utils": "2.139.0",
|
|
24
|
-
"node-opcua-certificate-manager": "2.
|
|
25
|
-
"node-opcua-client-dynamic-extension-object": "2.
|
|
26
|
-
"node-opcua-common": "2.
|
|
24
|
+
"node-opcua-certificate-manager": "2.142.0",
|
|
25
|
+
"node-opcua-client-dynamic-extension-object": "2.142.0",
|
|
26
|
+
"node-opcua-common": "2.142.0",
|
|
27
27
|
"node-opcua-constants": "2.139.0",
|
|
28
|
-
"node-opcua-crypto": "4.
|
|
28
|
+
"node-opcua-crypto": "4.16.0",
|
|
29
29
|
"node-opcua-data-model": "2.139.0",
|
|
30
|
-
"node-opcua-data-value": "2.
|
|
30
|
+
"node-opcua-data-value": "2.142.0",
|
|
31
31
|
"node-opcua-date-time": "2.139.0",
|
|
32
32
|
"node-opcua-debug": "2.139.0",
|
|
33
33
|
"node-opcua-extension-object": "2.139.0",
|
|
34
34
|
"node-opcua-hostname": "2.139.0",
|
|
35
35
|
"node-opcua-nodeid": "2.139.0",
|
|
36
36
|
"node-opcua-object-registry": "2.139.0",
|
|
37
|
-
"node-opcua-pki": "
|
|
38
|
-
"node-opcua-pseudo-session": "2.
|
|
39
|
-
"node-opcua-schemas": "2.
|
|
40
|
-
"node-opcua-secure-channel": "2.
|
|
41
|
-
"node-opcua-service-browse": "2.
|
|
42
|
-
"node-opcua-service-call": "2.
|
|
43
|
-
"node-opcua-service-discovery": "2.
|
|
44
|
-
"node-opcua-service-endpoints": "2.
|
|
45
|
-
"node-opcua-service-filter": "2.
|
|
46
|
-
"node-opcua-service-history": "2.
|
|
47
|
-
"node-opcua-service-query": "2.
|
|
48
|
-
"node-opcua-service-read": "2.
|
|
49
|
-
"node-opcua-service-register-node": "2.
|
|
50
|
-
"node-opcua-service-secure-channel": "2.
|
|
51
|
-
"node-opcua-service-session": "2.
|
|
52
|
-
"node-opcua-service-subscription": "2.
|
|
53
|
-
"node-opcua-service-translate-browse-path": "2.
|
|
54
|
-
"node-opcua-service-write": "2.
|
|
37
|
+
"node-opcua-pki": "5.1.0",
|
|
38
|
+
"node-opcua-pseudo-session": "2.142.0",
|
|
39
|
+
"node-opcua-schemas": "2.142.0",
|
|
40
|
+
"node-opcua-secure-channel": "2.142.0",
|
|
41
|
+
"node-opcua-service-browse": "2.142.0",
|
|
42
|
+
"node-opcua-service-call": "2.142.0",
|
|
43
|
+
"node-opcua-service-discovery": "2.142.0",
|
|
44
|
+
"node-opcua-service-endpoints": "2.142.0",
|
|
45
|
+
"node-opcua-service-filter": "2.142.0",
|
|
46
|
+
"node-opcua-service-history": "2.142.0",
|
|
47
|
+
"node-opcua-service-query": "2.142.0",
|
|
48
|
+
"node-opcua-service-read": "2.142.0",
|
|
49
|
+
"node-opcua-service-register-node": "2.142.0",
|
|
50
|
+
"node-opcua-service-secure-channel": "2.142.0",
|
|
51
|
+
"node-opcua-service-session": "2.142.0",
|
|
52
|
+
"node-opcua-service-subscription": "2.142.0",
|
|
53
|
+
"node-opcua-service-translate-browse-path": "2.142.0",
|
|
54
|
+
"node-opcua-service-write": "2.142.0",
|
|
55
55
|
"node-opcua-status-code": "2.139.0",
|
|
56
|
-
"node-opcua-types": "2.
|
|
56
|
+
"node-opcua-types": "2.142.0",
|
|
57
57
|
"node-opcua-utils": "2.139.0",
|
|
58
|
-
"node-opcua-variant": "2.
|
|
59
|
-
"thenify": "
|
|
58
|
+
"node-opcua-variant": "2.142.0",
|
|
59
|
+
"thenify-ex": "4.2.0"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@types/underscore": "^1.13.0",
|
|
63
63
|
"dequeue": "^1.0.5",
|
|
64
|
-
"node-opcua-address-space": "2.
|
|
64
|
+
"node-opcua-address-space": "2.142.0",
|
|
65
65
|
"node-opcua-binary-stream": "2.139.0",
|
|
66
66
|
"node-opcua-factory": "2.139.0",
|
|
67
67
|
"node-opcua-leak-detector": "2.139.0",
|
|
68
|
-
"node-opcua-nodesets": "2.139.0"
|
|
69
|
-
"underscore": "^1.13.7"
|
|
68
|
+
"node-opcua-nodesets": "2.139.0"
|
|
70
69
|
},
|
|
71
70
|
"eslintConfig": {
|
|
72
71
|
"env": {
|
|
@@ -88,7 +87,7 @@
|
|
|
88
87
|
"internet of things"
|
|
89
88
|
],
|
|
90
89
|
"homepage": "http://node-opcua.github.io/",
|
|
91
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "50cfa07779d4c07b299176ac9c27527fcd97d079",
|
|
92
91
|
"files": [
|
|
93
92
|
"dist",
|
|
94
93
|
"source"
|
|
@@ -66,9 +66,9 @@ ClientSessionImpl.prototype.acknowledgeCondition = function (
|
|
|
66
66
|
|
|
67
67
|
// tslint:disable:no-var-requires
|
|
68
68
|
// tslint:disable:max-line-length
|
|
69
|
-
|
|
69
|
+
import { withCallback } from "thenify-ex";
|
|
70
70
|
const opts = { multiArgs: false };
|
|
71
|
-
ClientSessionImpl.prototype.addCommentCondition =
|
|
72
|
-
ClientSessionImpl.prototype.findMethodId =
|
|
73
|
-
ClientSessionImpl.prototype.confirmCondition =
|
|
74
|
-
ClientSessionImpl.prototype.acknowledgeCondition =
|
|
71
|
+
ClientSessionImpl.prototype.addCommentCondition = withCallback(ClientSessionImpl.prototype.addCommentCondition, opts);
|
|
72
|
+
ClientSessionImpl.prototype.findMethodId = withCallback(ClientSessionImpl.prototype.findMethodId, opts);
|
|
73
|
+
ClientSessionImpl.prototype.confirmCondition = withCallback(ClientSessionImpl.prototype.confirmCondition, opts);
|
|
74
|
+
ClientSessionImpl.prototype.acknowledgeCondition = withCallback(ClientSessionImpl.prototype.acknowledgeCondition, opts);
|
|
@@ -223,30 +223,21 @@ function __findEndpoint(this: ClientBaseImpl, endpointUrl: string, params: FindE
|
|
|
223
223
|
/**
|
|
224
224
|
* check if certificate is trusted or untrusted
|
|
225
225
|
*/
|
|
226
|
-
function _verify_serverCertificate(
|
|
226
|
+
async function _verify_serverCertificate(
|
|
227
227
|
certificateManager: OPCUACertificateManager,
|
|
228
|
-
serverCertificate: Certificate
|
|
229
|
-
|
|
230
|
-
) {
|
|
231
|
-
|
|
232
|
-
if (
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
// istanbul ignore next
|
|
237
|
-
if (doDebug) {
|
|
238
|
-
// do it again for debug purposes
|
|
239
|
-
certificateManager.verifyCertificate(serverCertificate, (err1: Error | null, status1?: VerificationStatus) => {
|
|
240
|
-
debugLog(status1);
|
|
241
|
-
});
|
|
242
|
-
}
|
|
243
|
-
warningLog("serverCertificate = ", makeSHA1Thumbprint(serverCertificate).toString("hex"));
|
|
244
|
-
warningLog("serverCertificate = ", serverCertificate.toString("base64"));
|
|
245
|
-
|
|
246
|
-
return callback(new Error("server Certificate verification failed with err " + status?.toString()));
|
|
228
|
+
serverCertificate: Certificate) {
|
|
229
|
+
const status = await certificateManager.checkCertificate(serverCertificate);
|
|
230
|
+
if (status !== StatusCodes.Good) {
|
|
231
|
+
// istanbul ignore next
|
|
232
|
+
if (doDebug) {
|
|
233
|
+
// do it again for debug purposes
|
|
234
|
+
const status1 = await certificateManager.verifyCertificate(serverCertificate);
|
|
235
|
+
debugLog(status1);
|
|
247
236
|
}
|
|
248
|
-
|
|
249
|
-
|
|
237
|
+
warningLog("serverCertificate = ", makeSHA1Thumbprint(serverCertificate).toString("hex"));
|
|
238
|
+
warningLog("serverCertificate = ", serverCertificate.toString("base64"));
|
|
239
|
+
throw new Error("server Certificate verification failed with err " + status?.toString());
|
|
240
|
+
}
|
|
250
241
|
}
|
|
251
242
|
|
|
252
243
|
const forceEndpointDiscoveryOnConnect = !!parseInt(process.env.NODEOPCUA_CLIENT_FORCE_ENDPOINT_DISCOVERY || "0", 10);
|
|
@@ -1436,8 +1427,12 @@ export class ClientBaseImpl extends OPCUASecureObject implements OPCUAClientBase
|
|
|
1436
1427
|
|
|
1437
1428
|
assert(endpoint);
|
|
1438
1429
|
|
|
1439
|
-
_verify_serverCertificate(this.clientCertificateManager, endpoint.serverCertificate
|
|
1440
|
-
|
|
1430
|
+
_verify_serverCertificate(this.clientCertificateManager, endpoint.serverCertificate)
|
|
1431
|
+
.then(() => {
|
|
1432
|
+
this.serverCertificate = endpoint.serverCertificate;
|
|
1433
|
+
callback(null, endpoint.endpointUrl!);
|
|
1434
|
+
})
|
|
1435
|
+
.catch((err1: Error) => {
|
|
1441
1436
|
warningLog("[NODE-OPCUA-W25] client's server certificate verification has failed ", err1.message);
|
|
1442
1437
|
warningLog(" clientCertificateManager.rootDir = ", this.clientCertificateManager.rootDir);
|
|
1443
1438
|
|
|
@@ -1462,10 +1457,7 @@ export class ClientBaseImpl extends OPCUASecureObject implements OPCUAClientBase
|
|
|
1462
1457
|
);
|
|
1463
1458
|
}
|
|
1464
1459
|
return callback(err1);
|
|
1465
|
-
}
|
|
1466
|
-
this.serverCertificate = endpoint.serverCertificate;
|
|
1467
|
-
callback(null, endpoint.endpointUrl!);
|
|
1468
|
-
});
|
|
1460
|
+
});
|
|
1469
1461
|
});
|
|
1470
1462
|
}
|
|
1471
1463
|
private _accumulate_statistics() {
|
|
@@ -1791,12 +1783,12 @@ class TmpClient extends ClientBaseImpl {
|
|
|
1791
1783
|
|
|
1792
1784
|
// tslint:disable:no-var-requires
|
|
1793
1785
|
// tslint:disable:max-line-length
|
|
1794
|
-
|
|
1795
|
-
ClientBaseImpl.prototype.connect =
|
|
1796
|
-
ClientBaseImpl.prototype.disconnect =
|
|
1797
|
-
ClientBaseImpl.prototype.getEndpoints =
|
|
1798
|
-
ClientBaseImpl.prototype.findServers =
|
|
1799
|
-
ClientBaseImpl.prototype.findServersOnNetwork =
|
|
1786
|
+
import { withCallback } from "thenify-ex";
|
|
1787
|
+
ClientBaseImpl.prototype.connect = withCallback(ClientBaseImpl.prototype.connect);
|
|
1788
|
+
ClientBaseImpl.prototype.disconnect = withCallback(ClientBaseImpl.prototype.disconnect);
|
|
1789
|
+
ClientBaseImpl.prototype.getEndpoints = withCallback(ClientBaseImpl.prototype.getEndpoints);
|
|
1790
|
+
ClientBaseImpl.prototype.findServers = withCallback(ClientBaseImpl.prototype.findServers);
|
|
1791
|
+
ClientBaseImpl.prototype.findServersOnNetwork = withCallback(ClientBaseImpl.prototype.findServersOnNetwork);
|
|
1800
1792
|
|
|
1801
1793
|
OPCUAClientBase.create = (options: OPCUAClientBaseOptions): OPCUAClientBase => {
|
|
1802
1794
|
return new ClientBaseImpl(options);
|
|
@@ -215,14 +215,14 @@ Please investigate the code of the event handler function to fix the error.`
|
|
|
215
215
|
|
|
216
216
|
// tslint:disable:no-var-requires
|
|
217
217
|
// tslint:disable:max-line-length
|
|
218
|
-
|
|
218
|
+
import { withCallback } from "thenify-ex";
|
|
219
219
|
const opts = { multiArgs: false };
|
|
220
220
|
|
|
221
|
-
ClientMonitoredItemGroupImpl.prototype.terminate =
|
|
222
|
-
ClientMonitoredItemGroupImpl.prototype.setMonitoringMode =
|
|
221
|
+
ClientMonitoredItemGroupImpl.prototype.terminate = withCallback(ClientMonitoredItemGroupImpl.prototype.terminate);
|
|
222
|
+
ClientMonitoredItemGroupImpl.prototype.setMonitoringMode = withCallback(
|
|
223
223
|
ClientMonitoredItemGroupImpl.prototype.setMonitoringMode
|
|
224
224
|
);
|
|
225
|
-
ClientMonitoredItemGroupImpl.prototype.modify =
|
|
225
|
+
ClientMonitoredItemGroupImpl.prototype.modify = withCallback(ClientMonitoredItemGroupImpl.prototype.modify);
|
|
226
226
|
|
|
227
227
|
ClientMonitoredItemGroup.create = (
|
|
228
228
|
subscription: ClientSubscription,
|
|
@@ -386,12 +386,12 @@ export class ClientMonitoredItemImpl extends EventEmitter implements ClientMonit
|
|
|
386
386
|
|
|
387
387
|
// tslint:disable:no-var-requires
|
|
388
388
|
// tslint:disable:max-line-length
|
|
389
|
-
|
|
389
|
+
import { withCallback } from "thenify-ex";
|
|
390
390
|
const opts = { multiArgs: false };
|
|
391
391
|
|
|
392
|
-
ClientMonitoredItemImpl.prototype.terminate =
|
|
393
|
-
ClientMonitoredItemImpl.prototype.setMonitoringMode =
|
|
394
|
-
ClientMonitoredItemImpl.prototype.modify =
|
|
392
|
+
ClientMonitoredItemImpl.prototype.terminate = withCallback(ClientMonitoredItemImpl.prototype.terminate);
|
|
393
|
+
ClientMonitoredItemImpl.prototype.setMonitoringMode = withCallback(ClientMonitoredItemImpl.prototype.setMonitoringMode);
|
|
394
|
+
ClientMonitoredItemImpl.prototype.modify = withCallback(ClientMonitoredItemImpl.prototype.modify);
|
|
395
395
|
|
|
396
396
|
ClientMonitoredItem.create = (
|
|
397
397
|
subscription: ClientSubscription,
|
|
@@ -2185,44 +2185,44 @@ async function promoteOpaqueStructureForCall(session: IBasicSessionAsync2, callM
|
|
|
2185
2185
|
|
|
2186
2186
|
// tslint:disable:no-var-requires
|
|
2187
2187
|
// tslint:disable:max-line-length
|
|
2188
|
-
|
|
2188
|
+
import { withCallback } from "thenify-ex";
|
|
2189
2189
|
const opts = { multiArgs: false };
|
|
2190
2190
|
|
|
2191
|
-
ClientSessionImpl.prototype.browse =
|
|
2192
|
-
ClientSessionImpl.prototype.browseNext =
|
|
2193
|
-
ClientSessionImpl.prototype.readVariableValue =
|
|
2194
|
-
ClientSessionImpl.prototype.readHistoryValue =
|
|
2195
|
-
ClientSessionImpl.prototype.readAggregateValue =
|
|
2196
|
-
ClientSessionImpl.prototype.historyRead =
|
|
2197
|
-
ClientSessionImpl.prototype.write =
|
|
2198
|
-
ClientSessionImpl.prototype.writeSingleNode =
|
|
2199
|
-
ClientSessionImpl.prototype.readAllAttributes =
|
|
2200
|
-
ClientSessionImpl.prototype.read =
|
|
2201
|
-
ClientSessionImpl.prototype.createSubscription =
|
|
2202
|
-
ClientSessionImpl.prototype.createSubscription2 =
|
|
2203
|
-
ClientSessionImpl.prototype.deleteSubscriptions =
|
|
2204
|
-
ClientSessionImpl.prototype.transferSubscriptions =
|
|
2205
|
-
ClientSessionImpl.prototype.createMonitoredItems =
|
|
2206
|
-
ClientSessionImpl.prototype.modifyMonitoredItems =
|
|
2207
|
-
ClientSessionImpl.prototype.modifySubscription =
|
|
2208
|
-
ClientSessionImpl.prototype.setTriggering =
|
|
2209
|
-
ClientSessionImpl.prototype.setMonitoringMode =
|
|
2210
|
-
ClientSessionImpl.prototype.publish =
|
|
2211
|
-
ClientSessionImpl.prototype.republish =
|
|
2212
|
-
ClientSessionImpl.prototype.deleteMonitoredItems =
|
|
2213
|
-
ClientSessionImpl.prototype.setPublishingMode =
|
|
2214
|
-
ClientSessionImpl.prototype.translateBrowsePath =
|
|
2215
|
-
ClientSessionImpl.prototype.performMessageTransaction =
|
|
2191
|
+
ClientSessionImpl.prototype.browse = withCallback(ClientSessionImpl.prototype.browse, opts);
|
|
2192
|
+
ClientSessionImpl.prototype.browseNext = withCallback(ClientSessionImpl.prototype.browseNext, opts);
|
|
2193
|
+
ClientSessionImpl.prototype.readVariableValue = withCallback(ClientSessionImpl.prototype.readVariableValue, opts);
|
|
2194
|
+
ClientSessionImpl.prototype.readHistoryValue = withCallback(ClientSessionImpl.prototype.readHistoryValue, opts);
|
|
2195
|
+
ClientSessionImpl.prototype.readAggregateValue = withCallback(ClientSessionImpl.prototype.readAggregateValue, opts);
|
|
2196
|
+
ClientSessionImpl.prototype.historyRead = withCallback(ClientSessionImpl.prototype.historyRead, opts);
|
|
2197
|
+
ClientSessionImpl.prototype.write = withCallback(ClientSessionImpl.prototype.write, opts);
|
|
2198
|
+
ClientSessionImpl.prototype.writeSingleNode = withCallback(ClientSessionImpl.prototype.writeSingleNode, opts);
|
|
2199
|
+
ClientSessionImpl.prototype.readAllAttributes = withCallback(ClientSessionImpl.prototype.readAllAttributes, opts);
|
|
2200
|
+
ClientSessionImpl.prototype.read = withCallback(ClientSessionImpl.prototype.read, opts);
|
|
2201
|
+
ClientSessionImpl.prototype.createSubscription = withCallback(ClientSessionImpl.prototype.createSubscription, opts);
|
|
2202
|
+
ClientSessionImpl.prototype.createSubscription2 = withCallback(ClientSessionImpl.prototype.createSubscription2, opts);
|
|
2203
|
+
ClientSessionImpl.prototype.deleteSubscriptions = withCallback(ClientSessionImpl.prototype.deleteSubscriptions, opts);
|
|
2204
|
+
ClientSessionImpl.prototype.transferSubscriptions = withCallback(ClientSessionImpl.prototype.transferSubscriptions, opts);
|
|
2205
|
+
ClientSessionImpl.prototype.createMonitoredItems = withCallback(ClientSessionImpl.prototype.createMonitoredItems, opts);
|
|
2206
|
+
ClientSessionImpl.prototype.modifyMonitoredItems = withCallback(ClientSessionImpl.prototype.modifyMonitoredItems, opts);
|
|
2207
|
+
ClientSessionImpl.prototype.modifySubscription = withCallback(ClientSessionImpl.prototype.modifySubscription, opts);
|
|
2208
|
+
ClientSessionImpl.prototype.setTriggering = withCallback(ClientSessionImpl.prototype.setTriggering, opts);
|
|
2209
|
+
ClientSessionImpl.prototype.setMonitoringMode = withCallback(ClientSessionImpl.prototype.setMonitoringMode, opts);
|
|
2210
|
+
ClientSessionImpl.prototype.publish = withCallback(ClientSessionImpl.prototype.publish, opts);
|
|
2211
|
+
ClientSessionImpl.prototype.republish = withCallback(ClientSessionImpl.prototype.republish, opts);
|
|
2212
|
+
ClientSessionImpl.prototype.deleteMonitoredItems = withCallback(ClientSessionImpl.prototype.deleteMonitoredItems, opts);
|
|
2213
|
+
ClientSessionImpl.prototype.setPublishingMode = withCallback(ClientSessionImpl.prototype.setPublishingMode, opts);
|
|
2214
|
+
ClientSessionImpl.prototype.translateBrowsePath = withCallback(ClientSessionImpl.prototype.translateBrowsePath, opts);
|
|
2215
|
+
ClientSessionImpl.prototype.performMessageTransaction = withCallback(
|
|
2216
2216
|
ClientSessionImpl.prototype.performMessageTransaction,
|
|
2217
2217
|
opts
|
|
2218
2218
|
);
|
|
2219
|
-
ClientSessionImpl.prototype.close =
|
|
2220
|
-
ClientSessionImpl.prototype.call =
|
|
2221
|
-
ClientSessionImpl.prototype.getMonitoredItems =
|
|
2222
|
-
ClientSessionImpl.prototype.getArgumentDefinition =
|
|
2223
|
-
ClientSessionImpl.prototype.queryFirst =
|
|
2224
|
-
ClientSessionImpl.prototype.registerNodes =
|
|
2225
|
-
ClientSessionImpl.prototype.unregisterNodes =
|
|
2226
|
-
ClientSessionImpl.prototype.readNamespaceArray =
|
|
2227
|
-
ClientSessionImpl.prototype.getBuiltInDataType =
|
|
2228
|
-
ClientSessionImpl.prototype.changeUser =
|
|
2219
|
+
ClientSessionImpl.prototype.close = withCallback(ClientSessionImpl.prototype.close, opts);
|
|
2220
|
+
ClientSessionImpl.prototype.call = withCallback(ClientSessionImpl.prototype.call, opts);
|
|
2221
|
+
ClientSessionImpl.prototype.getMonitoredItems = withCallback(ClientSessionImpl.prototype.getMonitoredItems, opts);
|
|
2222
|
+
ClientSessionImpl.prototype.getArgumentDefinition = withCallback(ClientSessionImpl.prototype.getArgumentDefinition, opts);
|
|
2223
|
+
ClientSessionImpl.prototype.queryFirst = withCallback(ClientSessionImpl.prototype.queryFirst, opts);
|
|
2224
|
+
ClientSessionImpl.prototype.registerNodes = withCallback(ClientSessionImpl.prototype.registerNodes, opts);
|
|
2225
|
+
ClientSessionImpl.prototype.unregisterNodes = withCallback(ClientSessionImpl.prototype.unregisterNodes, opts);
|
|
2226
|
+
ClientSessionImpl.prototype.readNamespaceArray = withCallback(ClientSessionImpl.prototype.readNamespaceArray, opts);
|
|
2227
|
+
ClientSessionImpl.prototype.getBuiltInDataType = withCallback(ClientSessionImpl.prototype.getBuiltInDataType, opts);
|
|
2228
|
+
ClientSessionImpl.prototype.changeUser = withCallback(ClientSessionImpl.prototype.changeUser, opts);
|
|
@@ -863,16 +863,16 @@ export function ClientMonitoredItem_create(
|
|
|
863
863
|
}
|
|
864
864
|
// tslint:disable:no-var-requires
|
|
865
865
|
// tslint:disable:max-line-length
|
|
866
|
-
|
|
866
|
+
import { withCallback } from "thenify-ex";
|
|
867
867
|
const opts = { multiArgs: false };
|
|
868
868
|
|
|
869
|
-
ClientSubscriptionImpl.prototype.setPublishingMode =
|
|
870
|
-
ClientSubscriptionImpl.prototype.monitor =
|
|
871
|
-
ClientSubscriptionImpl.prototype.monitorItems =
|
|
872
|
-
ClientSubscriptionImpl.prototype.setTriggering =
|
|
873
|
-
ClientSubscriptionImpl.prototype.modify =
|
|
874
|
-
ClientSubscriptionImpl.prototype.terminate =
|
|
875
|
-
ClientSubscriptionImpl.prototype.getMonitoredItems =
|
|
869
|
+
ClientSubscriptionImpl.prototype.setPublishingMode = withCallback(ClientSubscriptionImpl.prototype.setPublishingMode);
|
|
870
|
+
ClientSubscriptionImpl.prototype.monitor = withCallback(ClientSubscriptionImpl.prototype.monitor);
|
|
871
|
+
ClientSubscriptionImpl.prototype.monitorItems = withCallback(ClientSubscriptionImpl.prototype.monitorItems);
|
|
872
|
+
ClientSubscriptionImpl.prototype.setTriggering = withCallback(ClientSubscriptionImpl.prototype.setTriggering);
|
|
873
|
+
ClientSubscriptionImpl.prototype.modify = withCallback(ClientSubscriptionImpl.prototype.modify);
|
|
874
|
+
ClientSubscriptionImpl.prototype.terminate = withCallback(ClientSubscriptionImpl.prototype.terminate);
|
|
875
|
+
ClientSubscriptionImpl.prototype.getMonitoredItems = withCallback(ClientSubscriptionImpl.prototype.getMonitoredItems);
|
|
876
876
|
|
|
877
877
|
ClientSubscription.create = (clientSession: ClientSession, options: ClientSubscriptionOptions) => {
|
|
878
878
|
return new ClientSubscriptionImpl(clientSession, options);
|
|
@@ -583,7 +583,7 @@ export class OPCUAClientImpl extends ClientBaseImpl implements OPCUAClient {
|
|
|
583
583
|
const session = await client.createSession2(userIdentity);
|
|
584
584
|
|
|
585
585
|
const oldClose = session.close as any;
|
|
586
|
-
(session as any).close =
|
|
586
|
+
(session as any).close = withCallback((...args: any[]): any => {
|
|
587
587
|
if (args.length === 1) {
|
|
588
588
|
return session.close(true, args[0]);
|
|
589
589
|
}
|
|
@@ -1214,7 +1214,7 @@ export class OPCUAClientImpl extends ClientBaseImpl implements OPCUAClient {
|
|
|
1214
1214
|
|
|
1215
1215
|
// tslint:disable:no-var-requires
|
|
1216
1216
|
// tslint:disable:max-line-length
|
|
1217
|
-
|
|
1217
|
+
import { withCallback } from "thenify-ex";
|
|
1218
1218
|
/**
|
|
1219
1219
|
|
|
1220
1220
|
*
|
|
@@ -1232,15 +1232,15 @@ const thenify = require("thenify");
|
|
|
1232
1232
|
* const session = client.createSession(userIdentityInfo);
|
|
1233
1233
|
*
|
|
1234
1234
|
*/
|
|
1235
|
-
OPCUAClientImpl.prototype.createSession =
|
|
1236
|
-
OPCUAClientImpl.prototype.createSession2 =
|
|
1235
|
+
OPCUAClientImpl.prototype.createSession = withCallback(OPCUAClientImpl.prototype.createSession);
|
|
1236
|
+
OPCUAClientImpl.prototype.createSession2 = withCallback(OPCUAClientImpl.prototype.createSession2);
|
|
1237
1237
|
/**
|
|
1238
1238
|
*/
|
|
1239
|
-
OPCUAClientImpl.prototype.changeSessionIdentity =
|
|
1239
|
+
OPCUAClientImpl.prototype.changeSessionIdentity = withCallback(OPCUAClientImpl.prototype.changeSessionIdentity);
|
|
1240
1240
|
/**
|
|
1241
1241
|
* @example
|
|
1242
1242
|
* const session = await client.createSession();
|
|
1243
1243
|
* await client.closeSession(session);
|
|
1244
1244
|
*/
|
|
1245
|
-
OPCUAClientImpl.prototype.closeSession =
|
|
1246
|
-
OPCUAClientImpl.prototype.reactivateSession =
|
|
1245
|
+
OPCUAClientImpl.prototype.closeSession = withCallback(OPCUAClientImpl.prototype.closeSession);
|
|
1246
|
+
OPCUAClientImpl.prototype.reactivateSession = withCallback(OPCUAClientImpl.prototype.reactivateSession);
|
|
@@ -91,6 +91,6 @@ export function findServersOnNetwork(
|
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
// tslint:disable:no-var-requires
|
|
94
|
-
|
|
95
|
-
(module.exports as any).findServersOnNetwork =
|
|
96
|
-
(module.exports as any).findServers =
|
|
94
|
+
import { withCallback } from "thenify-ex";
|
|
95
|
+
(module.exports as any).findServersOnNetwork = withCallback((module.exports as any).findServersOnNetwork);
|
|
96
|
+
(module.exports as any).findServers = withCallback((module.exports as any).findServers);
|
|
@@ -126,9 +126,9 @@ export function readHistoryServerCapabilities(
|
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
128
|
// tslint:disable:no-var-requires
|
|
129
|
-
|
|
129
|
+
import { withCallback } from "thenify-ex";
|
|
130
130
|
const opts = { multiArgs: false };
|
|
131
|
-
(module as any).exports.readHistoryServerCapabilities =
|
|
131
|
+
(module as any).exports.readHistoryServerCapabilities = withCallback(
|
|
132
132
|
(module as any).exports.readHistoryServerCapabilities,
|
|
133
133
|
opts
|
|
134
134
|
);
|