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 2018/08/23 09:29:17 UTC

[incubator-plc4x] branch master updated (9c820f7 -> 23f05c8)

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

cdutz pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git.


    from 9c820f7  [ALL] added new PlcInvalidAddress to indicate an invalid address
     add 735431e  PLC4X-38 - Implement the Ethernet/IP Protocol
     add 44627a3  PLC4X-38 - Implement the Ethernet/IP Protocol
     add a372307  Merge branches 'feature/ethernet-ip' and 'master' of https://gitbox.apache.org/repos/asf/incubator-plc4x into feature/ethernet-ip
     add 5f3bf64  Merge branches 'feature/ethernet-ip' and 'master' of https://gitbox.apache.org/repos/asf/incubator-plc4x into feature/ethernet-ip
     add e035944  Added the repo for the enip snapshots
     add 428b144  Added the EnipClient class from the enip projects client module
     add 9a299c8  Added missing dependency
     new 0bc1f0d  Merge branches 'feature/ethernet-ip' and 'master' of https://gitbox.apache.org/repos/asf/incubator-plc4x into feature/ethernet-ip
     new 73fe5e9  Merge branches 'feature/ethernet-ip' and 'master' of https://gitbox.apache.org/repos/asf/incubator-plc4x into feature/ethernet-ip
     new 66ff504  Changed the scope of the core module
     new 8e6af2d  Merge branch 'master' of https://gitbox.apache.org/repos/asf/incubator-plc4x into feature/ethernet-ip
     new 44860d9  Updated the code after moving the PlcRequestContainer to another package
     new ffd8d81  Further work on the EtherNet/IP implementation.
     new 8bec538  Adjusted the poc to latest changes in the enip driver
     new 992f707  Updated the ethernetip driver to a new version
     new 5dad848  Removed the maven version check as it was reported by the build itself not being intended for this sort of check
     new 1f60789  First working version of a driver able to read values via EtherNet/IP
     new 7fab974  Merge branches 'feature/ethernet-ip' and 'master' of https://gitbox.apache.org/repos/asf/incubator-plc4x into feature/ethernet-ip
     new bd550d7  Merge branches 'feature/ethernet-ip' and 'master' of https://gitbox.apache.org/repos/asf/incubator-plc4x into feature/ethernet-ip
     new 4021fb8  Merge branch 'master' of https://gitbox.apache.org/repos/asf/incubator-plc4x into feature/ethernet-ip
     new 502e1b2  Merge branch 'master' of https://gitbox.apache.org/repos/asf/incubator-plc4x into feature/ethernet-ip
     new 23f05c8  - Renamed PlcInvalidAddress to PlcInvalidAddressException - Refactored the code for parsing addresses in the EtherNet/IP driver

The 15 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../plc4x/java/api/connection/PlcConnection.java   |   6 +-
 ...ddress.java => PlcInvalidAddressException.java} |  26 +-
 plc4j/protocols/{modbus => ethernetip}/pom.xml     |  77 ++--
 .../java/ethernetip/EtherNetIpPlcDriver.java}      |  44 +-
 .../connection/BaseEtherNetIpPlcConnection.java    |  57 +--
 .../connection/EtherNetIpTcpPlcConnection.java     |  83 ++++
 .../java/ethernetip/model/EtherNetIpAddress.java   | 102 +++++
 .../plc4x/java/ethernetip/netty/EnipCodec.java     |  58 +++
 .../ethernetip/netty/Plc4XEtherNetIpProtocol.java  | 488 +++++++++++++++++++++
 .../netty/events/EtherNetIpConnectedEvent.java}    |   4 +-
 .../services/org.apache.plc4x.java.api.PlcDriver   |   2 +-
 .../ethernetip/src/site/asciidoc/index.adoc        |  80 ++++
 .../src/site/resources/img/WAGO_enip_exporer.png   | Bin 0 -> 293168 bytes
 .../org/apache/plc4x/java/ethernetip/EnipTest.java |  67 +++
 .../java/ethernetip/ManualPlc4XEtherNetIpTest.java |  64 +++
 .../src/test/resources/read-attribute.pcapng       | Bin 0 -> 664 bytes
 plc4j/protocols/pom.xml                            |   1 +
 .../plc4x/java/s7/connection/S7PlcConnection.java  |   6 +-
 pom.xml                                            |  19 +-
 19 files changed, 1051 insertions(+), 133 deletions(-)
 rename plc4j/api/src/main/java/org/apache/plc4x/java/api/exceptions/{PlcInvalidAddress.java => PlcInvalidAddressException.java} (62%)
 copy plc4j/protocols/{modbus => ethernetip}/pom.xml (70%)
 copy plc4j/protocols/{s7/src/main/java/org/apache/plc4x/java/s7/S7PlcDriver.java => ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/EtherNetIpPlcDriver.java} (58%)
 copy examples/dummy-driver/src/main/java/org/apache/plc4x/java/examples/dummydriver/connection/DummyConnection.java => plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/connection/BaseEtherNetIpPlcConnection.java (57%)
 create mode 100644 plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/connection/EtherNetIpTcpPlcConnection.java
 create mode 100644 plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/model/EtherNetIpAddress.java
 create mode 100644 plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/netty/EnipCodec.java
 create mode 100644 plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/netty/Plc4XEtherNetIpProtocol.java
 copy plc4j/{api/src/main/java/org/apache/plc4x/java/api/authentication/PlcAuthentication.java => protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/netty/events/EtherNetIpConnectedEvent.java} (88%)
 copy plc4j/{core/src/test => protocols/ethernetip/src/main}/resources/META-INF/services/org.apache.plc4x.java.api.PlcDriver (93%)
 create mode 100644 plc4j/protocols/ethernetip/src/site/asciidoc/index.adoc
 create mode 100644 plc4j/protocols/ethernetip/src/site/resources/img/WAGO_enip_exporer.png
 create mode 100644 plc4j/protocols/ethernetip/src/test/java/org/apache/plc4x/java/ethernetip/EnipTest.java
 create mode 100644 plc4j/protocols/ethernetip/src/test/java/org/apache/plc4x/java/ethernetip/ManualPlc4XEtherNetIpTest.java
 create mode 100644 plc4j/protocols/ethernetip/src/test/resources/read-attribute.pcapng


[incubator-plc4x] 12/15: Merge branches 'feature/ethernet-ip' and 'master' of https://gitbox.apache.org/repos/asf/incubator-plc4x into feature/ethernet-ip

Posted by cd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit bd550d7a5919392710be2d3d756986d1d59bf715
Merge: 7fab974 a4c4797
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Thu Aug 23 10:28:34 2018 +0200

    Merge branches 'feature/ethernet-ip' and 'master' of https://gitbox.apache.org/repos/asf/incubator-plc4x into feature/ethernet-ip

 .../main/java/org/apache/plc4x/java/ads/protocol/Plc4x2AdsProtocol.java  | 1 +
 1 file changed, 1 insertion(+)


[incubator-plc4x] 05/15: Updated the code after moving the PlcRequestContainer to another package

Posted by cd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 44860d939136cb032c73c797bb282503aac08908
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Fri Aug 17 16:32:51 2018 +0200

    Updated the code after moving the PlcRequestContainer to another package
---
 .../plc4x/java/ethernetip/connection/BaseEtherNetIpPlcConnection.java  | 1 +
 .../apache/plc4x/java/ethernetip/netty/Plc4XEtherNetIpProtocol.java    | 3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/connection/BaseEtherNetIpPlcConnection.java b/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/connection/BaseEtherNetIpPlcConnection.java
index 31a6c2d..ce2870a 100644
--- a/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/connection/BaseEtherNetIpPlcConnection.java
+++ b/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/connection/BaseEtherNetIpPlcConnection.java
@@ -25,6 +25,7 @@ import org.apache.plc4x.java.api.messages.*;
 import org.apache.plc4x.java.api.model.Address;
 import org.apache.plc4x.java.base.connection.AbstractPlcConnection;
 import org.apache.plc4x.java.base.connection.ChannelFactory;
+import org.apache.plc4x.java.base.messages.PlcRequestContainer;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/netty/Plc4XEtherNetIpProtocol.java b/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/netty/Plc4XEtherNetIpProtocol.java
index 3d6bf3d..2e53530 100644
--- a/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/netty/Plc4XEtherNetIpProtocol.java
+++ b/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/netty/Plc4XEtherNetIpProtocol.java
@@ -22,7 +22,6 @@ import com.digitalpetri.enip.EnipPacket;
 import com.digitalpetri.enip.EnipStatus;
 import com.digitalpetri.enip.commands.*;
 import com.digitalpetri.enip.cpf.*;
-import io.netty.buffer.ByteBuf;
 import io.netty.channel.ChannelHandlerContext;
 import io.netty.handler.codec.MessageToMessageCodec;
 import org.apache.plc4x.java.api.exceptions.PlcProtocolException;
