You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2019/12/18 22:42:03 UTC

[plc4x] branch next-gen-core updated: - Made the examples work again.

This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch next-gen-core
in repository https://gitbox.apache.org/repos/asf/plc4x.git


The following commit(s) were added to refs/heads/next-gen-core by this push:
     new 9385756  - Made the examples work again.
9385756 is described below

commit 938575632a9c650f347aa494472c1f6e9e1cb1bd
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Wed Dec 18 23:41:50 2019 +0100

    - Made the examples work again.
---
 .../java/abeth/connection/AbEthPlcConnection.java    |  2 +-
 .../plc4x/java/s7/connection/S7PlcConnection.java    |  2 +-
 plc4j/examples/dummy-driver/pom.xml                  |  5 +++++
 .../dummydriver/connection/DummyConnection.java      |  2 +-
 plc4j/examples/pom.xml                               | 20 ++++++++++----------
 .../amsads/connection/AdsSerialPlcConnection.java    |  2 +-
 .../java/amsads/connection/AdsTcpPlcConnection.java  |  2 +-
 .../connection/PassiveBacNetIpPlcConnection.java     |  2 +-
 .../java/df1/connection/SerialDf1Connection.java     |  2 +-
 .../connection/PassiveKnxNetIpPlcConnection.java     |  2 +-
 .../java/knxnetip/connection/KnxNetIpConnection.java |  2 +-
 .../s7/connection/PassiveS7PlcConnection.java        |  2 +-
 .../java/s7/readwrite/connection/S7Connection.java   |  2 +-
 13 files changed, 26 insertions(+), 21 deletions(-)

