node-opcua-samples 2.68.1 → 2.69.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/opcua_interceptor.js +6 -6
- package/package.json +5 -5
package/bin/opcua_interceptor.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/* eslint no-process-exit: 0 */
|
|
2
2
|
"use strict";
|
|
3
|
-
const argv = require("yargs")
|
|
4
|
-
.usage("Usage: $0 --portServer [num] --port [num] --hostname <hostname> -block")
|
|
5
|
-
.argv;
|
|
6
3
|
const net = require("net");
|
|
7
4
|
|
|
5
|
+
const chalk = require("chalk");
|
|
8
6
|
|
|
7
|
+
const argv = require("yargs")
|
|
8
|
+
.usage("Usage: $0 --portServer [num] --port [num] --hostname <hostname> -block")
|
|
9
|
+
.argv;
|
|
9
10
|
|
|
10
11
|
const opcua = require("node-opcua");
|
|
11
12
|
|
|
@@ -18,8 +19,6 @@ const messageHeaderToString = require("../lib/misc/message_header").messageHeade
|
|
|
18
19
|
|
|
19
20
|
const s = require("../lib/datamodel/structures");
|
|
20
21
|
|
|
21
|
-
const chalk = require("chalk");
|
|
22
|
-
|
|
23
22
|
const remote_port = parseInt(argv.port, 10) || 4841;
|
|
24
23
|
const hostname = argv.hostname || "localhost";
|
|
25
24
|
|
|
@@ -42,7 +41,7 @@ TrafficAnalyser.prototype.add = function (data) {
|
|
|
42
41
|
|
|
43
42
|
if (messageHeader.msgType === "ERR") {
|
|
44
43
|
|
|
45
|
-
|
|
44
|
+
const err = new s.TCPErrorMessage();
|
|
46
45
|
err.decode(stream);
|
|
47
46
|
console.log(" Error 0x" + err.statusCode.toString() + " reason:" + err.reason);
|
|
48
47
|
console.log(hexDump(data));
|
|
@@ -112,6 +111,7 @@ require("net").createServer(function (socket) {
|
|
|
112
111
|
try {
|
|
113
112
|
socket.write(data);
|
|
114
113
|
} catch (err) {
|
|
114
|
+
/** */
|
|
115
115
|
}
|
|
116
116
|
});
|
|
117
117
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-opcua-samples",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.69.0",
|
|
4
4
|
"description": "pure nodejs OPCUA SDK - module -samples",
|
|
5
5
|
"bin": {
|
|
6
6
|
"simple_client": "./dist/simple_client_ts.js",
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
"@types/yargs": "17.0.10",
|
|
21
21
|
"easy-table": "^1.2.0",
|
|
22
22
|
"exit": "^0.1.2",
|
|
23
|
-
"node-opcua": "2.
|
|
23
|
+
"node-opcua": "2.69.0",
|
|
24
24
|
"node-opcua-assert": "2.66.0",
|
|
25
25
|
"node-opcua-pki": "^2.15.4",
|
|
26
|
-
"node-opcua-server-configuration": "2.
|
|
26
|
+
"node-opcua-server-configuration": "2.69.0",
|
|
27
27
|
"sprintf-js": "^1.1.2",
|
|
28
28
|
"treeify": "^1.1.0",
|
|
29
|
-
"underscore": "^1.13.
|
|
29
|
+
"underscore": "^1.13.3",
|
|
30
30
|
"yargs": "15.4.1"
|
|
31
31
|
},
|
|
32
32
|
"author": "Etienne Rossignon",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"internet of things"
|
|
45
45
|
],
|
|
46
46
|
"homepage": "http://node-opcua.github.io/",
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "6c88d05e8c82ce4bc9c8af9f0a8eb6136f31d2ce"
|
|
48
48
|
}
|