@@ -30,6 +29,7 @@ import org.apache.plc4x.java.api.messages.*;
 import org.apache.plc4x.java.api.model.Address;
 import org.apache.plc4x.java.base.events.ConnectEvent;
 import org.apache.plc4x.java.base.events.ConnectedEvent;
+import org.apache.plc4x.java.base.messages.PlcRequestContainer;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -37,7 +37,6 @@ import java.nio.charset.Charset;
 import java.util.*;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.atomic.AtomicLong;
-import java.util.function.Consumer;
 
 public class Plc4XEtherNetIpProtocol extends MessageToMessageCodec<EnipPacket, PlcRequestContainer<PlcRequest, PlcResponse>> {
 


[incubator-plc4x] 01/15: Merge branches 'feature/ethernet-ip' and 'master' of https://gitbox.apache.org/repos/asf/incubator-plc4x into feature/ethernet-ip

Posted by cd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 0bc1f0db153eef73372c5d06417e2b08e4e79648
Merge: 9a299c8 49cd675
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Tue Aug 14 13:49:45 2018 +0200

    Merge branches 'feature/ethernet-ip' and 'master' of https://gitbox.apache.org/repos/asf/incubator-plc4x into feature/ethernet-ip

 examples/azure/pom.xml                             |  88 ++++++++
 .../azure/iothub/S7PlcToAzureIoTHubSample.java     |  95 ++++++++
 examples/pom.xml                                   |   1 +
 .../plc4x/java/api/messages/PlcReadRequest.java    |   8 +-
 .../plc4x/java/api/messages/PlcReadResponse.java   |   9 +-
 .../java/api/messages/PlcSubscriptionEvent.java    |  24 ++
 .../java/api/messages/PlcSubscriptionRequest.java  |   4 +
 .../java/api/messages/PlcSubscriptionResponse.java |   4 +
 .../api/messages/PlcUnsubscriptionRequest.java     |  23 ++
 .../api/messages/PlcUnsubscriptionResponse.java    |   4 +
 .../plc4x/java/api/messages/PlcWriteRequest.java   |   5 +
 .../plc4x/java/api/messages/PlcWriteResponse.java  |   5 +
 .../java/api/messages/items/ReadRequestItem.java   |   7 +
 .../java/api/messages/items/ReadResponseItem.java  |   9 +-
 .../api/messages/items/SubscriptionEventItem.java  |  28 +++
 .../SubscriptionRequestChangeOfStateItem.java      |   4 +
 .../items/SubscriptionRequestCyclicItem.java       |  29 +++
 .../items/SubscriptionRequestEventItem.java        |   4 +
 .../messages/items/SubscriptionRequestItem.java    |  29 +++
 .../messages/items/SubscriptionResponseItem.java   |  30 ++-
 .../java/api/messages/items/WriteRequestItem.java  |   7 +
 .../java/api/messages/items/WriteResponseItem.java |   4 +
 .../messages/specific/TypeSafePlcReadRequest.java  |   7 +
 .../messages/specific/TypeSafePlcReadResponse.java |   5 +
 .../messages/specific/TypeSafePlcWriteRequest.java |   7 +
 .../specific/TypeSafePlcWriteResponse.java         |   5 +
 .../plc4x/java/api/connection/PlcReaderTest.java   |   2 +-
 .../plc4x/java/api/messages/APIMessageTests.java   |  15 ++
 ...nseTest.java => PlcProprietaryRequestTest.java} |  33 ++-
 .../api/messages/PlcProprietaryResponseTest.java   |  53 +++++
 .../java/api/messages/PlcReadRequestTest.java      |   2 +-
 .../java/api/messages/PlcReadResponseTest.java     |   2 +-
 .../java/api/messages/PlcRequestContainerTest.java |  80 +++++++
 .../plc4x/java/api/messages/PlcRequestTest.java    |  10 +
 .../plc4x/java/api/messages/PlcResponseTest.java   |  20 +-
 .../api/messages/PlcSubscriptionEventTest.java     |  59 +++++
 .../api/messages/PlcSubscriptionRequestTest.java}  |  16 +-
 .../api/messages/PlcSubscriptionResponseTest.java} |  21 +-
 ...Test.java => PlcUnsubscriptionRequestTest.java} |  63 ++----
 .../messages/PlcUnsubscriptionResponseTest.java}   |  17 +-
 .../java/api/messages/PlcWriteRequestTest.java     |   4 +
 .../java/api/messages/PlcWriteResponseTest.java    |   6 +-
 .../ads/protocol/util/LittleEndianDecoder.java     |   6 +
 .../ads/protocol/util/LittleEndianEncoder.java     |  12 +
 .../java/ads/protocol/Plc4x2AdsProtocolTest.java   |   6 +-
 .../java/base/connection/tcp/TcpHexDumper.java     |  14 +-
 .../org/apache/plc4x/java/base/util/Assert.java    |   7 +-
 .../plc4x/java/base/util/Junit5Backport.java       |   6 +-
 .../plc4x/java/modbus/model/CoilModbusAddress.java |   2 +-
 .../model/MaskWriteRegisterModbusAddress.java      |   6 +-
 .../model/ReadDiscreteInputsModbusAddress.java     |   2 +-
 .../model/ReadHoldingRegistersModbusAddress.java   |   2 +-
 .../model/ReadInputRegistersModbusAddress.java     |   2 +-
 .../java/modbus/model/RegisterModbusAddress.java   |   2 +-
 .../java/modbus/netty/Plc4XModbusProtocol.java     |  47 ++--
 .../plc4x/java/s7/connection/S7PlcConnection.java  |   9 +-
 .../plc4x/java/s7/netty/util/S7TypeEncoder.java    |   4 +-
 .../java/s7/connection/S7PlcConnectionIT.java      |   2 +-
 pom.xml                                            |   6 +
 src/site/asciidoc/protocols/{ => ads}/index.adoc   |  16 +-
 src/site/asciidoc/protocols/delta-v/index.adoc     | 197 +++++++++++++++++
 .../protocols/delta-v/reverse-engineering.adoc     | 245 +++++++++++++++++++++
 .../protocols/{ => ethernet-ip}/index.adoc         |  15 +-
 src/site/asciidoc/protocols/features.adoc          |  36 ++-
 src/site/asciidoc/protocols/index.adoc             |  11 +-
 src/site/site.xml                                  |   5 +-
 66 files changed, 1305 insertions(+), 203 deletions(-)


[incubator-plc4x] 03/15: Changed the scope of the core module

Posted by cd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 66ff504ebb3fa0b88c16525d4e642195a9d4b61e
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Thu Aug 16 09:29:46 2018 +0200

    Changed the scope of the core module
---
 plc4j/protocols/ethernetip/pom.xml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/plc4j/protocols/ethernetip/pom.xml b/plc4j/protocols/ethernetip/pom.xml
index b43c895..bf33a6c 100644
--- a/plc4j/protocols/ethernetip/pom.xml
+++ b/plc4j/protocols/ethernetip/pom.xml
@@ -53,11 +53,12 @@
       <artifactId>plc4j-protocol-driver-base-tcp</artifactId>
       <version>0.0.1-SNAPSHOT</version>
     </dependency>
+
     <dependency>
       <groupId>org.apache.plc4x</groupId>
       <artifactId>plc4j-core</artifactId>
       <version>0.0.1-SNAPSHOT</version>
-      <scope>runtime</scope>
+      <scope>test</scope>
     </dependency>
 
     <!--dependency>


[incubator-plc4x] 06/15: Further work on the EtherNet/IP implementation.

Posted by cd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit ffd8d81f15dc53544fe643b58a408e3aaf475d4e
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Mon Aug 20 14:51:25 2018 +0200

    Further work on the EtherNet/IP implementation.
---
 plc4j/protocols/ethernetip/pom.xml                 |  16 ++-
 .../connection/BaseEtherNetIpPlcConnection.java    |  17 +---
 .../java/ethernetip/model/EtherNetIpAddress.java   |  22 ++++-
 .../ethernetip/netty/Plc4XEtherNetIpProtocol.java  |   6 ++
 .../ethernetip/src/site/asciidoc/index.adoc        |  14 ++-
 .../src/site/resources/img/WAGO_enip_exporer.png   | Bin 0 -> 293168 bytes
 .../org/apache/plc4x/java/ethernetip/EnipTest.java | 109 +++++++++++++++++++++
 .../java/ethernetip/ManualPlc4XEtherNetIpTest.java |   6 +-
 .../src/test/resources/read-attribute.pcapng       | Bin 0 -> 664 bytes
 9 files changed, 164 insertions(+), 26 deletions(-)