diff --git a/plc4j/drivers/ab-eth/src/main/java/org/apache/plc4x/java/abeth/connection/AbEthPlcConnection.java b/plc4j/drivers/ab-eth/src/main/java/org/apache/plc4x/java/abeth/connection/AbEthPlcConnection.java
index 052ca8a..ebc3041 100644
--- a/plc4j/drivers/ab-eth/src/main/java/org/apache/plc4x/java/abeth/connection/AbEthPlcConnection.java
+++ b/plc4j/drivers/ab-eth/src/main/java/org/apache/plc4x/java/abeth/connection/AbEthPlcConnection.java
@@ -91,7 +91,7 @@ public class AbEthPlcConnection extends NettyPlcConnection implements PlcReader
 
     @Override
     protected ChannelHandler getChannelHandler(CompletableFuture<Void> sessionSetupCompleteFuture) {
-        return new ChannelInitializer() {
+        return new ChannelInitializer<Channel>() {
             @Override
             protected void initChannel(Channel channel) {
                 // Build the protocol stack for communicating with the s7 protocol.
diff --git a/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/connection/S7PlcConnection.java b/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/connection/S7PlcConnection.java
index e26fbf8..6823231 100644
--- a/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/connection/S7PlcConnection.java
+++ b/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/connection/S7PlcConnection.java
@@ -172,7 +172,7 @@ public class S7PlcConnection extends NettyPlcConnection implements PlcReader, Pl
         short calledTsapId = S7TsapIdEncoder.encodeS7TsapId(DeviceGroup.OS, 0, 0);
         short callingTsapId = S7TsapIdEncoder.encodeS7TsapId(DeviceGroup.PG_OR_PC, rack, slot);
 
-        return new ChannelInitializer() {
+        return new ChannelInitializer<Channel>() {
             @Override
             protected void initChannel(Channel channel) {
                 // Build the protocol stack for communicating with the s7 protocol.
diff --git a/plc4j/examples/dummy-driver/pom.xml b/plc4j/examples/dummy-driver/pom.xml
index e10638b..b00902c 100644
--- a/plc4j/examples/dummy-driver/pom.xml
+++ b/plc4j/examples/dummy-driver/pom.xml
@@ -40,6 +40,11 @@
       <artifactId>plc4j-api</artifactId>
       <version>0.6.0-SNAPSHOT</version>
     </dependency>
+    <dependency>
+      <groupId>org.apache.plc4x</groupId>
+      <artifactId>plc4j-spi</artifactId>
+      <version>0.6.0-SNAPSHOT</version>
+    </dependency>
 
     <dependency>
       <groupId>org.apache.plc4x</groupId>
diff --git a/plc4j/examples/dummy-driver/src/main/java/org/apache/plc4x/java/examples/dummydriver/connection/DummyConnection.java b/plc4j/examples/dummy-driver/src/main/java/org/apache/plc4x/java/examples/dummydriver/connection/DummyConnection.java
index a4c0bc6..da3715a 100644
--- a/plc4j/examples/dummy-driver/src/main/java/org/apache/plc4x/java/examples/dummydriver/connection/DummyConnection.java
+++ b/plc4j/examples/dummy-driver/src/main/java/org/apache/plc4x/java/examples/dummydriver/connection/DummyConnection.java
@@ -54,7 +54,7 @@ public class DummyConnection extends NettyPlcConnection implements PlcReader, Pl
 
     @Override
     protected ChannelHandler getChannelHandler(CompletableFuture<Void> sessionSetupCompleteFuture) {
-        return new ChannelInitializer() {
+        return new ChannelInitializer<Channel>() {
             @Override
             protected void initChannel(Channel channel) {
             }
diff --git a/plc4j/examples/pom.xml b/plc4j/examples/pom.xml
index d795bfe..020bf79 100644
--- a/plc4j/examples/pom.xml
+++ b/plc4j/examples/pom.xml
@@ -39,17 +39,17 @@
   </properties>
 
   <modules>
-<!--    <module>dummy-driver</module>-->
-<!--    <module>hello-cloud-azure</module>-->
-<!--    <module>hello-cloud-google</module>-->
-<!--    <module>hello-connectivity-kafka</module>-->
-<!--    <module>hello-connectivity-mqtt</module>-->
-<!--    <module>hello-integration-edgent</module>-->
-<!--    <module>hello-opm</module>-->
-<!--    <module>hello-storage-elasticsearch</module>-->
-<!--    <module>hello-webapp</module>-->
+    <module>dummy-driver</module>
+    <module>hello-cloud-azure</module>
+    <module>hello-cloud-google</module>
+    <module>hello-connectivity-kafka</module>
+    <module>hello-connectivity-mqtt</module>
+    <module>hello-integration-edgent</module>
+    <module>hello-opm</module>
+    <module>hello-storage-elasticsearch</module>
+    <module>hello-webapp</module>
     <module>hello-world-plc4x</module>
-<!--    <module>hello-integration-iotdb</module>-->
+    <module>hello-integration-iotdb</module>
   </modules>
 
   <build>
diff --git a/sandbox/test-java-amsads-driver/src/main/java/org/apache/plc4x/java/amsads/connection/AdsSerialPlcConnection.java b/sandbox/test-java-amsads-driver/src/main/java/org/apache/plc4x/java/amsads/connection/AdsSerialPlcConnection.java
index d2cfbf8..8eba3fc 100644
--- a/sandbox/test-java-amsads-driver/src/main/java/org/apache/plc4x/java/amsads/connection/AdsSerialPlcConnection.java
+++ b/sandbox/test-java-amsads-driver/src/main/java/org/apache/plc4x/java/amsads/connection/AdsSerialPlcConnection.java
@@ -51,7 +51,7 @@ public class AdsSerialPlcConnection extends AdsAbstractPlcConnection {
 
     @Override
     protected ChannelHandler getChannelHandler(CompletableFuture<Void> sessionSetupCompleteFuture) {
-        return new ChannelInitializer() {
+        return new ChannelInitializer<Channel>() {
             @Override
             protected void initChannel(Channel channel) {
                 // Build the protocol stack for communicating with the ads protocol.
diff --git a/sandbox/test-java-amsads-driver/src/main/java/org/apache/plc4x/java/amsads/connection/AdsTcpPlcConnection.java b/sandbox/test-java-amsads-driver/src/main/java/org/apache/plc4x/java/amsads/connection/AdsTcpPlcConnection.java
index 3c2d1e9..b8333b7 100644
--- a/sandbox/test-java-amsads-driver/src/main/java/org/apache/plc4x/java/amsads/connection/AdsTcpPlcConnection.java
+++ b/sandbox/test-java-amsads-driver/src/main/java/org/apache/plc4x/java/amsads/connection/AdsTcpPlcConnection.java
@@ -110,7 +110,7 @@ public class AdsTcpPlcConnection extends AdsAbstractPlcConnection implements Plc
 
     @Override
     protected ChannelHandler getChannelHandler(CompletableFuture<Void> sessionSetupCompleteFuture) {
-        return new ChannelInitializer() {
+        return new ChannelInitializer<Channel>() {
             @Override
             protected void initChannel(Channel channel) {
                 // Build the protocol stack for communicating with the ads protocol.
diff --git a/sandbox/test-java-bacnetip-driver/src/main/java/org/apache/plc4x/java/bacnetip/connection/PassiveBacNetIpPlcConnection.java b/sandbox/test-java-bacnetip-driver/src/main/java/org/apache/plc4x/java/bacnetip/connection/PassiveBacNetIpPlcConnection.java
index 01b9f1b..d2fc530 100644
--- a/sandbox/test-java-bacnetip-driver/src/main/java/org/apache/plc4x/java/bacnetip/connection/PassiveBacNetIpPlcConnection.java
+++ b/sandbox/test-java-bacnetip-driver/src/main/java/org/apache/plc4x/java/bacnetip/connection/PassiveBacNetIpPlcConnection.java
@@ -67,7 +67,7 @@ public class PassiveBacNetIpPlcConnection extends NettyPlcConnection implements
 
     @Override
     protected ChannelHandler getChannelHandler(CompletableFuture<Void> sessionSetupCompleteFuture) {
-        return new ChannelInitializer() {
+        return new ChannelInitializer<Channel>() {
             @Override
             protected void initChannel(Channel channel) {
                 // Build the protocol stack for communicating with the s7 protocol.
diff --git a/sandbox/test-java-df1-driver/src/main/java/org/apache/plc4x/java/df1/connection/SerialDf1Connection.java b/sandbox/test-java-df1-driver/src/main/java/org/apache/plc4x/java/df1/connection/SerialDf1Connection.java
index c17b5ee..0adce40 100644
--- a/sandbox/test-java-df1-driver/src/main/java/org/apache/plc4x/java/df1/connection/SerialDf1Connection.java
+++ b/sandbox/test-java-df1-driver/src/main/java/org/apache/plc4x/java/df1/connection/SerialDf1Connection.java
@@ -86,7 +86,7 @@ public class SerialDf1Connection extends BaseDf1Connection implements PlcReader,
 
     @Override
     protected ChannelHandler getChannelHandler(CompletableFuture<Void> sessionSetupCompleteFuture) {
-        return new ChannelInitializer() {
+        return new ChannelInitializer<Channel>() {
             @Override
             protected void initChannel(Channel channel) {
                 // Build the protocol stack for communicating with the s7 protocol.
diff --git a/sandbox/test-java-knxnetip-driver-passive/src/main/java/org/apache/plc4x/java/passive/knxnetip/connection/PassiveKnxNetIpPlcConnection.java b/sandbox/test-java-knxnetip-driver-passive/src/main/java/org/apache/plc4x/java/passive/knxnetip/connection/PassiveKnxNetIpPlcConnection.java
index b07c396..b94ff6a 100644
--- a/sandbox/test-java-knxnetip-driver-passive/src/main/java/org/apache/plc4x/java/passive/knxnetip/connection/PassiveKnxNetIpPlcConnection.java
+++ b/sandbox/test-java-knxnetip-driver-passive/src/main/java/org/apache/plc4x/java/passive/knxnetip/connection/PassiveKnxNetIpPlcConnection.java
@@ -67,7 +67,7 @@ public class PassiveKnxNetIpPlcConnection extends NettyPlcConnection implements
 
     @Override
     protected ChannelHandler getChannelHandler(CompletableFuture<Void> sessionSetupCompleteFuture) {
-        return new ChannelInitializer() {
+        return new ChannelInitializer<Channel>() {
             @Override
             protected void initChannel(Channel channel) {
                 // Build the protocol stack for communicating with the s7 protocol.
diff --git a/sandbox/test-java-knxnetip-driver/src/main/java/org/apache/plc4x/java/knxnetip/connection/KnxNetIpConnection.java b/sandbox/test-java-knxnetip-driver/src/main/java/org/apache/plc4x/java/knxnetip/connection/KnxNetIpConnection.java
index b87dd60..827fd46 100644
--- a/sandbox/test-java-knxnetip-driver/src/main/java/org/apache/plc4x/java/knxnetip/connection/KnxNetIpConnection.java
+++ b/sandbox/test-java-knxnetip-driver/src/main/java/org/apache/plc4x/java/knxnetip/connection/KnxNetIpConnection.java
@@ -69,7 +69,7 @@ public class KnxNetIpConnection extends NettyPlcConnection implements PlcReader
 
     @Override
     protected ChannelHandler getChannelHandler(CompletableFuture<Void> sessionSetupCompleteFuture) {
-        return new ChannelInitializer() {
+        return new ChannelInitializer<Channel>() {
             @Override
             protected void initChannel(Channel channel) {
                 // Build the protocol stack for communicating with the s7 protocol.
diff --git a/sandbox/test-java-s7-driver-passive/src/main/java/org/apache/plc4x/javapassive/s7/connection/PassiveS7PlcConnection.java b/sandbox/test-java-s7-driver-passive/src/main/java/org/apache/plc4x/javapassive/s7/connection/PassiveS7PlcConnection.java
index 94a835d..f662f09 100644
--- a/sandbox/test-java-s7-driver-passive/src/main/java/org/apache/plc4x/javapassive/s7/connection/PassiveS7PlcConnection.java
+++ b/sandbox/test-java-s7-driver-passive/src/main/java/org/apache/plc4x/javapassive/s7/connection/PassiveS7PlcConnection.java
@@ -50,7 +50,7 @@ public class PassiveS7PlcConnection extends NettyPlcConnection implements PlcRea
 
     @Override
     protected ChannelHandler getChannelHandler(CompletableFuture<Void> sessionSetupCompleteFuture) {
-        return new ChannelInitializer() {
+        return new ChannelInitializer<Channel>() {
             @Override
             protected void initChannel(Channel channel) {
                 // Build the protocol stack for communicating with the s7 protocol.
diff --git a/sandbox/test-java-s7-driver/src/main/java/org/apache/plc4x/java/s7/readwrite/connection/S7Connection.java b/sandbox/test-java-s7-driver/src/main/java/org/apache/plc4x/java/s7/readwrite/connection/S7Connection.java
index bf983e0..7677342 100644
--- a/sandbox/test-java-s7-driver/src/main/java/org/apache/plc4x/java/s7/readwrite/connection/S7Connection.java
+++ b/sandbox/test-java-s7-driver/src/main/java/org/apache/plc4x/java/s7/readwrite/connection/S7Connection.java
@@ -149,7 +149,7 @@ public class S7Connection extends NettyPlcConnection implements PlcReader, PlcWr
         short calledTsapId = S7TsapIdEncoder.encodeS7TsapId(DeviceGroup.OS, 0, 0);
         short callingTsapId = S7TsapIdEncoder.encodeS7TsapId(DeviceGroup.PG_OR_PC, rack, slot);
 
-        return new ChannelInitializer() {
+        return new ChannelInitializer<Channel>() {
             @Override
             protected void initChannel(Channel channel) {
                 // Build the protocol stack for communicating with the s7 protocol.