You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by na...@apache.org on 2019/12/05 15:55:09 UTC
[plc4x] branch PLC4X-157OPC-UADisablediscovery updated: [fix]
removed start of the own OPC test server
This is an automated email from the ASF dual-hosted git repository.
nalim2 pushed a commit to branch PLC4X-157OPC-UADisablediscovery
in repository https://gitbox.apache.org/repos/asf/plc4x.git
The following commit(s) were added to refs/heads/PLC4X-157OPC-UADisablediscovery by this push:
new 77c0b4b [fix] removed start of the own OPC test server
77c0b4b is described below
commit 77c0b4bd45d52a310b9b873a9e0159791b6ba897
Author: Matthias Milan Strljic <Ma...@gmail.com>
AuthorDate: Thu Dec 5 16:50:22 2019 +0100
[fix] removed start of the own OPC test server
Signed-off-by: Matthias Strljic <ma...@isw.uni-stuttgart.de>
---
.../apache/plc4x/java/opcua/ManualPLC4XOpcua.java | 50 ----------------------
1 file changed, 50 deletions(-)
diff --git a/plc4j/drivers/opcua/src/test/java/org/apache/plc4x/java/opcua/ManualPLC4XOpcua.java b/plc4j/drivers/opcua/src/test/java/org/apache/plc4x/java/opcua/ManualPLC4XOpcua.java
index 748eb5a..6258a22 100644
--- a/plc4j/drivers/opcua/src/test/java/org/apache/plc4x/java/opcua/ManualPLC4XOpcua.java
+++ b/plc4j/drivers/opcua/src/test/java/org/apache/plc4x/java/opcua/ManualPLC4XOpcua.java
@@ -69,53 +69,7 @@ public class ManualPLC4XOpcua {
private static final String UINTEGER_IDENTIFIER = "ns=2;i=10870";
private static final String DOES_NOT_EXIST_IDENTIFIER = "ns=2;i=12512623";
-
- public static void ExampleServerTest(String args[]) {
-
-
- }
-
public static void main(String args[]) {
- /*
- ExampleServer server = null;
- try {
- server = new ExampleServer();
- server.startup().get();
-
- final CompletableFuture<Void> future = new CompletableFuture<>();
-
- Runtime.getRuntime().addShutdownHook(new Thread(() -> future.complete(null)));
-
- future.get();
- server.shutdown().get();
- } catch (Exception e) {
- e.printStackTrace();
- }
-
- // 1 Client 1x
- int errorCount1C = 0;
- long time1X = -1;
- try {
- time1X = GetConnectionTime("opcua:tcp://opcua.demo-this.com:51210/UA/SampleServer");
- } catch (Exception e) {
- errorCount1C++;
- }
- System.out.printf("Die ConnectionsTime beträgt %s und hatte %s Fehler", time1X + "", errorCount1C + "");
-
- List<Integer> Time1CN = new LinkedList<>();
- List<Encapsulater> Connections = new LinkedList<>();
- int NumberClients = 70;
- for(int counter = 0; counter < NumberClients; counter++){
- Encapsulater newElement = new Encapsulater();
- newElement.connectionString = "opcua:tcp://opcua.demo-this.com:51210/UA/SampleServer";
- Connections.add(newElement);
- }
-
- double resultOfN = Connections.parallelStream().mapToLong(Encapsulater::GetConnectionTime).min().getAsLong();
- System.out.printf("Die ConnectionsTime beträgt %s ", resultOfN + "");
-
- /*
- */
OpcuaTcpPlcConnection opcuaConnection = null;
OpcuaPlcFieldHandler fieldH = new OpcuaPlcFieldHandler();
PlcField field = fieldH.createField("ns=2;i=10855");
@@ -188,10 +142,6 @@ public class ManualPLC4XOpcua {
Thread.sleep(20000);
opcuaConnection.close();
-
- // Test Connection 1 Client 1x
-
-
} catch (Exception e) {
e.printStackTrace();
}