node-opcua-samples 2.102.0 → 2.103.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/bin/interactive_client.js +10 -18
- package/package.json +10 -8
|
@@ -7,34 +7,26 @@ const util = require("util");
|
|
|
7
7
|
const fs = require("fs");
|
|
8
8
|
const path = require("path");
|
|
9
9
|
const os = require("os");
|
|
10
|
+
const readline = require("node:readline");
|
|
10
11
|
const chalk = require("chalk");
|
|
11
12
|
const treeify = require("treeify");
|
|
12
13
|
const { sprintf } = require("sprintf-js");
|
|
14
|
+
|
|
13
15
|
const _ = require("underscore");
|
|
14
16
|
|
|
15
|
-
const {
|
|
16
|
-
DataType,
|
|
17
|
-
OPCUAClient,
|
|
18
|
-
version,
|
|
19
|
-
makeNodeId,
|
|
20
|
-
coerceNodeId,
|
|
21
|
-
ObjectIds,
|
|
22
|
-
analyze_object_binary_encoding,
|
|
23
|
-
StatusCodes,
|
|
24
|
-
parseEndpointUrl
|
|
25
|
-
} = require("node-opcua");
|
|
26
|
-
const { NodeCrawler } = require("node-opcua-client-crawler");
|
|
17
|
+
const { DataType, OPCUAClient, makeNodeId, coerceNodeId, ObjectIds, StatusCodes, parseEndpointUrl } = require("node-opcua");
|
|
27
18
|
const { UAProxyManager } = require("node-opcua-client-proxy");
|
|
19
|
+
const { analyze_object_binary_encoding } = require("node-opcua-packet-analyzer");
|
|
20
|
+
const { NodeCrawler } = require("node-opcua-client-crawler");
|
|
28
21
|
const utils = require("node-opcua-utils");
|
|
29
22
|
const { assert } = require("node-opcua-assert");
|
|
30
23
|
|
|
31
|
-
console.log(" Version ", version);
|
|
32
|
-
|
|
33
24
|
const sessionTimeout = 2 * 60 * 1000; // 2 minutes
|
|
34
25
|
|
|
35
26
|
const client = OPCUAClient.create({
|
|
36
27
|
requestedSessionTimeout: sessionTimeout,
|
|
37
|
-
keepSessionAlive: true
|
|
28
|
+
keepSessionAlive: true,
|
|
29
|
+
keepAliveInterval: 10000
|
|
38
30
|
});
|
|
39
31
|
|
|
40
32
|
let the_session = null;
|
|
@@ -309,7 +301,7 @@ if (rl.history) {
|
|
|
309
301
|
}
|
|
310
302
|
|
|
311
303
|
process.on("uncaughtException", function (e) {
|
|
312
|
-
|
|
304
|
+
log(chalk.red(e.stack));
|
|
313
305
|
rl.prompt();
|
|
314
306
|
});
|
|
315
307
|
|
|
@@ -393,7 +385,7 @@ function open_session(callback) {
|
|
|
393
385
|
return callback();
|
|
394
386
|
} else {
|
|
395
387
|
client.requestedSessionTimeout = sessionTimeout;
|
|
396
|
-
client.createSession(
|
|
388
|
+
client.createSession((err, session) => {
|
|
397
389
|
if (err) {
|
|
398
390
|
log(chalk.red("Error : "), err);
|
|
399
391
|
} else {
|
|
@@ -468,7 +460,7 @@ function process_line(line) {
|
|
|
468
460
|
const port = p.port;
|
|
469
461
|
log(" open url : ", endpointUrl);
|
|
470
462
|
log(" hostname : ", chalk.yellow(hostname || "<null>"));
|
|
471
|
-
log(" port : ", chalk.yellow(port
|
|
463
|
+
log(" port : ", chalk.yellow(port));
|
|
472
464
|
|
|
473
465
|
apply_command(cmd, function (callback) {
|
|
474
466
|
client.connect(endpointUrl, function (err) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-opcua-samples",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.103.0",
|
|
4
4
|
"description": "pure nodejs OPCUA SDK - module samples",
|
|
5
5
|
"bin": {
|
|
6
6
|
"simple_client": "./dist/simple_client_ts.js",
|
|
@@ -22,16 +22,18 @@
|
|
|
22
22
|
"easy-table": "^1.2.0",
|
|
23
23
|
"env-paths": "2.2.1",
|
|
24
24
|
"exit": "^0.1.2",
|
|
25
|
-
"node-opcua": "2.
|
|
26
|
-
"node-opcua-address-space": "2.
|
|
27
|
-
"node-opcua-address-space-for-conformance-testing": "2.
|
|
25
|
+
"node-opcua": "2.103.0",
|
|
26
|
+
"node-opcua-address-space": "2.103.0",
|
|
27
|
+
"node-opcua-address-space-for-conformance-testing": "2.103.0",
|
|
28
28
|
"node-opcua-assert": "2.98.1",
|
|
29
|
-
"node-opcua-client-crawler": "2.
|
|
29
|
+
"node-opcua-client-crawler": "2.103.0",
|
|
30
|
+
"node-opcua-client-proxy": "2.103.0",
|
|
30
31
|
"node-opcua-crypto": "^2.1.2",
|
|
32
|
+
"node-opcua-packet-analyzer": "2.102.0",
|
|
31
33
|
"node-opcua-pki": "^3.0.2",
|
|
32
|
-
"node-opcua-server-configuration": "2.
|
|
34
|
+
"node-opcua-server-configuration": "2.103.0",
|
|
33
35
|
"node-opcua-utils": "2.98.1",
|
|
34
|
-
"node-opcua-vendor-diagnostic": "2.
|
|
36
|
+
"node-opcua-vendor-diagnostic": "2.103.0",
|
|
35
37
|
"sprintf-js": "^1.1.2",
|
|
36
38
|
"treeify": "^1.1.0",
|
|
37
39
|
"underscore": "^1.13.6",
|
|
@@ -52,7 +54,7 @@
|
|
|
52
54
|
"internet of things"
|
|
53
55
|
],
|
|
54
56
|
"homepage": "http://node-opcua.github.io/",
|
|
55
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "e206cac2daf39bd07e5ac6cbd744f966bb54759e",
|
|
56
58
|
"files": [
|
|
57
59
|
"dist"
|
|
58
60
|
]
|