node-opcua-client 2.139.0 → 2.141.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 +6 -6
- 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 +46 -46
- 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 +9 -9
- 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 +27 -27
- package/source/alarms_and_conditions/client_tools.ts +5 -5
- package/source/private/client_base_impl.ts +6 -6
- 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 +47 -52
- package/source/private/client_subscription_impl.ts +8 -8
- package/source/private/opcua_client_impl.ts +11 -11
- package/source/tools/findservers.ts +3 -3
- package/source/tools/read_history_server_capabilities.ts +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read_history_server_capabilities.js","sourceRoot":"","sources":["../../source/tools/read_history_server_capabilities.ts"],"names":[],"mappings":";;AAyBA,sEAqGC;AA9HD;;GAEG;AACH,yDAA2C;AAC3C,+DAAiD;AACjD,iEAAqD;AAErD,yDAA2C;AAE3C,uGAAwG;AAExG,uDAAoD;AAcpD,SAAgB,6BAA6B,CACzC,OAAsB,EACtB,QAAgF;IAEhF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BACd,OAAO,QAAQ,CAAC,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC;gBACjD,CAAC;gBAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;oBACzC,MAAM,QAAQ,GAAG,IAAA,mCAAgB,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;oBACjD,IAAI,CAAC,QAAQ,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,KAAgB,CAAC;gBACpD,CAAC;gBACD,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACzB,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC;AACD,iCAAiC;AACjC,
|
|
1
|
+
{"version":3,"file":"read_history_server_capabilities.js","sourceRoot":"","sources":["../../source/tools/read_history_server_capabilities.ts"],"names":[],"mappings":";;AAyBA,sEAqGC;AA9HD;;GAEG;AACH,yDAA2C;AAC3C,+DAAiD;AACjD,iEAAqD;AAErD,yDAA2C;AAE3C,uGAAwG;AAExG,uDAAoD;AAcpD,SAAgB,6BAA6B,CACzC,OAAsB,EACtB,QAAgF;IAEhF,IAAI,CAAC,QAAQ,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC;IACtC,CAAC;IACD,wCAAwC;IACxC,MAAM,UAAU,GAAe,IAAA,yDAAc,EAAC,gCAAS,CAAC,aAAa,EAAE,sDAAsD,CAAC,CAAC;IAE/H,OAAO,CAAC,mBAAmB,CAAC,UAAU,EAAE,CAAC,GAAiB,EAAE,MAAyB,EAAE,EAAE;QACrF,IAAI,GAAG,EAAE,CAAC;YACN,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC;QACzB,CAAC;QACD,0BAA0B;QAC1B,IAAI,CAAC,MAAM,EAAE,CAAC;YACV,OAAO,QAAQ,CAAC,IAAI,KAA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C,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC;AACD,iCAAiC;AACjC,2CAA0C;AAC1C,MAAM,IAAI,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;AACjC,MAAc,CAAC,OAAO,CAAC,6BAA6B,GAAG,IAAA,yBAAY,EAC/D,MAAc,CAAC,OAAO,CAAC,6BAA6B,EACrD,IAAI,CACP,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-opcua-client",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.141.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,13 +17,13 @@
|
|
|
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.141.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.141.0",
|
|
25
|
+
"node-opcua-client-dynamic-extension-object": "2.141.0",
|
|
26
|
+
"node-opcua-common": "2.141.0",
|
|
27
27
|
"node-opcua-constants": "2.139.0",
|
|
28
28
|
"node-opcua-crypto": "4.15.0",
|
|
29
29
|
"node-opcua-data-model": "2.139.0",
|
|
@@ -34,34 +34,34 @@
|
|
|
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": "4.
|
|
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": "4.18.0",
|
|
38
|
+
"node-opcua-pseudo-session": "2.141.0",
|
|
39
|
+
"node-opcua-schemas": "2.141.0",
|
|
40
|
+
"node-opcua-secure-channel": "2.141.0",
|
|
41
|
+
"node-opcua-service-browse": "2.141.0",
|
|
42
|
+
"node-opcua-service-call": "2.141.0",
|
|
43
|
+
"node-opcua-service-discovery": "2.141.0",
|
|
44
|
+
"node-opcua-service-endpoints": "2.141.0",
|
|
45
|
+
"node-opcua-service-filter": "2.141.0",
|
|
46
|
+
"node-opcua-service-history": "2.141.0",
|
|
47
|
+
"node-opcua-service-query": "2.141.0",
|
|
48
|
+
"node-opcua-service-read": "2.141.0",
|
|
49
|
+
"node-opcua-service-register-node": "2.141.0",
|
|
50
|
+
"node-opcua-service-secure-channel": "2.141.0",
|
|
51
|
+
"node-opcua-service-session": "2.141.0",
|
|
52
|
+
"node-opcua-service-subscription": "2.141.0",
|
|
53
|
+
"node-opcua-service-translate-browse-path": "2.141.0",
|
|
54
|
+
"node-opcua-service-write": "2.141.0",
|
|
55
55
|
"node-opcua-status-code": "2.139.0",
|
|
56
|
-
"node-opcua-types": "2.
|
|
56
|
+
"node-opcua-types": "2.141.0",
|
|
57
57
|
"node-opcua-utils": "2.139.0",
|
|
58
58
|
"node-opcua-variant": "2.139.0",
|
|
59
|
-
"thenify": "
|
|
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.141.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",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"internet of things"
|
|
89
89
|
],
|
|
90
90
|
"homepage": "http://node-opcua.github.io/",
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "7467e145ce9ebad2c80cabb096189bda7714083d",
|
|
92
92
|
"files": [
|
|
93
93
|
"dist",
|
|
94
94
|
"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);
|
|
@@ -1791,12 +1791,12 @@ class TmpClient extends ClientBaseImpl {
|
|
|
1791
1791
|
|
|
1792
1792
|
// tslint:disable:no-var-requires
|
|
1793
1793
|
// 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 =
|
|
1794
|
+
import { withCallback } from "thenify-ex";
|
|
1795
|
+
ClientBaseImpl.prototype.connect = withCallback(ClientBaseImpl.prototype.connect);
|
|
1796
|
+
ClientBaseImpl.prototype.disconnect = withCallback(ClientBaseImpl.prototype.disconnect);
|
|
1797
|
+
ClientBaseImpl.prototype.getEndpoints = withCallback(ClientBaseImpl.prototype.getEndpoints);
|
|
1798
|
+
ClientBaseImpl.prototype.findServers = withCallback(ClientBaseImpl.prototype.findServers);
|
|
1799
|
+
ClientBaseImpl.prototype.findServersOnNetwork = withCallback(ClientBaseImpl.prototype.findServersOnNetwork);
|
|
1800
1800
|
|
|
1801
1801
|
OPCUAClientBase.create = (options: OPCUAClientBaseOptions): OPCUAClientBase => {
|
|
1802
1802
|
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,
|
|
@@ -1208,9 +1208,11 @@ export class ClientSessionImpl extends EventEmitter implements ClientSession, Re
|
|
|
1208
1208
|
}
|
|
1209
1209
|
|
|
1210
1210
|
// perform ExtensionObject resolution
|
|
1211
|
-
|
|
1211
|
+
promoteOpaqueStructure(this, response.results!).then(() => {
|
|
1212
1212
|
response.results = response.results || /* istanbul ignore next */ [];
|
|
1213
|
-
|
|
1213
|
+
callback(null, isArray ? response.results : response.results[0]);
|
|
1214
|
+
}).catch((err) => {
|
|
1215
|
+
callback(err);
|
|
1214
1216
|
});
|
|
1215
1217
|
});
|
|
1216
1218
|
}
|
|
@@ -1708,8 +1710,10 @@ export class ClientSessionImpl extends EventEmitter implements ClientSession, Re
|
|
|
1708
1710
|
}
|
|
1709
1711
|
response.results = response.results || [];
|
|
1710
1712
|
|
|
1711
|
-
|
|
1713
|
+
promoteOpaqueStructureForCall(this, response.results).then(() => {
|
|
1712
1714
|
callback(null, isArray ? response.results : response.results![0]);
|
|
1715
|
+
}).catch((err) => {
|
|
1716
|
+
callback(err);
|
|
1713
1717
|
});
|
|
1714
1718
|
});
|
|
1715
1719
|
}
|
|
@@ -2145,13 +2149,7 @@ export class ClientSessionImpl extends EventEmitter implements ClientSession, Re
|
|
|
2145
2149
|
}
|
|
2146
2150
|
}
|
|
2147
2151
|
|
|
2148
|
-
|
|
2149
|
-
session: IBasicSessionAsync2,
|
|
2150
|
-
callMethodResults: CallMethodResult[],
|
|
2151
|
-
callback: ErrorCallback
|
|
2152
|
-
) => void;
|
|
2153
|
-
|
|
2154
|
-
async function promoteOpaqueStructure2(session: IBasicSessionAsync2, callMethodResult: CallMethodResult): Promise<void> {
|
|
2152
|
+
async function promoteOpaqueStructureForCallMethodResult(session: IBasicSessionAsync2, callMethodResult: CallMethodResult): Promise<void> {
|
|
2155
2153
|
if (!callMethodResult || !callMethodResult.outputArguments || callMethodResult.outputArguments.length === 0) {
|
|
2156
2154
|
return;
|
|
2157
2155
|
}
|
|
@@ -2173,61 +2171,58 @@ function countOpaqueStructures(callMethodResults: CallMethodResult[]): number {
|
|
|
2173
2171
|
}, 0);
|
|
2174
2172
|
return opaqueStructureCount;
|
|
2175
2173
|
}
|
|
2176
|
-
|
|
2174
|
+
|
|
2175
|
+
async function promoteOpaqueStructureForCall(session: IBasicSessionAsync2, callMethodResults: CallMethodResult[]): Promise<void> {
|
|
2177
2176
|
const opaqueStructureCount = countOpaqueStructures(callMethodResults);
|
|
2178
2177
|
if (0 === opaqueStructureCount) return;
|
|
2179
2178
|
|
|
2180
2179
|
// construct dataTypeManager if not already present
|
|
2181
2180
|
await getExtraDataTypeManager(session);
|
|
2182
2181
|
|
|
2183
|
-
const promises: Promise<void>[] = callMethodResults.map(async (x: CallMethodResult) =>
|
|
2182
|
+
const promises: Promise<void>[] = callMethodResults.map(async (x: CallMethodResult) => promoteOpaqueStructureForCallMethodResult(session, x));
|
|
2184
2183
|
await Promise.all(promises);
|
|
2185
2184
|
}
|
|
2186
2185
|
|
|
2187
2186
|
// tslint:disable:no-var-requires
|
|
2188
2187
|
// tslint:disable:max-line-length
|
|
2189
|
-
|
|
2188
|
+
import { withCallback } from "thenify-ex";
|
|
2190
2189
|
const opts = { multiArgs: false };
|
|
2191
2190
|
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
ClientSessionImpl.prototype.
|
|
2197
|
-
ClientSessionImpl.prototype.
|
|
2198
|
-
ClientSessionImpl.prototype.
|
|
2199
|
-
ClientSessionImpl.prototype.
|
|
2200
|
-
ClientSessionImpl.prototype.
|
|
2201
|
-
ClientSessionImpl.prototype.
|
|
2202
|
-
ClientSessionImpl.prototype.
|
|
2203
|
-
ClientSessionImpl.prototype.
|
|
2204
|
-
ClientSessionImpl.prototype.
|
|
2205
|
-
ClientSessionImpl.prototype.
|
|
2206
|
-
ClientSessionImpl.prototype.
|
|
2207
|
-
ClientSessionImpl.prototype.
|
|
2208
|
-
ClientSessionImpl.prototype.
|
|
2209
|
-
ClientSessionImpl.prototype.
|
|
2210
|
-
ClientSessionImpl.prototype.
|
|
2211
|
-
ClientSessionImpl.prototype.
|
|
2212
|
-
ClientSessionImpl.prototype.
|
|
2213
|
-
ClientSessionImpl.prototype.
|
|
2214
|
-
ClientSessionImpl.prototype.
|
|
2215
|
-
ClientSessionImpl.prototype.
|
|
2216
|
-
ClientSessionImpl.prototype.
|
|
2217
|
-
ClientSessionImpl.prototype.deleteMonitoredItems = thenify.withCallback(ClientSessionImpl.prototype.deleteMonitoredItems, opts);
|
|
2218
|
-
ClientSessionImpl.prototype.setPublishingMode = thenify.withCallback(ClientSessionImpl.prototype.setPublishingMode, opts);
|
|
2219
|
-
ClientSessionImpl.prototype.translateBrowsePath = thenify.withCallback(ClientSessionImpl.prototype.translateBrowsePath, opts);
|
|
2220
|
-
ClientSessionImpl.prototype.performMessageTransaction = thenify.withCallback(
|
|
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(
|
|
2221
2216
|
ClientSessionImpl.prototype.performMessageTransaction,
|
|
2222
2217
|
opts
|
|
2223
2218
|
);
|
|
2224
|
-
ClientSessionImpl.prototype.close =
|
|
2225
|
-
ClientSessionImpl.prototype.call =
|
|
2226
|
-
ClientSessionImpl.prototype.getMonitoredItems =
|
|
2227
|
-
ClientSessionImpl.prototype.getArgumentDefinition =
|
|
2228
|
-
ClientSessionImpl.prototype.queryFirst =
|
|
2229
|
-
ClientSessionImpl.prototype.registerNodes =
|
|
2230
|
-
ClientSessionImpl.prototype.unregisterNodes =
|
|
2231
|
-
ClientSessionImpl.prototype.readNamespaceArray =
|
|
2232
|
-
ClientSessionImpl.prototype.getBuiltInDataType =
|
|
2233
|
-
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);
|
|
@@ -518,7 +518,7 @@ export class OPCUAClientImpl extends ClientBaseImpl implements OPCUAClient {
|
|
|
518
518
|
public changeSessionIdentity(session: ClientSession, userIdentityInfo: UserIdentityInfo, callback: CallbackT<StatusCode>): void;
|
|
519
519
|
public changeSessionIdentity(...args: any[]): any {
|
|
520
520
|
warningLog(
|
|
521
|
-
"[NODE-OPCUA-
|
|
521
|
+
"[NODE-OPCUA-W34] OPCUAClient.changeSessionIdentity(session,userIdentity) is deprecated use ClientSession.changeUser(userIdentity) instead"
|
|
522
522
|
);
|
|
523
523
|
const session = args[0] as ClientSessionImpl;
|
|
524
524
|
const userIdentityInfo = args[1] as UserIdentityInfo;
|
|
@@ -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
|
}
|
|
@@ -612,12 +612,12 @@ export class OPCUAClientImpl extends ClientBaseImpl implements OPCUAClient {
|
|
|
612
612
|
const endpointUrl: string = typeof connectionPoint === "string" ? connectionPoint : connectionPoint.endpointUrl;
|
|
613
613
|
const userIdentity: UserIdentityInfo =
|
|
614
614
|
typeof connectionPoint === "string" ? { type: UserTokenType.Anonymous } : connectionPoint.userIdentity;
|
|
615
|
-
|
|
616
|
-
await this.connect(endpointUrl);
|
|
617
|
-
|
|
615
|
+
|
|
618
616
|
this.on("backoff", (count, delay) => {
|
|
619
617
|
warningLog("cannot connect to ", endpointUrl, "attempt #" + count, " retrying in ", delay);
|
|
620
618
|
});
|
|
619
|
+
|
|
620
|
+
await this.connect(endpointUrl);
|
|
621
621
|
|
|
622
622
|
try {
|
|
623
623
|
const session = await this.createSession2(userIdentity);
|
|
@@ -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
|
);
|