node-opcua-samples 2.52.0 → 2.56.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.
@@ -1,32 +1,32 @@
1
- const opcua = require("node-opcua");
2
-
3
-
4
- const yargs = require("yargs/yargs");
5
-
6
- const argv = yargs(process.argv)
7
- .wrap(132)
8
- .string("capabilities")
9
- .default("capabilities","DA")
10
- .alias("c","capabilities")
11
-
12
- .string("discoveryServerURI")
13
- .default("discoveryServerURI","opc.tcp://localhost:4840")
14
- .alias("d","discoveryServerURI")
15
-
16
- .help(true)
17
- .argv;
18
-
19
- const capabilities = argv.capabilities || "LDS";
20
-
21
- const discovery_server_endpointUrl = argv.discoveryServerURI || "opc.tcp://localhost:4840";
22
-
23
- opcua.findServersOnNetwork(discovery_server_endpointUrl, function (err, servers) {
24
- if(err) {
25
- console.log("Error : ", err.message);
26
- return;
27
- }
28
-
29
- for (const s of servers) {
30
- console.log(s.toString());
31
- }
32
- });
1
+ const opcua = require("node-opcua");
2
+
3
+
4
+ const yargs = require("yargs/yargs");
5
+
6
+ const argv = yargs(process.argv)
7
+ .wrap(132)
8
+ .string("capabilities")
9
+ .default("capabilities","DA")
10
+ .alias("c","capabilities")
11
+
12
+ .string("discoveryServerURI")
13
+ .default("discoveryServerURI","opc.tcp://localhost:4840")
14
+ .alias("d","discoveryServerURI")
15
+
16
+ .help(true)
17
+ .argv;
18
+
19
+ const capabilities = argv.capabilities || "LDS";
20
+
21
+ const discovery_server_endpointUrl = argv.discoveryServerURI || "opc.tcp://localhost:4840";
22
+
23
+ opcua.findServersOnNetwork(discovery_server_endpointUrl, function (err, servers) {
24
+ if(err) {
25
+ console.log("Error : ", err.message);
26
+ return;
27
+ }
28
+
29
+ for (const s of servers) {
30
+ console.log(s.toString());
31
+ }
32
+ });