diff --git a/plc4j/protocols/ethernetip/pom.xml b/plc4j/protocols/ethernetip/pom.xml
index bf33a6c..413c847 100644
--- a/plc4j/protocols/ethernetip/pom.xml
+++ b/plc4j/protocols/ethernetip/pom.xml
@@ -61,16 +61,28 @@
       <scope>test</scope>
     </dependency>
 
-    <!--dependency>
+    <dependency>
       <groupId>com.digitalpetri.enip</groupId>
       <artifactId>cip-core</artifactId>
       <version>${ethernetip-driver.version}</version>
-    </dependency-->
+    </dependency>
     <dependency>
       <groupId>com.digitalpetri.enip</groupId>
       <artifactId>enip-core</artifactId>
       <version>${ethernetip-driver.version}</version>
     </dependency>
+    <dependency>
+      <groupId>com.digitalpetri.enip</groupId>
+      <artifactId>enip-client</artifactId>
+      <version>${ethernetip-driver.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.digitalpetri.enip</groupId>
+      <artifactId>cip-client</artifactId>
+      <version>${ethernetip-driver.version}</version>
+      <scope>test</scope>
+    </dependency>
 
     <dependency>
       <groupId>io.netty</groupId>
diff --git a/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/connection/BaseEtherNetIpPlcConnection.java b/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/connection/BaseEtherNetIpPlcConnection.java
index ce2870a..bc8deb6 100644
--- a/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/connection/BaseEtherNetIpPlcConnection.java
+++ b/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/connection/BaseEtherNetIpPlcConnection.java
@@ -26,6 +26,7 @@ import org.apache.plc4x.java.api.model.Address;
 import org.apache.plc4x.java.base.connection.AbstractPlcConnection;
 import org.apache.plc4x.java.base.connection.ChannelFactory;
 import org.apache.plc4x.java.base.messages.PlcRequestContainer;
+import org.apache.plc4x.java.ethernetip.model.EtherNetIpAddress;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -57,19 +58,9 @@ public abstract class BaseEtherNetIpPlcConnection extends AbstractPlcConnection
 
     @Override
     public Address parseAddress(String addressString) {
-        /*if (MaskWriteRegisterModbusAddress.ADDRESS_PATTERN.matcher(addressString).matches()) {
-            return MaskWriteRegisterModbusAddress.of(addressString);
-        } else if (ReadDiscreteInputsModbusAddress.ADDRESS_PATTERN.matcher(addressString).matches()) {
-            return ReadDiscreteInputsModbusAddress.of(addressString);
-        } else if (ReadHoldingRegistersModbusAddress.ADDRESS_PATTERN.matcher(addressString).matches()) {
-            return ReadHoldingRegistersModbusAddress.of(addressString);
-        } else if (ReadInputRegistersModbusAddress.ADDRESS_PATTERN.matcher(addressString).matches()) {
-            return ReadInputRegistersModbusAddress.of(addressString);
-        } else if (CoilAddress.ADDRESS_PATTERN.matcher(addressString).matches()) {
-            return CoilAddress.of(addressString);
-        } else if (RegisterAddress.ADDRESS_PATTERN.matcher(addressString).matches()) {
-            return RegisterAddress.of(addressString);
-        }*/
+        if(EtherNetIpAddress.ADDRESS_PATTERN.matcher(addressString).matches()) {
+            return EtherNetIpAddress.of(addressString);
+        }
         return null;
     }
 
diff --git a/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/model/EtherNetIpAddress.java b/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/model/EtherNetIpAddress.java
index 85ec148..56e818c 100644
--- a/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/model/EtherNetIpAddress.java
+++ b/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/model/EtherNetIpAddress.java
@@ -18,14 +18,16 @@ under the License.
 */
 package org.apache.plc4x.java.ethernetip.model;
 
+import org.apache.plc4x.java.api.exceptions.PlcRuntimeException;
 import org.apache.plc4x.java.api.model.Address;
 
 import java.util.Objects;
+import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-public abstract class EtherNetIpAddress implements Address {
+public class EtherNetIpAddress implements Address {
 
-    public static final Pattern ADDRESS_PATTERN = Pattern.compile("(?<address>\\d+)");
+    public static final Pattern ADDRESS_PATTERN = Pattern.compile("^#(?<class>.*?)#(?<instance>\\d{1,4})(?:#(?<attribute>\\d))?");
 
     private final int objectNumber;
     private final int instanceNumber;
@@ -33,6 +35,18 @@ public abstract class EtherNetIpAddress implements Address {
 
     private int connectionId;
 
+    public static EtherNetIpAddress of(String addressString) {
+        Matcher matcher = ADDRESS_PATTERN.matcher(addressString);
+        if (!matcher.matches()) {
+            throw new PlcRuntimeException(addressString + " doesn't match " + ADDRESS_PATTERN);
+        }
+        int classNumber = Integer.parseInt(matcher.group("class"));
+        int instanceNumber = Integer.parseInt(matcher.group("instance"));
+        int attributeNumber = Integer.parseInt(matcher.group("attribute"));
+
+        return new EtherNetIpAddress(classNumber, instanceNumber, attributeNumber);
+    }
+
     public EtherNetIpAddress(int objectNumber, int instanceNumber, int attributeNumber) {
         this.objectNumber = objectNumber;
         this.instanceNumber = instanceNumber;
@@ -77,8 +91,8 @@ public abstract class EtherNetIpAddress implements Address {
     public String toString() {
         return "EtherNetIpAddress{" +
             "object-number=" + objectNumber +
-            "instance-number=" + instanceNumber +
-            "attribute-number=" + attributeNumber +
+            ", instance-number=" + instanceNumber +
+            ", attribute-number=" + attributeNumber +
             '}';
     }
 }
diff --git a/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/netty/Plc4XEtherNetIpProtocol.java b/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/netty/Plc4XEtherNetIpProtocol.java
index 2e53530..f4e9fd7 100644
--- a/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/netty/Plc4XEtherNetIpProtocol.java
+++ b/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/netty/Plc4XEtherNetIpProtocol.java
@@ -167,6 +167,12 @@ public class Plc4XEtherNetIpProtocol extends MessageToMessageCodec<EnipPacket, P
         }
 
         PlcReadRequest request = (PlcReadRequest) msg.getRequest();
+
+/*        CpfItem cpfItem = new ConnectedDataItemRequest();
+        CpfPacket cpfPacket = new CpfPacket(cpfItem);
+        EnipPacket enipPacket = new EnipPacket(CommandCode.SendRRData, 0, EnipStatus.EIP_SUCCESS,
+            messageId.getAndIncrement(), new SendRRData(cpfPacket));
+*/
     }
 
     ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plc4j/protocols/ethernetip/src/site/asciidoc/index.adoc b/plc4j/protocols/ethernetip/src/site/asciidoc/index.adoc
index eb169d5..32dee12 100644
--- a/plc4j/protocols/ethernetip/src/site/asciidoc/index.adoc
+++ b/plc4j/protocols/ethernetip/src/site/asciidoc/index.adoc
@@ -20,11 +20,13 @@
 `IP` in `EtherNet/IP` does not relate to the `Internet Protocol` but to `Industrial Protocol`, so EtherNet/IP does not necessarily have to go over `IP` but can be implemented on `ethernet frames`.
 This driver however will utilize `EtherNet/IP` based on `TCP` and `UDP`.
 
-`Explicit messaging`: Read explicitly addressed information (Pull) (CIP Class 3 and 2)
-`Implicit messaging`: Read information distributed by the device configuration (Push) (CIP Class 1 and 0)
+EIP (the short form of: EtherNet/IP) generally supports two types of communication:
 
-TCP used for Explicit Messaging
-UDP used for Implicit Messaging ("Real time" I/O)
+- `Explicit messaging`: Read explicitly addressed information (Pull) (CIP Class 3 and 2)
+- `Implicit messaging`: Read information distributed by the device configuration (Push) (CIP Class 1 and 0)
+
+TCP transport is used for Explicit Messaging
+UDP transport is used for Implicit Messaging ("Real time" I/O)
 
 In Explicit Messaging (classic Request/Response) there are two different types of access:
 
@@ -37,10 +39,13 @@ In all cases the payload of the data items is dependent on the encapsulated prot
 In our case we'll concentrate on the default CIP format.
 
 Explicitly addressed object consists of the following data:
+
 - Object-Number
 - Instance-Number
 - Attribute-Number
 
+The format we have decided to use is: `#{objectId}#{instanceId}#{attributeId}`.
+
 Here is the location of the Spec:
 https://www.odva.org/Portals/0/Library/Publications_Numbered/PUB00123R1_Common-Industrial_Protocol_and_Family_of_CIP_Networks.pdf
 
@@ -49,6 +54,7 @@ As EtherNet/IP is used to encapsulate CIP traffic, this spec contains a chapter
 Another documentation I found discussing the explicit messaging thing a little better is this:
 http://www.deltamotion.com/support/webhelp/rmctools/Communications/Ethernet/Supported_Protocols/EtherNetIP/EtherNet_IP_Explicit_Messaging.htm
 https://www.odva.org/Portals/0/Library/Publications_Numbered/PUB00213R0_EtherNetIP_Developers_Guide.pdf
+http://www.technologyuk.net/telecommunications/industrial-networks/cip.shtml
 
 === Reading
 
diff --git a/plc4j/protocols/ethernetip/src/site/resources/img/WAGO_enip_exporer.png b/plc4j/protocols/ethernetip/src/site/resources/img/WAGO_enip_exporer.png
new file mode 100644
index 0000000..01c3446
Binary files /dev/null and b/plc4j/protocols/ethernetip/src/site/resources/img/WAGO_enip_exporer.png differ
diff --git a/plc4j/protocols/ethernetip/src/test/java/org/apache/plc4x/java/ethernetip/EnipTest.java b/plc4j/protocols/ethernetip/src/test/java/org/apache/plc4x/java/ethernetip/EnipTest.java
new file mode 100644
index 0000000..9cd6c69
--- /dev/null
+++ b/plc4j/protocols/ethernetip/src/test/java/org/apache/plc4x/java/ethernetip/EnipTest.java
@@ -0,0 +1,109 @@
+package org.apache.plc4x.java.ethernetip;
+
+import com.digitalpetri.enip.EtherNetIpClient;
+import com.digitalpetri.enip.EtherNetIpClientConfig;
+import com.digitalpetri.enip.cip.CipClient;
+import com.digitalpetri.enip.cip.epath.EPath;
+import com.digitalpetri.enip.cip.epath.LogicalSegment;
+import com.digitalpetri.enip.cip.epath.PortSegment;
+import com.digitalpetri.enip.cip.services.GetAttributeListService;
+import com.digitalpetri.enip.cip.services.GetAttributeSingleService;
+import com.digitalpetri.enip.commands.ListIdentity;
+import io.netty.buffer.ByteBuf;
+import io.netty.buffer.Unpooled;
+import io.netty.buffer.UnpooledDirectByteBuf;
+import io.netty.util.ReferenceCountUtil;
+
+import java.time.Duration;
+import java.util.Arrays;
+
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+public class EnipTest {
+
+    public static void main(String[] args) throws Exception {
+        EtherNetIpClientConfig config = EtherNetIpClientConfig.builder("10.10.64.30")
+            .setSerialNumber(0x00)
+            .setVendorId(0x00)
+            .setTimeout(Duration.ofSeconds(2))
+            .build();
+
+        // backplane, slot 0
+        EPath.PaddedEPath connectionPath = new EPath.PaddedEPath(
+            new PortSegment(1, new byte[]{(byte) 0}));
+
+        CipClient client = new CipClient(config, connectionPath);
+
+        client.connect().get();
+
+        GetAttributeSingleService service = new GetAttributeSingleService(
+            new EPath.PaddedEPath(new LogicalSegment.ClassId(0x04), new LogicalSegment.InstanceId(0x69), new LogicalSegment.AttributeId(0x03)));
+
+        ////////////////////////////////////////////////////////////////
+        // Doesn't work:
+        client.invokeUnconnected(service).whenComplete((as, ex) -> {
+            if (as != null) {
+                try {
+                    /*ByteBuf data = as[0].getData();
+                    int major = data.readUnsignedByte();
+                    int minor = data.readUnsignedByte();
+
+                    System.out.println(String.format("firmware v%s.%s", major, minor));*/
+                } catch (Throwable t) {
+                    t.printStackTrace();
+                } finally {
+                    //Arrays.stream(as).forEach(a -> ReferenceCountUtil.release(a.getData()));
+                }
+            } else {
+                ex.printStackTrace();
+            }
+        });
+
+        ////////////////////////////////////////////////////////////////
+        // Works:
+        ByteBuf buf = Unpooled.buffer();
+        service.encodeRequest(buf);
+        client.sendUnconnectedData(buf).whenComplete((as, ex) -> {
+            if (as != null) {
+                try {
+                    byte serviceId = as.readByte();
+                    boolean response = (serviceId & 128) != 0;
+                    serviceId = (byte) (serviceId & (byte) 127);
+                    if((serviceId != 0x0E) || !response) {
+                        System.out.println("Error");
+                    }
+                    // Reserved
+                    as.readByte();
+                    byte status = as.readByte();
+                    byte statusSize = as.readByte();
+                    short value = as.readShort();
+
+                    System.out.println(String.format("Value is %s", value));
+                } catch (Throwable t) {
+                    t.printStackTrace();
+                } finally {
+
+                }
+            } else {
+                ex.printStackTrace();
+            }
+        });
+    }
+
+}
diff --git a/plc4j/protocols/ethernetip/src/test/java/org/apache/plc4x/java/ethernetip/ManualPlc4XEtherNetIpTest.java b/plc4j/protocols/ethernetip/src/test/java/org/apache/plc4x/java/ethernetip/ManualPlc4XEtherNetIpTest.java
index f5b332c..73c4be8 100644
--- a/plc4j/protocols/ethernetip/src/test/java/org/apache/plc4x/java/ethernetip/ManualPlc4XEtherNetIpTest.java
+++ b/plc4j/protocols/ethernetip/src/test/java/org/apache/plc4x/java/ethernetip/ManualPlc4XEtherNetIpTest.java
@@ -33,14 +33,14 @@ public class ManualPlc4XEtherNetIpTest {
     public static void main(String... args) {
         String connectionUrl;
         System.out.println("Using tcp");
-        connectionUrl = "eip://192.168.42.39:44818";
-        //connectionUrl = "eip://10.10.64.30:44818";
+        //connectionUrl = "eip://192.168.42.39:44818";
+        connectionUrl = "eip://10.10.64.30:44818";
         try (PlcConnection plcConnection = new PlcDriverManager().getConnection(connectionUrl)) {
             System.out.println("PlcConnection " + plcConnection);
 
             PlcReader reader = plcConnection.getReader().orElseThrow(() -> new RuntimeException("No Reader found"));
 
-            Address address = plcConnection.parseAddress("register:7");
+            Address address = plcConnection.parseAddress("#1#1#1");
             CompletableFuture<TypeSafePlcReadResponse<Integer>> response = reader
                 .read(new TypeSafePlcReadRequest<>(Integer.class, address));
             TypeSafePlcReadResponse<Integer> readResponse = response.get();
diff --git a/plc4j/protocols/ethernetip/src/test/resources/read-attribute.pcapng b/plc4j/protocols/ethernetip/src/test/resources/read-attribute.pcapng
new file mode 100644
index 0000000..6e40071
Binary files /dev/null and b/plc4j/protocols/ethernetip/src/test/resources/read-attribute.pcapng differ


[incubator-plc4x] 10/15: First working version of a driver able to read values via EtherNet/IP

Posted by cd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 1f6078906d8c2ec51a56457d6755381af668eead
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Tue Aug 21 16:43:19 2018 +0200

    First working version of a driver able to read values via EtherNet/IP
---
 .../ethernetip/netty/Plc4XEtherNetIpProtocol.java  | 78 ++++++++++++++++++++--
 .../java/ethernetip/ManualPlc4XEtherNetIpTest.java | 33 +++++----
 2 files changed, 91 insertions(+), 20 deletions(-)

diff --git a/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/netty/Plc4XEtherNetIpProtocol.java b/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/netty/Plc4XEtherNetIpProtocol.java
index f4e9fd7..85a0756 100644
--- a/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/netty/Plc4XEtherNetIpProtocol.java
+++ b/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/netty/Plc4XEtherNetIpProtocol.java
@@ -20,16 +20,25 @@ package org.apache.plc4x.java.ethernetip.netty;
 
 import com.digitalpetri.enip.EnipPacket;
 import com.digitalpetri.enip.EnipStatus;
+import com.digitalpetri.enip.cip.epath.EPath;
+import com.digitalpetri.enip.cip.epath.LogicalSegment;
+import com.digitalpetri.enip.cip.services.GetAttributeSingleService;
+import com.digitalpetri.enip.cip.structs.MessageRouterResponse;
 import com.digitalpetri.enip.commands.*;
 import com.digitalpetri.enip.cpf.*;
+import io.netty.buffer.ByteBuf;
 import io.netty.channel.ChannelHandlerContext;
 import io.netty.handler.codec.MessageToMessageCodec;
 import org.apache.plc4x.java.api.exceptions.PlcProtocolException;
 import org.apache.plc4x.java.api.messages.*;
+import org.apache.plc4x.java.api.messages.items.ReadRequestItem;
+import org.apache.plc4x.java.api.messages.items.ReadResponseItem;
 import org.apache.plc4x.java.api.model.Address;
+import org.apache.plc4x.java.api.types.ResponseCode;
 import org.apache.plc4x.java.base.events.ConnectEvent;
 import org.apache.plc4x.java.base.events.ConnectedEvent;
 import org.apache.plc4x.java.base.messages.PlcRequestContainer;
+import org.apache.plc4x.java.ethernetip.model.EtherNetIpAddress;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -168,11 +177,27 @@ public class Plc4XEtherNetIpProtocol extends MessageToMessageCodec<EnipPacket, P
 
         PlcReadRequest request = (PlcReadRequest) msg.getRequest();
 
-/*        CpfItem cpfItem = new ConnectedDataItemRequest();
-        CpfPacket cpfPacket = new CpfPacket(cpfItem);
-        EnipPacket enipPacket = new EnipPacket(CommandCode.SendRRData, 0, EnipStatus.EIP_SUCCESS,
-            messageId.getAndIncrement(), new SendRRData(cpfPacket));
-*/
+        // Here we assume it's only one request item.
+        ReadRequestItem<?> requestItem = request.getRequestItem()
+            .orElseThrow(() -> new RuntimeException("Only single item requests allowed"));
+
+        // CIP Part
+        EtherNetIpAddress enipAddress = (EtherNetIpAddress) requestItem.getAddress();
+        EPath.PaddedEPath path = new EPath.PaddedEPath(new LogicalSegment.ClassId(enipAddress.getObjectNumber()),
+            new LogicalSegment.InstanceId(enipAddress.getInstanceNumber()),
+            new LogicalSegment.AttributeId(enipAddress.getAttributeNumber()));
+        GetAttributeSingleService service = new GetAttributeSingleService(path);
+
+        // ENIP Part
+        EnipPacket packet = new EnipPacket(CommandCode.SendRRData, sessionHandle, EnipStatus.EIP_SUCCESS,
+            messageId.getAndIncrement(), new SendRRData(new CpfPacket(
+            new NullAddressItem(),
+            new UnconnectedDataItemRequest(service::encodeRequest)
+        )));
+
+        requestsMap.put(packet.getSenderContext(), msg);
+
+        out.add(packet);
     }
 
     ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -407,11 +432,50 @@ public class Plc4XEtherNetIpProtocol extends MessageToMessageCodec<EnipPacket, P
         if (plcRequestContainer == null) {
             ctx.channel().pipeline().fireExceptionCaught(
                 new PlcProtocolException("Unrelated payload received for message " + msg));
+            return;
         }
 
-        PlcRequest request = plcRequestContainer.getRequest();
-    }
+        if(!(plcRequestContainer.getRequest() instanceof PlcReadRequest)) {
+            ctx.fireExceptionCaught(new PlcProtocolException("Expecting a PlcReadRequest here."));
+        }
+        PlcReadRequest request = (PlcReadRequest) plcRequestContainer.getRequest();
+        ResponseCode responseCode;
+        if(msg.getStatus() != EnipStatus.EIP_SUCCESS) {
+            responseCode = ResponseCode.NOT_FOUND;
+        } else {
+            responseCode = ResponseCode.OK;
+        }
 
+        SendRRData sendRRDataCommand = (SendRRData) msg.getCommand();
+        if(sendRRDataCommand == null) {
+            ctx.fireExceptionCaught(new PlcProtocolException("Expecting a SendRRData command here."));
+        }
+        CpfItem[] items = sendRRDataCommand.getPacket().getItems();
+        if (items.length != 2) {
+            ctx.fireExceptionCaught(new PlcProtocolException("Expecting 2 items here."));
+        }
+        CpfItem payload = items[1];
+        if (!(payload instanceof UnconnectedDataItemResponse)) {
+            ctx.fireExceptionCaught(new PlcProtocolException("Item[1] should be of type UnconnectedDataItemResponse"));
+        }
+        UnconnectedDataItemResponse enipResponse = (UnconnectedDataItemResponse) payload;
+        ByteBuf data = enipResponse.getData();
+        if (data.readableBytes() > 0) {
+            MessageRouterResponse cipResponse = MessageRouterResponse.decode(data);
+            ReadRequestItem requestItem = request.getRequestItem().orElse(null);
+            Short value;
+            if(cipResponse.getData().readableBytes() >= 2) {
+                value = cipResponse.getData().readShort();
+            } else {
+                value = -1;
+            }
+            // TODO: This is not quite correct as we assume everything is an integer.
+            ReadResponseItem<Integer> responseItem = new ReadResponseItem<Integer>(requestItem, responseCode, value.intValue());
+            PlcReadResponse response = new PlcReadResponse(request, responseItem);
+
+            plcRequestContainer.getResponseFuture().complete(response);
+        }
+    }
 
     ////////////////////////////////////////////////////////////////////////////////
     // Encoding helpers.
diff --git a/plc4j/protocols/ethernetip/src/test/java/org/apache/plc4x/java/ethernetip/ManualPlc4XEtherNetIpTest.java b/plc4j/protocols/ethernetip/src/test/java/org/apache/plc4x/java/ethernetip/ManualPlc4XEtherNetIpTest.java
index 73c4be8..ec8ed1f 100644
--- a/plc4j/protocols/ethernetip/src/test/java/org/apache/plc4x/java/ethernetip/ManualPlc4XEtherNetIpTest.java
+++ b/plc4j/protocols/ethernetip/src/test/java/org/apache/plc4x/java/ethernetip/ManualPlc4XEtherNetIpTest.java
@@ -21,9 +21,10 @@ package org.apache.plc4x.java.ethernetip;
 import org.apache.plc4x.java.PlcDriverManager;
 import org.apache.plc4x.java.api.connection.PlcConnection;
 import org.apache.plc4x.java.api.connection.PlcReader;
+import org.apache.plc4x.java.api.messages.PlcReadRequest;
+import org.apache.plc4x.java.api.messages.PlcReadResponse;
+import org.apache.plc4x.java.api.messages.items.ReadRequestItem;
 import org.apache.plc4x.java.api.messages.items.ReadResponseItem;
-import org.apache.plc4x.java.api.messages.specific.TypeSafePlcReadRequest;
-import org.apache.plc4x.java.api.messages.specific.TypeSafePlcReadResponse;
 import org.apache.plc4x.java.api.model.Address;
 
 import java.util.concurrent.CompletableFuture;
@@ -31,23 +32,29 @@ import java.util.concurrent.CompletableFuture;
 public class ManualPlc4XEtherNetIpTest {
 
     public static void main(String... args) {
-        String connectionUrl;
-        System.out.println("Using tcp");
-        //connectionUrl = "eip://192.168.42.39:44818";
-        connectionUrl = "eip://10.10.64.30:44818";
+        // Connection to our IoT Lab WAGO device.
+        String connectionUrl = "eip://10.10.64.30:44818";
         try (PlcConnection plcConnection = new PlcDriverManager().getConnection(connectionUrl)) {
             System.out.println("PlcConnection " + plcConnection);
 
+            // Get a reader instance.
             PlcReader reader = plcConnection.getReader().orElseThrow(() -> new RuntimeException("No Reader found"));
 
-            Address address = plcConnection.parseAddress("#1#1#1");
-            CompletableFuture<TypeSafePlcReadResponse<Integer>> response = reader
-                .read(new TypeSafePlcReadRequest<>(Integer.class, address));
-            TypeSafePlcReadResponse<Integer> readResponse = response.get();
-            System.out.println("Response " + readResponse);
-            ReadResponseItem<Integer> responseItem = readResponse.getResponseItem().orElseThrow(() -> new RuntimeException("No Item found"));
+            // Parse the address.
+            Address address = plcConnection.parseAddress("#4#105#3");
+
+            // Create a new read request.
+            PlcReadRequest readRequest = new PlcReadRequest(new ReadRequestItem<>(Integer.class, address));
+
+            // Execute the read operation.
+            CompletableFuture<? extends PlcReadResponse> response = reader.read(readRequest);
+            PlcReadResponse readResponse = response.get();
+
+            // Output the response.
+            ReadResponseItem responseItem = readResponse.getResponseItem()
+                .orElseThrow(() -> new RuntimeException("No Item found"));
             System.out.println("ResponseItem " + responseItem);
-            responseItem.getValues().stream().map(integer -> "Value: " + integer).forEach(System.out::println);
+            responseItem.getValues().stream().map(value -> "Value: " + value.toString()).forEach(System.out::println);
         } catch (Exception e) {
             e.printStackTrace();
             System.exit(1);


[incubator-plc4x] 04/15: Merge branch 'master' of https://gitbox.apache.org/repos/asf/incubator-plc4x into feature/ethernet-ip

Posted by cd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 8e6af2d4241334863b724d4243f8ef9e0b00092e
Merge: 66ff504 276768b
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Fri Aug 17 15:55:09 2018 +0200

    Merge branch 'master' of https://gitbox.apache.org/repos/asf/incubator-plc4x into feature/ethernet-ip

 .../dummydriver/connection/DummyConnection.java    |  12 +-
 .../examples/dummydriver/netty/DummyProtocol.java  |   6 +-
 .../plc4x/java/examples/plclogger/PlcLogger.java   |   2 +-
 examples/plclogger/src/main/resources/logback.xml  |   2 +-
 .../java/org/apache/plc4x/camel/Plc4XConsumer.java |   9 +-
 plc4j/api/pom.xml                                  |   6 +
 .../apache/plc4x/java/api/messages/PlcRequest.java |   6 +-
 .../java/api/messages/PlcSubscriptionRequest.java  |  51 ++-
 .../api/messages/PlcUnsubscriptionRequest.java     |  57 ++++
 .../api/messages/items/SubscriptionEventItem.java  |   6 +-
 .../SubscriptionRequestChangeOfStateItem.java      |   4 +-
 .../items/SubscriptionRequestCyclicItem.java       |  10 +-
 .../items/SubscriptionRequestEventItem.java        |   6 +-
 .../messages/items/SubscriptionRequestItem.java    |   4 +-
 .../apache/plc4x/java/api/ImmutabilityTest.java    | 103 +++++++
 .../ads/connection/AdsAbstractPlcConnection.java   |   1 +
 .../java/ads/connection/AdsTcpPlcConnection.java   |   1 +
 .../java/ads/model/AdsSubscriptionHandle.java      |  25 ++
 .../plc4x/java/ads/protocol/Plc4x2AdsProtocol.java |   1 +
 .../apache/plc4x/java/ads/ManualPlc4XAdsTest.java  |  36 ++-
 .../connection/AdsAbstractPlcConnectionTest.java   |   1 +
 .../ads/connection/AdsTcpPlcConnectionTests.java   |  10 +-
 .../java/ads/protocol/Plc4x2AdsProtocolTest.java   |   6 +-
 .../java/base}/messages/PlcRequestContainer.java   |  42 +--
 .../base}/messages/PlcRequestContainerTest.java    |   8 +-
 .../modbus/connection/BaseModbusPlcConnection.java |   6 +-
 .../java/modbus/netty/Plc4XModbusProtocol.java     |   1 +
 .../java/modbus/netty/Plc4XModbusProtocolTest.java |   6 +-
 .../plc4x/java/s7/connection/S7PlcConnection.java  |   6 +-
 .../plc4x/java/s7/netty/Plc4XS7Protocol.java       |   3 +-
 .../org/apache/plc4x/java/s7/netty/S7Protocol.java | 341 +++++++++++++++++----
 .../S7IdentifiedEvent.java}                        |  13 +-
 .../netty/model/params/CpuServicesParameter.java   |  25 +-
 ...meter.java => CpuServicesRequestParameter.java} |  11 +-
 .../model/params/CpuServicesResponseParameter.java |  50 +++
 .../netty/model/payloads/CpuServicesPayload.java   |  71 +++++
 .../ssls/SslDataRecord.java}                       |  12 +-
 .../ssls/SslModuleIdentificationDataRecord.java    |  66 ++++
 .../types/CpuServicesParameterFunctionGroup.java   |  59 ++++
 .../CpuServicesParameterSubFunctionGroup.java      |  59 ++++
 .../plc4x/java/s7/netty/model/types/SslId.java     |  99 ++++++
 .../plc4x/java/s7/netty/util/S7SizeHelper.java     |  20 ++
 .../java/s7/connection/S7PlcConnectionIT.java      |   3 +-
 .../java/s7/connection/S7PlcTestConnection.java    |  35 ++-
 .../plc4x/java/s7/netty/Plc4XS7ProtocolTest.java   |   2 +-
 .../s7/netty/model/params/S7ParameterTests.java    |   8 +-
 .../plc4x/java/s7/netty/util/S7SizeHelperTest.java |   5 +-
 .../s7/connection/s7-cpu-functions-response.pcap   | Bin 0 -> 219 bytes
 src/site/asciidoc/index.adoc                       |  19 +-
 49 files changed, 1158 insertions(+), 177 deletions(-)


[incubator-plc4x] 09/15: Removed the maven version check as it was reported by the build itself not being intended for this sort of check

Posted by cd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 5dad848a609e5b9dfb176a6342ecef05ccb38e6b
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Mon Aug 20 22:30:37 2018 +0200

    Removed the maven version check as it was reported by the build itself not being intended for this sort of check
---
 pom.xml | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/pom.xml b/pom.xml
index 61fa38a..24762af 100644
--- a/pom.xml
+++ b/pom.xml
@@ -248,20 +248,6 @@
         <artifactId>maven-enforcer-plugin</artifactId>
         <version>3.0.0-M1</version> <!--$NO-MVN-MAN-VER$-->
         <executions>
-          <execution>
-            <id>enforce-maven</id>
-            <phase>validate</phase>
-            <goals>
-              <goal>enforce</goal>
-            </goals>
-            <configuration>
-              <rules>
-                <requireMavenVersion>
-                  <version>${maven.version}</version>
-                </requireMavenVersion>
-              </rules>
-            </configuration>
-          </execution>
           <!-- Make sure no dependencies are used for which known vulnerabilities exist. -->
           <execution>
             <id>vulnerability-checks</id>


[incubator-plc4x] 08/15: Updated the ethernetip driver to a new version

Posted by cd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 992f7077286ec0d77eb4cc43f297f88e737fcd1b
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Mon Aug 20 22:24:38 2018 +0200

    Updated the ethernetip driver to a new version
---
 plc4j/protocols/ethernetip/pom.xml | 2 +-
 pom.xml                            | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/plc4j/protocols/ethernetip/pom.xml b/plc4j/protocols/ethernetip/pom.xml
index 413c847..77b207e 100644
--- a/plc4j/protocols/ethernetip/pom.xml
+++ b/plc4j/protocols/ethernetip/pom.xml
@@ -34,7 +34,7 @@
   </description>
 
   <properties>
-    <ethernetip-driver.version>1.1.3-SNAPSHOT</ethernetip-driver.version>
+    <ethernetip-driver.version>1.2.0-SNAPSHOT</ethernetip-driver.version>
   </properties>
 
   <dependencies>
diff --git a/pom.xml b/pom.xml
index fde4daa..61fa38a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -174,6 +174,11 @@
       </dependency>
       <dependency>
         <groupId>io.netty</groupId>
+        <artifactId>netty-handler</artifactId>
+        <version>${netty.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>io.netty</groupId>
         <artifactId>netty-resolver</artifactId>
         <version>${netty.version}</version>
       </dependency>


[incubator-plc4x] 15/15: - Renamed PlcInvalidAddress to PlcInvalidAddressException - Refactored the code for parsing addresses in the EtherNet/IP driver

Posted by cd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 23f05c86741ac0895cd31b02bc801efbc9bce172
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Thu Aug 23 11:28:18 2018 +0200

    - Renamed PlcInvalidAddress to PlcInvalidAddressException
    - Refactored the code for parsing addresses in the EtherNet/IP driver
---
 .../plc4x/java/api/connection/PlcConnection.java   |  6 ++---
 ...ddress.java => PlcInvalidAddressException.java} | 26 ++++++----------------
 .../connection/BaseEtherNetIpPlcConnection.java    |  7 +++---
 .../java/ethernetip/model/EtherNetIpAddress.java   | 20 ++++++++++-------
 .../plc4x/java/s7/connection/S7PlcConnection.java  |  6 ++---
 5 files changed, 29 insertions(+), 36 deletions(-)

diff --git a/plc4j/api/src/main/java/org/apache/plc4x/java/api/connection/PlcConnection.java b/plc4j/api/src/main/java/org/apache/plc4x/java/api/connection/PlcConnection.java
index 29d9438..a3f5561 100644
--- a/plc4j/api/src/main/java/org/apache/plc4x/java/api/connection/PlcConnection.java
+++ b/plc4j/api/src/main/java/org/apache/plc4x/java/api/connection/PlcConnection.java
@@ -19,7 +19,7 @@ under the License.
 package org.apache.plc4x.java.api.connection;
 
 import org.apache.plc4x.java.api.exceptions.PlcConnectionException;
-import org.apache.plc4x.java.api.exceptions.PlcInvalidAddress;
+import org.apache.plc4x.java.api.exceptions.PlcInvalidAddressException;
 import org.apache.plc4x.java.api.model.Address;
 
 import java.util.Optional;
@@ -60,9 +60,9 @@ public interface PlcConnection extends AutoCloseable {
      *
      * @param addressString String representation of an address for the current type of PLC/protocol.
      * @return Address object identifying an address for the current type of PLC/protocol.
-     * @throws PlcInvalidAddress an exception if there was a problem parsing the address string.
+     * @throws PlcInvalidAddressException an exception if there was a problem parsing the address string.
      */
-    Address parseAddress(String addressString) throws PlcInvalidAddress;
+    Address parseAddress(String addressString) throws PlcInvalidAddressException;
 
     Optional<PlcLister> getLister();
 
diff --git a/plc4j/api/src/main/java/org/apache/plc4x/java/api/exceptions/PlcInvalidAddress.java b/plc4j/api/src/main/java/org/apache/plc4x/java/api/exceptions/PlcInvalidAddressException.java
similarity index 62%
rename from plc4j/api/src/main/java/org/apache/plc4x/java/api/exceptions/PlcInvalidAddress.java
rename to plc4j/api/src/main/java/org/apache/plc4x/java/api/exceptions/PlcInvalidAddressException.java
index 660f701..cdb6dee 100644
--- a/plc4j/api/src/main/java/org/apache/plc4x/java/api/exceptions/PlcInvalidAddress.java
+++ b/plc4j/api/src/main/java/org/apache/plc4x/java/api/exceptions/PlcInvalidAddressException.java
@@ -23,31 +23,19 @@ import java.util.regex.Pattern;
 /**
  * Indicates an invalid Address.
  */
-public class PlcInvalidAddress extends PlcException {
+public class PlcInvalidAddressException extends PlcException {
     private static final long serialVersionUID = 1L;
 
-    public PlcInvalidAddress(String addressToBeParsed, Pattern pattern) {
-        super(addressToBeParsed + " doesn't match " + pattern);
-    }
-
-    public PlcInvalidAddress(String addressToBeParsed, Pattern pattern, String readablePattern) {
-        super(addressToBeParsed + " doesn't match " + readablePattern + '(' + pattern + ')');
-    }
-
-    public PlcInvalidAddress(String message) {
-        super(message);
-    }
-
-    public PlcInvalidAddress(String message, Throwable cause) {
-        super(message, cause);
+    public PlcInvalidAddressException(String addressToBeParsed) {
+        super(addressToBeParsed + " invalid");
     }
 
-    public PlcInvalidAddress(Throwable cause) {
-        super(cause);
+    public PlcInvalidAddressException(String addressToBeParsed, Pattern pattern) {
+        super(addressToBeParsed + " doesn't match " + pattern);
     }
 
-    public PlcInvalidAddress(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
-        super(message, cause, enableSuppression, writableStackTrace);
+    public PlcInvalidAddressException(String addressToBeParsed, Pattern pattern, String readablePattern) {
+        super(addressToBeParsed + " doesn't match " + readablePattern + '(' + pattern + ')');
     }
 
 }
diff --git a/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/connection/BaseEtherNetIpPlcConnection.java b/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/connection/BaseEtherNetIpPlcConnection.java
index bc8deb6..ac76c2b 100644
--- a/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/connection/BaseEtherNetIpPlcConnection.java
+++ b/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/connection/BaseEtherNetIpPlcConnection.java
@@ -21,6 +21,7 @@ package org.apache.plc4x.java.ethernetip.connection;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.plc4x.java.api.connection.PlcReader;
 import org.apache.plc4x.java.api.connection.PlcWriter;
+import org.apache.plc4x.java.api.exceptions.PlcInvalidAddressException;
 import org.apache.plc4x.java.api.messages.*;
 import org.apache.plc4x.java.api.model.Address;
 import org.apache.plc4x.java.base.connection.AbstractPlcConnection;
@@ -57,11 +58,11 @@ public abstract class BaseEtherNetIpPlcConnection extends AbstractPlcConnection
     }
 
     @Override
-    public Address parseAddress(String addressString) {
-        if(EtherNetIpAddress.ADDRESS_PATTERN.matcher(addressString).matches()) {
+    public Address parseAddress(String addressString) throws PlcInvalidAddressException {
+        if(EtherNetIpAddress.matches(addressString)) {
             return EtherNetIpAddress.of(addressString);
         }
-        return null;
+        throw new PlcInvalidAddressException(addressString);
     }
 
     @Override
diff --git a/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/model/EtherNetIpAddress.java b/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/model/EtherNetIpAddress.java
index 56e818c..fbcdcdc 100644
--- a/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/model/EtherNetIpAddress.java
+++ b/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/model/EtherNetIpAddress.java
@@ -18,7 +18,7 @@ under the License.
 */
 package org.apache.plc4x.java.ethernetip.model;
 
-import org.apache.plc4x.java.api.exceptions.PlcRuntimeException;
+import org.apache.plc4x.java.api.exceptions.PlcInvalidAddressException;
 import org.apache.plc4x.java.api.model.Address;
 
 import java.util.Objects;
@@ -29,16 +29,14 @@ public class EtherNetIpAddress implements Address {
 
     public static final Pattern ADDRESS_PATTERN = Pattern.compile("^#(?<class>.*?)#(?<instance>\\d{1,4})(?:#(?<attribute>\\d))?");
 
-    private final int objectNumber;
-    private final int instanceNumber;
-    private final int attributeNumber;
-
-    private int connectionId;
+    public static boolean matches(String addressString) {
+        return ADDRESS_PATTERN.matcher(addressString).matches();
+    }
 
-    public static EtherNetIpAddress of(String addressString) {
+    public static EtherNetIpAddress of(String addressString) throws PlcInvalidAddressException {
         Matcher matcher = ADDRESS_PATTERN.matcher(addressString);
         if (!matcher.matches()) {
-            throw new PlcRuntimeException(addressString + " doesn't match " + ADDRESS_PATTERN);
+            throw new PlcInvalidAddressException(addressString, ADDRESS_PATTERN);
         }
         int classNumber = Integer.parseInt(matcher.group("class"));
         int instanceNumber = Integer.parseInt(matcher.group("instance"));
@@ -47,6 +45,12 @@ public class EtherNetIpAddress implements Address {
         return new EtherNetIpAddress(classNumber, instanceNumber, attributeNumber);
     }
 
+    private final int objectNumber;
+    private final int instanceNumber;
+    private final int attributeNumber;
+
+    private int connectionId;
+
     public EtherNetIpAddress(int objectNumber, int instanceNumber, int attributeNumber) {
         this.objectNumber = objectNumber;
         this.instanceNumber = instanceNumber;
diff --git a/plc4j/protocols/s7/src/main/java/org/apache/plc4x/java/s7/connection/S7PlcConnection.java b/plc4j/protocols/s7/src/main/java/org/apache/plc4x/java/s7/connection/S7PlcConnection.java
index febc365..1f27917 100644
--- a/plc4j/protocols/s7/src/main/java/org/apache/plc4x/java/s7/connection/S7PlcConnection.java
+++ b/plc4j/protocols/s7/src/main/java/org/apache/plc4x/java/s7/connection/S7PlcConnection.java
@@ -25,7 +25,7 @@ import org.apache.commons.lang3.StringUtils;
 import org.apache.plc4x.java.api.connection.PlcReader;
 import org.apache.plc4x.java.api.connection.PlcWriter;
 import org.apache.plc4x.java.api.exceptions.PlcConnectionException;
-import org.apache.plc4x.java.api.exceptions.PlcInvalidAddress;
+import org.apache.plc4x.java.api.exceptions.PlcInvalidAddressException;
 import org.apache.plc4x.java.api.messages.PlcReadRequest;
 import org.apache.plc4x.java.api.messages.PlcReadResponse;
 import org.apache.plc4x.java.api.messages.PlcWriteRequest;
@@ -249,7 +249,7 @@ public class S7PlcConnection extends AbstractPlcConnection implements PlcReader,
 
 
     @Override
-    public Address parseAddress(String addressString) throws PlcInvalidAddress {
+    public Address parseAddress(String addressString) throws PlcInvalidAddressException {
         Matcher datablockAddressMatcher = S7_DATABLOCK_ADDRESS_PATTERN.matcher(addressString);
         if (datablockAddressMatcher.matches()) {
             int datablockNumber = Integer.parseInt(datablockAddressMatcher.group("blockNumber"));
@@ -258,7 +258,7 @@ public class S7PlcConnection extends AbstractPlcConnection implements PlcReader,
         }
         Matcher addressMatcher = S7_ADDRESS_PATTERN.matcher(addressString);
         if (!addressMatcher.matches()) {
-            throw new PlcInvalidAddress(addressString, S7_ADDRESS_PATTERN, "{area}/{offset}[/{bit-offset}]");
+            throw new PlcInvalidAddressException(addressString, S7_ADDRESS_PATTERN, "{area}/{offset}[/{bit-offset}]");
         }
         MemoryArea memoryArea = MemoryArea.valueOf(addressMatcher.group("memoryArea"));
         int byteOffset = Integer.parseInt(addressMatcher.group("byteOffset"));


[incubator-plc4x] 11/15: Merge branches 'feature/ethernet-ip' and 'master' of https://gitbox.apache.org/repos/asf/incubator-plc4x into feature/ethernet-ip

Posted by cd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 7fab974e1cbae753430cd65642781efbcd25b2af
Merge: 1f60789 69b305c
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Wed Aug 22 15:44:05 2018 +0200

    Merge branches 'feature/ethernet-ip' and 'master' of https://gitbox.apache.org/repos/asf/incubator-plc4x into feature/ethernet-ip

 pom.xml                                            |  157 +-
 .../css/{site.css => bootstrap-responsive.min.css} |   41 +-
 src/site/resources/css/site.css                    |   13 +-
 src/site/site.xml                                  |    5 +-
 src/site/template/maven-site.vm                    | 1795 --------------------
 5 files changed, 92 insertions(+), 1919 deletions(-)



[incubator-plc4x] 07/15: Adjusted the poc to latest changes in the enip driver

Posted by cd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 8bec538edd85a667f2830d0b5decdd5e7c1959a3
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Mon Aug 20 21:36:47 2018 +0200

    Adjusted the poc to latest changes in the enip driver
---
 .../org/apache/plc4x/java/ethernetip/EnipTest.java | 46 +---------------------
 1 file changed, 2 insertions(+), 44 deletions(-)

diff --git a/plc4j/protocols/ethernetip/src/test/java/org/apache/plc4x/java/ethernetip/EnipTest.java b/plc4j/protocols/ethernetip/src/test/java/org/apache/plc4x/java/ethernetip/EnipTest.java
index 9cd6c69..41edb06 100644
--- a/plc4j/protocols/ethernetip/src/test/java/org/apache/plc4x/java/ethernetip/EnipTest.java
+++ b/plc4j/protocols/ethernetip/src/test/java/org/apache/plc4x/java/ethernetip/EnipTest.java
@@ -1,21 +1,15 @@
 package org.apache.plc4x.java.ethernetip;
 
-import com.digitalpetri.enip.EtherNetIpClient;
 import com.digitalpetri.enip.EtherNetIpClientConfig;
 import com.digitalpetri.enip.cip.CipClient;
 import com.digitalpetri.enip.cip.epath.EPath;
 import com.digitalpetri.enip.cip.epath.LogicalSegment;
 import com.digitalpetri.enip.cip.epath.PortSegment;
-import com.digitalpetri.enip.cip.services.GetAttributeListService;
 import com.digitalpetri.enip.cip.services.GetAttributeSingleService;
-import com.digitalpetri.enip.commands.ListIdentity;
 import io.netty.buffer.ByteBuf;
 import io.netty.buffer.Unpooled;
-import io.netty.buffer.UnpooledDirectByteBuf;
-import io.netty.util.ReferenceCountUtil;
 
 import java.time.Duration;
-import java.util.Arrays;
 
 /*
 Licensed to the Apache Software Foundation (ASF) under one
@@ -55,55 +49,19 @@ public class EnipTest {
         GetAttributeSingleService service = new GetAttributeSingleService(
             new EPath.PaddedEPath(new LogicalSegment.ClassId(0x04), new LogicalSegment.InstanceId(0x69), new LogicalSegment.AttributeId(0x03)));
 
-        ////////////////////////////////////////////////////////////////
-        // Doesn't work:
-        client.invokeUnconnected(service).whenComplete((as, ex) -> {
+        client.invoke(service).whenComplete((as, ex) -> {
             if (as != null) {
                 try {
-                    /*ByteBuf data = as[0].getData();
-                    int major = data.readUnsignedByte();
-                    int minor = data.readUnsignedByte();
-
-                    System.out.println(String.format("firmware v%s.%s", major, minor));*/
-                } catch (Throwable t) {
-                    t.printStackTrace();
-                } finally {
-                    //Arrays.stream(as).forEach(a -> ReferenceCountUtil.release(a.getData()));
-                }
-            } else {
-                ex.printStackTrace();
-            }
-        });
-
-        ////////////////////////////////////////////////////////////////
-        // Works:
-        ByteBuf buf = Unpooled.buffer();
-        service.encodeRequest(buf);
-        client.sendUnconnectedData(buf).whenComplete((as, ex) -> {
-            if (as != null) {
-                try {
-                    byte serviceId = as.readByte();
-                    boolean response = (serviceId & 128) != 0;
-                    serviceId = (byte) (serviceId & (byte) 127);
-                    if((serviceId != 0x0E) || !response) {
-                        System.out.println("Error");
-                    }
-                    // Reserved
-                    as.readByte();
-                    byte status = as.readByte();
-                    byte statusSize = as.readByte();
                     short value = as.readShort();
-
                     System.out.println(String.format("Value is %s", value));
                 } catch (Throwable t) {
                     t.printStackTrace();
-                } finally {
-
                 }
             } else {
                 ex.printStackTrace();
             }
         });
+
     }
 
 }


[incubator-plc4x] 02/15: Merge branches 'feature/ethernet-ip' and 'master' of https://gitbox.apache.org/repos/asf/incubator-plc4x into feature/ethernet-ip

Posted by cd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 73fe5e9d525df444abc6ef3f85508248d6786ad3
Merge: 0bc1f0d 02b8b7b
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Thu Aug 16 09:17:57 2018 +0200

    Merge branches 'feature/ethernet-ip' and 'master' of https://gitbox.apache.org/repos/asf/incubator-plc4x into feature/ethernet-ip

 .../plc4x/java/s7/types/S7ControllerType.java      |  29 ++++
 .../org/apache/plc4x/java/s7/types/S7DataType.java | 155 +++++++++++++++++++++
 .../apache/plc4x/java/s7/types/S7DataTypeTest.java |  57 ++++++++
 pom.xml                                            |  25 +++-
 src/site/asciidoc/community/conferences.adoc       |  24 ++--
 src/site/asciidoc/community/getting-involved.adoc  |  62 ++++++++-
 src/site/asciidoc/index.adoc                       |  56 +++++---
 src/site/resources/img/S7300.png                   | Bin 211110 -> 0 bytes
 src/site/resources/img/apache_kafka_logo.png       | Bin 0 -> 78411 bytes
 src/site/resources/img/apache_nifi_logo.svg        |  19 +++
 .../resources/img/community-contribute-fork.png    | Bin 0 -> 195211 bytes
 src/site/resources/img/iot-lab.jpg                 | Bin 0 -> 664977 bytes
 src/site/site.xml                                  |   4 +-
 src/site/template/maven-site.vm                    |   2 +
 14 files changed, 393 insertions(+), 40 deletions(-)


[incubator-plc4x] 14/15: Merge branch 'master' of https://gitbox.apache.org/repos/asf/incubator-plc4x into feature/ethernet-ip

Posted by cd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 502e1b25392a7b2877369b8abdc78fd91b17ab8b
Merge: 4021fb8 9c820f7
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Thu Aug 23 11:12:52 2018 +0200

    Merge branch 'master' of https://gitbox.apache.org/repos/asf/incubator-plc4x into feature/ethernet-ip

 .../plc4x/java/api/connection/PlcConnection.java   |  6 +--
 .../java/api/exceptions/PlcInvalidAddress.java     | 53 ++++++++++++++++++++++
 .../ads/protocol/util/LittleEndianDecoder.java     | 37 +++++++--------
 .../ads/protocol/util/LittleEndianEncoder.java     |  3 +-
 .../ads/protocol/util/LittleEndianDecoderTest.java |  3 +-
 .../ads/protocol/util/LittleEndianEncoderTest.java |  4 +-
 .../plc4x/java/base/connection/MockConnection.java |  3 +-
 .../java/modbus/netty/Plc4XModbusProtocol.java     | 10 ++--
 .../plc4x/java/s7/connection/S7PlcConnection.java  |  7 ++-
 .../plc4x/java/s7/netty/util/S7TypeDecoder.java    | 19 ++++----
 .../plc4x/java/s7/netty/util/S7TypeEncoder.java    |  6 +--
 .../java/s7/connection/S7PlcConnectionTests.java   |  2 +-
 12 files changed, 102 insertions(+), 51 deletions(-)


[incubator-plc4x] 13/15: Merge branch 'master' of https://gitbox.apache.org/repos/asf/incubator-plc4x into feature/ethernet-ip

Posted by cd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 4021fb83f2f20b0a602230c6371dae097e1da4e5
Merge: bd550d7 0b0e202
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Thu Aug 23 10:55:17 2018 +0200

    Merge branch 'master' of https://gitbox.apache.org/repos/asf/incubator-plc4x into feature/ethernet-ip

 .../PlcUnsupportedDataTypeException.java           | 46 ++++++++++++++++++++++
 .../plc4x/java/ads/protocol/Plc4x2AdsProtocol.java | 46 +++++++++++++++++++++-
 2 files changed, 90 insertions(+), 2 deletions(-)