You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by jf...@apache.org on 2019/05/05 13:20:14 UTC

[plc4x] branch feature/code-gen updated (579b723 -> 5930763)

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

jfeinauer pushed a change to branch feature/code-gen
in repository https://gitbox.apache.org/repos/asf/plc4x.git.


    from 579b723  Added Setters to Pojos, did really awesome stuff.
     new 9749552  - Streamlined the calls to run python to be equal for compile and package
     new ad536e0  - Removed the double import of plc4py
     new 3a37395  - Added a new exclusion for Eclipse settings files ".factorypath"
     new dcfac6f  [PLC4X-110] Added VS solution and project
     new 1304684  [PLC4X-110] Added core class implementation
     new b0c6253  [PLC4X-110] Implemented messages and builders
     new fb0a082  Added vscode files to gitignore
     new 10011f9  - Fine tuned the build and integrated it to maven
     new 399d634  - Moved up the format descriptor to the top or visual studio won't be able to read the solution.
     new 8a59973  - Added some documentation on how to use PLC4J - Added a warning to the windows installation guide (If you don't run the setup, things will be problematic)
     new 86cc7ab  - Enabled the .Net build in the Jenkinsfile
     new 5930763  Fix link to material

The 12 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:
 .gitignore                                         |   1 +
 .vscode/settings.json                              |   8 +
 Jenkinsfile                                        |   4 +-
 README                                             |  21 +-
 plc4j/src/site/asciidoc/users/gettingstarted.adoc  | 178 +++++++++++
 plc4net/.gitignore                                 | 344 +++++++++++++++++++++
 plc4net/api/PlcDriverManager.cs                    | 104 +++++++
 .../api/api.csproj                                 |  14 +-
 plc4net/api/api/IPlcConnection.cs                  |  89 ++++++
 plc4net/api/api/IPlcDriver.cs                      |  57 ++++
 .../api/api/authentication/IPlcAuthentication.cs   |  16 +-
 .../PlcUsernamePasswordAuthentication.cs           |  48 +++
 .../api/api/metadata/IPlcConnectionMetadata.cs     |  52 ++--
 .../api/exceptions/PlcConnectionException.cs       |  37 ++-
 .../api/exceptions/PlcException.cs                 |  39 ++-
 .../api/exceptions/PlcInvalidFieldException.cs     |  33 +-
 plc4net/api/messages/IPlcFieldRequest.cs           |  52 ++++
 plc4net/api/messages/IPlcFieldResponse.cs          |  49 +++
 .../api/messages/IPlcMessage.cs                    |  14 +-
 .../api/messages/IPlcReadRequest.cs                |  28 +-
 .../api/messages/IPlcReadRequestBuilder.cs         |  39 +--
 .../api/messages/IPlcReadResponse.cs               |  27 +-
 .../api/messages/IPlcRequest.cs                    |  25 +-
 .../api/messages/IPlcRequestBuilder.cs             |  25 +-
 .../api/messages/IPlcResponse.cs                   |  22 +-
 .../api/messages/IPlcSubscriptionEventArgs.cs      |  24 +-
 .../api/messages/IPlcSubscriptionRequest.cs        |  14 +-
 .../api/messages/IPlcSubscriptionRequestBuilder.cs |  54 ++++
 .../api/messages/IPlcSubscriptionResponse.cs       |  33 +-
 .../api/messages/IPlcUnsubscriptionRequest.cs      |  28 +-
 .../messages/IPlcUnsubscriptionRequestBuilder.cs   |  45 +++
 .../api/messages/IPlcUnsubscriptionResponse.cs     |  16 +-
 .../api/messages/IPlcWriteRequest.cs               |  21 +-
 plc4net/api/messages/IPlcWriteRequestBuilder.cs    | 134 ++++++++
 plc4net/api/model/IPlcField.cs                     |  39 +++
 .../api/model/IPlcSubscriptionHandle.cs            |  24 +-
 {plc4cpp => plc4net/api}/pom.xml                   |  46 +--
 .../api/types/PlcResponseCode.cs                   |  24 +-
 .../plc4net.driver/plc4net.driver.csproj           |  16 +-
 {plc4cpp => plc4net/plc4net.driver}/pom.xml        |  42 +--
 plc4net/plc4net.sln                                |  44 +++
 {sandbox => plc4net}/pom.xml                       |  17 +-
 plc4py/pom.xml                                     |   4 +-
 pom.xml                                            |  15 +-
 src/site/asciidoc/developers/conferences.adoc      |   2 +-
 src/site/asciidoc/users/gettingstarted.adoc        |   3 +
 46 files changed, 1645 insertions(+), 326 deletions(-)
 create mode 100644 .vscode/settings.json
 create mode 100644 plc4j/src/site/asciidoc/users/gettingstarted.adoc
 create mode 100644 plc4net/.gitignore
 create mode 100644 plc4net/api/PlcDriverManager.cs
 copy protocols/knxnet-ip/src/main/resources/daffodil-built-in-catalog.xml => plc4net/api/api.csproj (80%)
 create mode 100644 plc4net/api/api/IPlcConnection.cs
 create mode 100644 plc4net/api/api/IPlcDriver.cs
 copy plc4j/api/src/main/java/org/apache/plc4x/java/api/exceptions/PlcUnsupportedOperationException.java => plc4net/api/api/authentication/IPlcAuthentication.cs (77%)
 create mode 100644 plc4net/api/api/authentication/PlcUsernamePasswordAuthentication.cs
 copy plc4cpp/protocols/driver-bases/base/src/main/cpp/org/apache/plc4x/cpp/base/messages/InternalPlcRequest.h => plc4net/api/api/metadata/IPlcConnectionMetadata.cs (60%)
 copy integrations/apache-camel/src/test/java/org/apache/plc4x/camel/ConstantsTest.java => plc4net/api/exceptions/PlcConnectionException.cs (53%)
 copy integrations/apache-camel/src/test/java/org/apache/plc4x/camel/ConstantsTest.java => plc4net/api/exceptions/PlcException.cs (53%)
 copy integrations/apache-camel/src/test/java/org/apache/plc4x/camel/ConstantsTest.java => plc4net/api/exceptions/PlcInvalidFieldException.cs (56%)
 create mode 100644 plc4net/api/messages/IPlcFieldRequest.cs
 create mode 100644 plc4net/api/messages/IPlcFieldResponse.cs
 copy plc4j/api/src/main/java/org/apache/plc4x/java/api/messages/PlcRequestBuilder.java => plc4net/api/messages/IPlcMessage.cs (81%)
 copy plc4cpp/protocols/driver-bases/base/src/main/cpp/org/apache/plc4x/cpp/base/connection/ChannelFactory.cpp => plc4net/api/messages/IPlcReadRequest.cs (79%)
 copy plc4j/protocols/driver-bases/test/src/main/java/org/apache/plc4x/java/base/connection/TestChannelFactory.java => plc4net/api/messages/IPlcReadRequestBuilder.cs (56%)
 copy plc4cpp/protocols/driver-bases/base/src/main/cpp/org/apache/plc4x/cpp/base/messages/InternalPlcProprietaryRequest.cpp => plc4net/api/messages/IPlcReadResponse.cs (78%)
 copy plc4j/utils/raw-sockets/src/main/java/org/apache/plc4x/java/utils/rawsockets/netty/RawSocketChannelOption.java => plc4net/api/messages/IPlcRequest.cs (62%)
 copy plc4j/utils/raw-sockets/src/main/java/org/apache/plc4x/java/utils/rawsockets/netty/RawSocketChannelOption.java => plc4net/api/messages/IPlcRequestBuilder.cs (61%)
 copy integrations/apache-camel/src/main/java/org/apache/plc4x/camel/Constants.java => plc4net/api/messages/IPlcResponse.cs (70%)
 copy plc4j/utils/raw-sockets/src/main/java/org/apache/plc4x/java/utils/rawsockets/netty/RawSocketChannelOption.java => plc4net/api/messages/IPlcSubscriptionEventArgs.cs (68%)
 copy plc4j/api/src/main/java/org/apache/plc4x/java/api/exceptions/PlcUnsupportedOperationException.java => plc4net/api/messages/IPlcSubscriptionRequest.cs (78%)
 create mode 100644 plc4net/api/messages/IPlcSubscriptionRequestBuilder.cs
 copy integrations/apache-camel/src/test/java/org/apache/plc4x/camel/ConstantsTest.java => plc4net/api/messages/IPlcSubscriptionResponse.cs (51%)
 copy plc4cpp/protocols/driver-bases/base/src/main/cpp/org/apache/plc4x/cpp/base/connection/ChannelFactory.cpp => plc4net/api/messages/IPlcUnsubscriptionRequest.cs (79%)
 create mode 100644 plc4net/api/messages/IPlcUnsubscriptionRequestBuilder.cs
 copy plc4j/api/src/main/java/org/apache/plc4x/java/api/exceptions/PlcUnsupportedOperationException.java => plc4net/api/messages/IPlcUnsubscriptionResponse.cs (78%)
 copy integrations/apache-camel/src/main/java/org/apache/plc4x/camel/Constants.java => plc4net/api/messages/IPlcWriteRequest.cs (71%)
 create mode 100644 plc4net/api/messages/IPlcWriteRequestBuilder.cs
 create mode 100644 plc4net/api/model/IPlcField.cs
 copy plc4j/utils/raw-sockets/src/main/java/org/apache/plc4x/java/utils/rawsockets/netty/RawSocketChannelOption.java => plc4net/api/model/IPlcSubscriptionHandle.cs (65%)
 copy {plc4cpp => plc4net/api}/pom.xml (56%)
 copy integrations/apache-camel/src/main/java/org/apache/plc4x/camel/Constants.java => plc4net/api/types/PlcResponseCode.cs (72%)
 copy protocols/knxnet-ip/src/main/resources/daffodil-built-in-catalog.xml => plc4net/plc4net.driver/plc4net.driver.csproj (70%)
 copy {plc4cpp => plc4net/plc4net.driver}/pom.xml (62%)
 create mode 100644 plc4net/plc4net.sln
 copy {sandbox => plc4net}/pom.xml (76%)


[plc4x] 10/12: - Added some documentation on how to use PLC4J - Added a warning to the windows installation guide (If you don't run the setup, things will be problematic)

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

jfeinauer pushed a commit to branch feature/code-gen
in repository https://gitbox.apache.org/repos/asf/plc4x.git

commit 8a59973d3907c6eac59ba07fdf0f09637f8900e1
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Sun May 5 13:38:26 2019 +0200

    - Added some documentation on how to use PLC4J
    - Added a warning to the windows installation guide (If you don't run the setup, things will be problematic)
---
 README                                            |   5 +
 plc4j/src/site/asciidoc/users/gettingstarted.adoc | 178 ++++++++++++++++++++++
 pom.xml                                           |   1 +
 src/site/asciidoc/users/gettingstarted.adoc       |   3 +
 4 files changed, 187 insertions(+)

diff --git a/README b/README
index a22df76..cba79a5 100644
--- a/README
+++ b/README
@@ -85,6 +85,11 @@ When running the installer, make sure to select the options:
 - x86_64
 Not quite sure which elements are really needed, better just install all of them.
 
+WARNING: If you don't use the installer version of the distribution. The build will probably fail and it will be pretty
+impossible to see the problem. When manually executing the command, a popup will appear complaining about not being able
+to find some DLL. So if you are having these problems, please try using the installer instead of the manually unpackable
+archive.
+
 For Bison, please download the Setup installer version from here: http://gnuwin32.sourceforge.net/packages/bison.htm (When using the zip version the bison.exe couldn't find some DLL files)
 It seems the official 2.4.1 version has issues when installed in a directory which's path contains spaces. Please make sure you replace the exe with a patched version form here: http://marin.jb.free.fr/bison/bison-2.4.1-modified.zip
 (More infos on this issue here: https://sourceforge.net/p/gnuwin32/bugs/473/)
diff --git a/plc4j/src/site/asciidoc/users/gettingstarted.adoc b/plc4j/src/site/asciidoc/users/gettingstarted.adoc
new file mode 100644
index 0000000..c2a692d
--- /dev/null
+++ b/plc4j/src/site/asciidoc/users/gettingstarted.adoc
@@ -0,0 +1,178 @@
+//
+//  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.
+//
+
+== Getting Started
+
+=== Using the PLC4X API directly
+
+In order to write a valid PLC4X Java application, all you need, is to add a dependency to the `api module`.
+When using Maven, all you need to do is add this dependency:
+
+[subs=attributes+]
+----
+    <dependency>
+      <groupId>org.apache.plc4x</groupId>
+      <artifactId>plc4j-api</artifactId>
+      <version>{project-version}</version>
+    </dependency>
+----
+
+This will allow you to write a valid application, that compiles fine.
+However in order to actually connect to a device using a given protocol, you need to add this protocol implementation to the classpath.
+
+For example in order to communicate with an `S7 device` using the `S7 Protocol`, you would need to add the following dependency:
+
+[subs=attributes+]
+----
+    <dependency>
+      <groupId>org.apache.plc4x</groupId>
+      <artifactId>plc4j-driver-s7</artifactId>
+      <version>{project-version}</version>
+      <scope>runtime</scope>
+    </dependency>
+----
+
+So as soon as your project has the API and a driver implementation available, you first need to get a `PlcConnection` instance.
+This is done via the `PlcDriverManager` by asking this to create an instance for a given `PLC4X connection string`.
+
+----
+String connectionString = "s7://10.10.64.20/1/1";
+
+try (PlcConnection plcConnection = new PlcDriverManager().getConnection(connectionString)) {
+
+  ... do something with the connection here ...
+
+}
+----
+
+PLC4X generally supports a very limited set of functions, which is not due to the fact, that we didn't implement things, but that PLCs generally support a very limited set of functions.
+
+The basic functions supported by PLCs and therefore supported by PLC4X are:
+
+* Read data
+* Write data
+* Subscribe for data
+* Execute functions in the PLC
+* List resources in the PLC
+
+In general we will try to offer as many features as possible.
+So if a protocol doesn't support subscription based communication it is our goal to simulate this by polling in the background so it is transparent for the users.
+
+But there are some cases in which we can't simulate or features are simply disabled intentionally:
+
+* If a PLC and/or protocol don't support executing of functions, we simply can't provide this functionality.
+* We will be providing stripped down versions of drivers, that for example intentionally don't support any writing of data and executing of functions.
+
+Therefore we use metadata to check programmatically, if a given feature is available:
+
+----
+// Check if this connection support reading of data.
+if (!plcConnection.getMetadata().canRead()) {
+  logger.error("This connection doesn't support reading.");
+  return;
+}
+----
+
+As soon as you have ensured that a feature is available, you are ready to build a first request.
+This is done by getting a `PlcRequestBuilder`:
+
+----
+// Create a new read request:
+// - Give the single item requested the alias name "value"
+PlcReadRequest.Builder builder = plcConnection.readRequestBuilder();
+builder.addItem("value-1", "%Q0.4:BOOL");
+builder.addItem("value-2", "%Q0:BYTE");
+builder.addItem("value-3", "%I0.2:BOOL");
+builder.addItem("value-4", "%DB.DB1.4:INT");
+PlcReadRequest readRequest = builder.build();
+----
+
+
+So, as you can see, you prepare a request, by adding items to the request and in the end by calling the `build` method.
+
+The request is sent to the PLC by issuing the `execute` method on the request object:
+
+----
+CompletableFuture<? extends PlcReadResponse> asyncResponse = readRequest.execute();
+asyncResponse.whenComplete((response, throwable) -> {
+  ... process the response ...
+});
+----
+
+In general all requests are executed asynchronously.
+So as soon as the request is fully processed, the callback gets called and will contain a `readResponse`, if everything went right or a `throwable` if there were problems.
+
+However if you want to write your code in a more synchronous fashion, the following alternative will provide this:
+
+----
+PlcReadResponse response = readRequest.execute().get();
+----
+
+Processing of the responses is identical in both cases.
+The following example will demonstrate some of the options you have:
+
+----
+for (String fieldName : response.getFieldNames()) {
+    if(response.getResponseCode(fieldName) == PlcResponseCode.OK) {
+        int numValues = response.getNumberOfValues(fieldName);
+        // If it's just one element, output just one single line.
+        if(numValues == 1) {
+            logger.info("Value[" + fieldName + "]: " + response.getObject(fieldName));
+        }
+        // If it's more than one element, output each in a single row.
+        else {
+            logger.info("Value[" + fieldName + "]:");
+            for(int i = 0; i < numValues; i++) {
+                logger.info(" - " + response.getObject(fieldName, i));
+            }
+        }
+    }
+    // Something went wrong, to output an error message instead.
+    else {
+        logger.error("Error[" + fieldName + "]: " + response.getResponseCode(fieldName).name());
+    }
+}
+----
+
+In the for loop, we are demonstrating how the user can iterate over the address aliases in the response.
+In case of an ordinary read request, this will be predefined by the items in the request, however in case of a subscription response, the response might only contain some of the items that were subscribed.
+
+Before accessing the data, it is advisable to check if an item was correctly returned.
+This is done by the `getResponseCode` method for a given alias.
+If this is `PlcResponseCode.OK`, everything is ok, however it could be one of the following:
+
+- NOT_FOUND
+- ACCESS_DENIED
+- INVALID_ADDRESS
+- INVALID_DATATYPE
+- INTERNAL_ERROR
+- RESPONSE_PENDING
+
+Assuming the return code was `OK`, we can continue accessing the data.
+
+As some addresses support reading arrays, with the method `getNumberOfValues` the user can check how many items of a given type are returned.
+For convenience the response object has single-argument methods for accessing the data, which default to returning the first element.
+
+    response.getObject(fieldName)
+
+If you want to access a given element number, please use the two-argument version instead:
+
+    response.getObject(fieldName, 42)
+
+PLC4X provides getters and setters for a wide variety of Java types and automatically handles the type conversion.
+However when for example trying to get a long-value as a byte and the long-value exceeds the range supported by the smaller type, a `RuntimeException` of type `PlcIncompatibleDatatypeException`.
+In order to avoid causing this exception to be thrown, however there are `isValid{TypeName}` methods that you can use to check if the value is compatible.
diff --git a/pom.xml b/pom.xml
index ff37648..7129389 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1038,6 +1038,7 @@
               <attributes>
                 <source-highlighter>prettify</source-highlighter>
                 <imagesoutdir>${project.build.directory}/site/images</imagesoutdir>
+                <project-version>${project.version}</project-version>
               </attributes>
               <requires>
                 <require>asciidoctor-diagram</require>
diff --git a/src/site/asciidoc/users/gettingstarted.adoc b/src/site/asciidoc/users/gettingstarted.adoc
index c975484..6de1c67 100644
--- a/src/site/asciidoc/users/gettingstarted.adoc
+++ b/src/site/asciidoc/users/gettingstarted.adoc
@@ -17,5 +17,8 @@
 
 == Getting Started
 
+Depending on the programming language, the usage will differ, therefore please go to the `Getting Started` version of the language of choice.
 
+=== Java
 
+For guides on how to write PLC4X applications with Java, please go to the link:../plc4j/users/gettingstarted.html[Java Getting Started]
\ No newline at end of file


[plc4x] 09/12: - Moved up the format descriptor to the top or visual studio won't be able to read the solution.

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

jfeinauer pushed a commit to branch feature/code-gen
in repository https://gitbox.apache.org/repos/asf/plc4x.git

commit 399d634374d0ac39e93a35639e6e8c7c0f2dca0e
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Sun May 5 11:14:06 2019 +0200

    - Moved up the format descriptor to the top or visual studio won't be able to read the solution.
---
 plc4net/plc4net.sln | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/plc4net/plc4net.sln b/plc4net/plc4net.sln
index 0f4ddcc..a872a2d 100644
--- a/plc4net/plc4net.sln
+++ b/plc4net/plc4net.sln
@@ -1,4 +1,6 @@
-#
+Microsoft Visual Studio Solution File, Format Version 12.00
+
+#
 # 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
@@ -17,7 +19,6 @@
 # under the License.
 #
 
-Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio Version 16
 VisualStudioVersion = 16.0.28803.156
 MinimumVisualStudioVersion = 10.0.40219.1


[plc4x] 08/12: - Fine tuned the build and integrated it to maven

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

jfeinauer pushed a commit to branch feature/code-gen
in repository https://gitbox.apache.org/repos/asf/plc4x.git

commit 10011f93905a8f1770b325798b9e461faab44f45
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Sat May 4 21:31:34 2019 +0200

    - Fine tuned the build and integrated it to maven
---
 README                                             | 16 +++--
 plc4net/{plc4net => api}/PlcDriverManager.cs       |  0
 plc4net/api/api.csproj                             | 27 ++++++++
 plc4net/{plc4net => api}/api/IPlcConnection.cs     |  8 +--
 plc4net/{plc4net => api}/api/IPlcDriver.cs         |  0
 .../api/authentication/IPlcAuthentication.cs       |  0
 .../PlcUsernamePasswordAuthentication.cs           |  0
 .../api/metadata/IPlcConnectionMetadata.cs         |  0
 .../exceptions/PlcConnectionException.cs           |  0
 .../{plc4net => api}/exceptions/PlcException.cs    |  0
 .../exceptions/PlcInvalidFieldException.cs         |  0
 .../{plc4net => api}/messages/IPlcFieldRequest.cs  |  0
 .../{plc4net => api}/messages/IPlcFieldResponse.cs |  0
 plc4net/{plc4net => api}/messages/IPlcMessage.cs   |  0
 .../{plc4net => api}/messages/IPlcReadRequest.cs   |  0
 .../messages/IPlcReadRequestBuilder.cs             |  0
 .../{plc4net => api}/messages/IPlcReadResponse.cs  |  0
 plc4net/{plc4net => api}/messages/IPlcRequest.cs   |  0
 .../messages/IPlcRequestBuilder.cs                 |  0
 plc4net/{plc4net => api}/messages/IPlcResponse.cs  |  0
 .../messages/IPlcSubscriptionEventArgs.cs          |  0
 .../messages/IPlcSubscriptionRequest.cs            |  0
 .../messages/IPlcSubscriptionRequestBuilder.cs     |  0
 .../messages/IPlcSubscriptionResponse.cs           |  0
 .../messages/IPlcUnsubscriptionRequest.cs          |  0
 .../messages/IPlcUnsubscriptionRequestBuilder.cs   |  0
 .../messages/IPlcUnsubscriptionResponse.cs         |  0
 .../{plc4net => api}/messages/IPlcWriteRequest.cs  |  0
 .../messages/IPlcWriteRequestBuilder.cs            |  0
 plc4net/{plc4net => api}/model/IPlcField.cs        |  0
 .../model/IPlcSubscriptionHandle.cs                |  0
 plc4net/api/pom.xml                                | 72 ++++++++++++++++++++++
 plc4net/{plc4net => api}/types/PlcResponseCode.cs  |  0
 plc4net/plc4net.driver/IPlcDriver.cs               | 10 ---
 plc4net/plc4net.driver/plc4net.driver.csproj       | 22 +++++++
 plc4net/plc4net.driver/pom.xml                     | 68 ++++++++++++++++++++
 plc4net/plc4net.sln                                | 22 ++++++-
 plc4net/plc4net/plc4net.csproj                     | 10 ---
 plc4net/pom.xml                                    | 46 ++++++++++++++
 pom.xml                                            | 10 +++
 40 files changed, 281 insertions(+), 30 deletions(-)

diff --git a/README b/README
index edd064d..a22df76 100644
--- a/README
+++ b/README
@@ -42,6 +42,10 @@ If you're building a source-distribution and haven't installed git yet, be sure
 
     sudo get install git
 
+In order to build the .Net version, please install the .Net package according to this guide:
+
+https://dev.to/carlos487/installing-dotnet-core-in-ubuntu-1804-7lp
+
 Mac
 ---
 
@@ -61,15 +65,19 @@ Install `Python 2.7`:
 
 Be sure to re-open the command window or the changes will not apply.
 
+If you're going to build the `with-dotnet` profile you also need to install DotNet.
+Please download it from: https://dotnet.microsoft.com/download and run the installer.
+
 Windows
 -------
 
 Some tools need to be installed before being able to build on Windows:
 
-- WinBuilds
-- Bison
-- Flex
-- Python 2.7
+- WinBuilds (for `with-cpp`, `with-proxies` profiles)
+- Bison (for `with-cpp` profiles)
+- Flex (for `with-cpp` profiles)
+- Python 2.7 (for `with-python`, `with-proxies` profiles)
+- Dotnet (for `with-dotnet` profiles)
 
 He have tested WinBuilds with the bundle of: http://win-builds.org/doku.php/download_and_installation_from_windows
 When running the installer, make sure to select the options:
diff --git a/plc4net/plc4net/PlcDriverManager.cs b/plc4net/api/PlcDriverManager.cs
similarity index 100%
rename from plc4net/plc4net/PlcDriverManager.cs
rename to plc4net/api/PlcDriverManager.cs
diff --git a/plc4net/api/api.csproj b/plc4net/api/api.csproj
new file mode 100644
index 0000000..eb00812
--- /dev/null
+++ b/plc4net/api/api.csproj
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<Project Sdk="Microsoft.NET.Sdk">
+
+  <PropertyGroup>
+    <TargetFramework>netstandard2.0</TargetFramework>
+    <RootNamespace>org.apache.plc4net</RootNamespace>
+  </PropertyGroup>
+
+</Project>
diff --git a/plc4net/plc4net/api/IPlcConnection.cs b/plc4net/api/api/IPlcConnection.cs
similarity index 91%
rename from plc4net/plc4net/api/IPlcConnection.cs
rename to plc4net/api/api/IPlcConnection.cs
index 0b4ad43..cc22990 100644
--- a/plc4net/plc4net/api/IPlcConnection.cs
+++ b/plc4net/api/api/IPlcConnection.cs
@@ -66,24 +66,24 @@ namespace org.apache.plc4net.api
         /// Request builder for constructing read requests
         /// </summary>
         /// <returns>null if the connection does not support reading</returns>
-        IPlcReadRequestBuilder? ReadRequestBuilder { get; }
+        IPlcReadRequestBuilder ReadRequestBuilder { get; }
 
         /// <summary>
         /// Request builder for constructing write requests
         /// </summary>
         /// <returns>null if the connection does not support writing</returns>
-        IPlcWriteRequestBuilder? WriteRequestBuilder { get; }
+        IPlcWriteRequestBuilder WriteRequestBuilder { get; }
 
         /// <summary>
         /// Request builder for constructing subscription requests
         /// </summary>
         /// <returns>null if the connection does not support subscriptions</returns>
-        IPlcSubscriptionRequestBuilder? SubscriptionRequestBuilder { get; }
+        IPlcSubscriptionRequestBuilder SubscriptionRequestBuilder { get; }
 
         /// <summary>
         /// Request builder for unsubscribing
         /// </summary>
         /// <returns>null if the connection does not support subscriptions</returns>
-        IPlcUnsubscriptionRequestBuilder? UnsubscriptionRequestBuilder { get; }
+        IPlcUnsubscriptionRequestBuilder UnsubscriptionRequestBuilder { get; }
     }
 }
\ No newline at end of file
diff --git a/plc4net/plc4net/api/IPlcDriver.cs b/plc4net/api/api/IPlcDriver.cs
similarity index 100%
rename from plc4net/plc4net/api/IPlcDriver.cs
rename to plc4net/api/api/IPlcDriver.cs
diff --git a/plc4net/plc4net/api/authentication/IPlcAuthentication.cs b/plc4net/api/api/authentication/IPlcAuthentication.cs
similarity index 100%
rename from plc4net/plc4net/api/authentication/IPlcAuthentication.cs
rename to plc4net/api/api/authentication/IPlcAuthentication.cs
diff --git a/plc4net/plc4net/api/authentication/PlcUsernamePasswordAuthentication.cs b/plc4net/api/api/authentication/PlcUsernamePasswordAuthentication.cs
similarity index 100%
rename from plc4net/plc4net/api/authentication/PlcUsernamePasswordAuthentication.cs
rename to plc4net/api/api/authentication/PlcUsernamePasswordAuthentication.cs
diff --git a/plc4net/plc4net/api/metadata/IPlcConnectionMetadata.cs b/plc4net/api/api/metadata/IPlcConnectionMetadata.cs
similarity index 100%
rename from plc4net/plc4net/api/metadata/IPlcConnectionMetadata.cs
rename to plc4net/api/api/metadata/IPlcConnectionMetadata.cs
diff --git a/plc4net/plc4net/exceptions/PlcConnectionException.cs b/plc4net/api/exceptions/PlcConnectionException.cs
similarity index 100%
rename from plc4net/plc4net/exceptions/PlcConnectionException.cs
rename to plc4net/api/exceptions/PlcConnectionException.cs
diff --git a/plc4net/plc4net/exceptions/PlcException.cs b/plc4net/api/exceptions/PlcException.cs
similarity index 100%
rename from plc4net/plc4net/exceptions/PlcException.cs
rename to plc4net/api/exceptions/PlcException.cs
diff --git a/plc4net/plc4net/exceptions/PlcInvalidFieldException.cs b/plc4net/api/exceptions/PlcInvalidFieldException.cs
similarity index 100%
rename from plc4net/plc4net/exceptions/PlcInvalidFieldException.cs
rename to plc4net/api/exceptions/PlcInvalidFieldException.cs
diff --git a/plc4net/plc4net/messages/IPlcFieldRequest.cs b/plc4net/api/messages/IPlcFieldRequest.cs
similarity index 100%
rename from plc4net/plc4net/messages/IPlcFieldRequest.cs
rename to plc4net/api/messages/IPlcFieldRequest.cs
diff --git a/plc4net/plc4net/messages/IPlcFieldResponse.cs b/plc4net/api/messages/IPlcFieldResponse.cs
similarity index 100%
rename from plc4net/plc4net/messages/IPlcFieldResponse.cs
rename to plc4net/api/messages/IPlcFieldResponse.cs
diff --git a/plc4net/plc4net/messages/IPlcMessage.cs b/plc4net/api/messages/IPlcMessage.cs
similarity index 100%
rename from plc4net/plc4net/messages/IPlcMessage.cs
rename to plc4net/api/messages/IPlcMessage.cs
diff --git a/plc4net/plc4net/messages/IPlcReadRequest.cs b/plc4net/api/messages/IPlcReadRequest.cs
similarity index 100%
rename from plc4net/plc4net/messages/IPlcReadRequest.cs
rename to plc4net/api/messages/IPlcReadRequest.cs
diff --git a/plc4net/plc4net/messages/IPlcReadRequestBuilder.cs b/plc4net/api/messages/IPlcReadRequestBuilder.cs
similarity index 100%
rename from plc4net/plc4net/messages/IPlcReadRequestBuilder.cs
rename to plc4net/api/messages/IPlcReadRequestBuilder.cs
diff --git a/plc4net/plc4net/messages/IPlcReadResponse.cs b/plc4net/api/messages/IPlcReadResponse.cs
similarity index 100%
rename from plc4net/plc4net/messages/IPlcReadResponse.cs
rename to plc4net/api/messages/IPlcReadResponse.cs
diff --git a/plc4net/plc4net/messages/IPlcRequest.cs b/plc4net/api/messages/IPlcRequest.cs
similarity index 100%
rename from plc4net/plc4net/messages/IPlcRequest.cs
rename to plc4net/api/messages/IPlcRequest.cs
diff --git a/plc4net/plc4net/messages/IPlcRequestBuilder.cs b/plc4net/api/messages/IPlcRequestBuilder.cs
similarity index 100%
rename from plc4net/plc4net/messages/IPlcRequestBuilder.cs
rename to plc4net/api/messages/IPlcRequestBuilder.cs
diff --git a/plc4net/plc4net/messages/IPlcResponse.cs b/plc4net/api/messages/IPlcResponse.cs
similarity index 100%
rename from plc4net/plc4net/messages/IPlcResponse.cs
rename to plc4net/api/messages/IPlcResponse.cs
diff --git a/plc4net/plc4net/messages/IPlcSubscriptionEventArgs.cs b/plc4net/api/messages/IPlcSubscriptionEventArgs.cs
similarity index 100%
rename from plc4net/plc4net/messages/IPlcSubscriptionEventArgs.cs
rename to plc4net/api/messages/IPlcSubscriptionEventArgs.cs
diff --git a/plc4net/plc4net/messages/IPlcSubscriptionRequest.cs b/plc4net/api/messages/IPlcSubscriptionRequest.cs
similarity index 100%
rename from plc4net/plc4net/messages/IPlcSubscriptionRequest.cs
rename to plc4net/api/messages/IPlcSubscriptionRequest.cs
diff --git a/plc4net/plc4net/messages/IPlcSubscriptionRequestBuilder.cs b/plc4net/api/messages/IPlcSubscriptionRequestBuilder.cs
similarity index 100%
rename from plc4net/plc4net/messages/IPlcSubscriptionRequestBuilder.cs
rename to plc4net/api/messages/IPlcSubscriptionRequestBuilder.cs
diff --git a/plc4net/plc4net/messages/IPlcSubscriptionResponse.cs b/plc4net/api/messages/IPlcSubscriptionResponse.cs
similarity index 100%
rename from plc4net/plc4net/messages/IPlcSubscriptionResponse.cs
rename to plc4net/api/messages/IPlcSubscriptionResponse.cs
diff --git a/plc4net/plc4net/messages/IPlcUnsubscriptionRequest.cs b/plc4net/api/messages/IPlcUnsubscriptionRequest.cs
similarity index 100%
rename from plc4net/plc4net/messages/IPlcUnsubscriptionRequest.cs
rename to plc4net/api/messages/IPlcUnsubscriptionRequest.cs
diff --git a/plc4net/plc4net/messages/IPlcUnsubscriptionRequestBuilder.cs b/plc4net/api/messages/IPlcUnsubscriptionRequestBuilder.cs
similarity index 100%
rename from plc4net/plc4net/messages/IPlcUnsubscriptionRequestBuilder.cs
rename to plc4net/api/messages/IPlcUnsubscriptionRequestBuilder.cs
diff --git a/plc4net/plc4net/messages/IPlcUnsubscriptionResponse.cs b/plc4net/api/messages/IPlcUnsubscriptionResponse.cs
similarity index 100%
rename from plc4net/plc4net/messages/IPlcUnsubscriptionResponse.cs
rename to plc4net/api/messages/IPlcUnsubscriptionResponse.cs
diff --git a/plc4net/plc4net/messages/IPlcWriteRequest.cs b/plc4net/api/messages/IPlcWriteRequest.cs
similarity index 100%
rename from plc4net/plc4net/messages/IPlcWriteRequest.cs
rename to plc4net/api/messages/IPlcWriteRequest.cs
diff --git a/plc4net/plc4net/messages/IPlcWriteRequestBuilder.cs b/plc4net/api/messages/IPlcWriteRequestBuilder.cs
similarity index 100%
rename from plc4net/plc4net/messages/IPlcWriteRequestBuilder.cs
rename to plc4net/api/messages/IPlcWriteRequestBuilder.cs
diff --git a/plc4net/plc4net/model/IPlcField.cs b/plc4net/api/model/IPlcField.cs
similarity index 100%
rename from plc4net/plc4net/model/IPlcField.cs
rename to plc4net/api/model/IPlcField.cs
diff --git a/plc4net/plc4net/model/IPlcSubscriptionHandle.cs b/plc4net/api/model/IPlcSubscriptionHandle.cs
similarity index 100%
rename from plc4net/plc4net/model/IPlcSubscriptionHandle.cs
rename to plc4net/api/model/IPlcSubscriptionHandle.cs
diff --git a/plc4net/api/pom.xml b/plc4net/api/pom.xml
new file mode 100644
index 0000000..b531d23
--- /dev/null
+++ b/plc4net/api/pom.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.plc4x</groupId>
+    <artifactId>plc4net</artifactId>
+    <version>0.4.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>plc4net-api</artifactId>
+  <packaging>pom</packaging>
+
+  <name>PLC4Net: API</name>
+  <description>Implementation of the protocol adapters for usage as .Net module.</description>
+
+  <!-- Disabled for now as C# support is currently not installed in Apache SonarQube -->
+  <!--properties>
+    <sonar.language>c#</sonar.language>
+  </properties-->
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>exec-maven-plugin</artifactId>
+        <version>1.6.0</version>
+        <executions>
+          <execution>
+            <id>dotnet-build</id>
+            <phase>compile</phase>
+            <goals>
+              <goal>exec</goal>
+            </goals>
+            <configuration>
+              <executable>dotnet</executable>
+              <workingDirectory>${project.basedir}</workingDirectory>
+              <arguments>
+                <argument>build</argument>
+                <argument>api.csproj</argument>
+                <argument>--configuration=Debug</argument>
+                <argument>--framework=netstandard2.0</argument>
+                <argument>--output=${project.build.directory}/build</argument>
+                <argument>-p:Version=${project.version}</argument>
+              </arguments>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
\ No newline at end of file
diff --git a/plc4net/plc4net/types/PlcResponseCode.cs b/plc4net/api/types/PlcResponseCode.cs
similarity index 100%
rename from plc4net/plc4net/types/PlcResponseCode.cs
rename to plc4net/api/types/PlcResponseCode.cs
diff --git a/plc4net/plc4net.driver/IPlcDriver.cs b/plc4net/plc4net.driver/IPlcDriver.cs
deleted file mode 100644
index b6b1f99..0000000
--- a/plc4net/plc4net.driver/IPlcDriver.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-namespace plc4net.driver
-{
-    /// <summary>
-    /// Interface for PLC drivers to be implemented
-    /// </summary>
-    public interface IPlcDriver
-    {
-        IPlcC
-    }
-}
\ No newline at end of file
diff --git a/plc4net/plc4net.driver/plc4net.driver.csproj b/plc4net/plc4net.driver/plc4net.driver.csproj
index 9f5c4f4..e54dfc4 100644
--- a/plc4net/plc4net.driver/plc4net.driver.csproj
+++ b/plc4net/plc4net.driver/plc4net.driver.csproj
@@ -1,7 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
 <Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
+    <BaseOutputPath>target/classes</BaseOutputPath>
+    <BaseIntermediateOutputPath>target/classes-intermediate</BaseIntermediateOutputPath>
+    <RestoreOutputPath>target/restore-output-path</RestoreOutputPath>
   </PropertyGroup>
 
 </Project>
diff --git a/plc4net/plc4net.driver/pom.xml b/plc4net/plc4net.driver/pom.xml
new file mode 100644
index 0000000..4be89de
--- /dev/null
+++ b/plc4net/plc4net.driver/pom.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.plc4x</groupId>
+    <artifactId>plc4net</artifactId>
+    <version>0.4.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>plc4net-driver</artifactId>
+  <packaging>pom</packaging>
+
+  <name>PLC4Net: Driver</name>
+  <description>Implementation of the protocol adapters for usage as .Net module.</description>
+
+  <!-- Disabled for now as C# support is currently not installed in Apache SonarQube -->
+  <!--properties>
+    <sonar.language>c#</sonar.language>
+  </properties-->
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>exec-maven-plugin</artifactId>
+        <version>1.6.0</version>
+        <executions>
+          <execution>
+            <id>dotnet-build</id>
+            <phase>compile</phase>
+            <goals>
+              <goal>exec</goal>
+            </goals>
+            <configuration>
+              <executable>dotnet</executable>
+              <workingDirectory>${project.basedir}</workingDirectory>
+              <arguments>
+                <argument>build</argument>
+                <argument>plc4net.driver.csproj</argument>
+              </arguments>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
\ No newline at end of file
diff --git a/plc4net/plc4net.sln b/plc4net/plc4net.sln
index 1781a3a..0f4ddcc 100644
--- a/plc4net/plc4net.sln
+++ b/plc4net/plc4net.sln
@@ -1,9 +1,27 @@
-
+#
+# 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.
+#
+
 Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio Version 16
 VisualStudioVersion = 16.0.28803.156
 MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "plc4net", "plc4net\plc4net.csproj", "{343770DC-ECE5-4131-9066-A09C120BB3D9}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "api", "plc4net\plc4net.csproj", "{343770DC-ECE5-4131-9066-A09C120BB3D9}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
diff --git a/plc4net/plc4net/plc4net.csproj b/plc4net/plc4net/plc4net.csproj
deleted file mode 100644
index 5d10bac..0000000
--- a/plc4net/plc4net/plc4net.csproj
+++ /dev/null
@@ -1,10 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-
-  <PropertyGroup>
-    <TargetFramework>netstandard2.0</TargetFramework>
-    <RootNamespace>org.apache.plc4net</RootNamespace>
-    <LangVersion>8.0</LangVersion>
-    <NullableContextOptions>enable</NullableContextOptions>
-  </PropertyGroup>
-
-</Project>
diff --git a/plc4net/pom.xml b/plc4net/pom.xml
new file mode 100644
index 0000000..2b0123f
--- /dev/null
+++ b/plc4net/pom.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.plc4x</groupId>
+    <artifactId>plc4x-parent</artifactId>
+    <version>0.4.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>plc4net</artifactId>
+  <packaging>pom</packaging>
+
+  <name>PLC4Net</name>
+  <description>Implementation of the protocol adapters for usage as .Net module.</description>
+
+  <!-- Disabled for now as C# support is currently not installed in Apache SonarQube -->
+  <!--properties>
+    <sonar.language>c#</sonar.language>
+  </properties-->
+
+  <modules>
+    <module>api</module>
+    <!--module>plc4net.driver</module-->
+  </modules>
+
+</project>
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 6494c96..ff37648 100644
--- a/pom.xml
+++ b/pom.xml
@@ -735,6 +735,9 @@
             <!-- CLion stuff (C++ IDE) -->
             <exclude>**/cmake-build-debug/**</exclude>
 
+            <!-- Stuff created during a plc4net build -->
+            <exclude>**/obj/**</exclude>
+
             <!-- Temporarily exclude generated code from thrift in python modules -->
             <exclude>generated/**</exclude>
 
@@ -1244,6 +1247,13 @@
     </profile>
 
     <profile>
+      <id>with-dotnet</id>
+      <modules>
+        <module>plc4net</module>
+      </modules>
+    </profile>
+
+    <profile>
       <id>with-python</id>
       <modules>
         <module>plc4py</module>


[plc4x] 03/12: - Added a new exclusion for Eclipse settings files ".factorypath"

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

jfeinauer pushed a commit to branch feature/code-gen
in repository https://gitbox.apache.org/repos/asf/plc4x.git

commit 3a37395f511f4aa9346faeeb0d9a22a6a0b06997
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Sat May 4 14:27:22 2019 +0200

    - Added a new exclusion for Eclipse settings files ".factorypath"
---
 pom.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pom.xml b/pom.xml
index 7470f58..6494c96 100644
--- a/pom.xml
+++ b/pom.xml
@@ -708,6 +708,7 @@
             <exclude>**/.project</exclude>
             <exclude>**/.settings/**</exclude>
             <exclude>**/.classpath</exclude>
+            <exclude>**/.factorypath</exclude>
 
             <!-- IntelliJ related files -->
             <exclude>**/.idea/**</exclude>


[plc4x] 11/12: - Enabled the .Net build in the Jenkinsfile

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

jfeinauer pushed a commit to branch feature/code-gen
in repository https://gitbox.apache.org/repos/asf/plc4x.git

commit 86cc7ab4d234e07d901840295b3daf23e34a6e77
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Sun May 5 14:00:00 2019 +0200

    - Enabled the .Net build in the Jenkinsfile
---
 Jenkinsfile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 840d7c8..7e64940 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -106,7 +106,7 @@ pipeline {
 
                 // We'll deploy to a relative directory so we can save
                 // that and deploy in a later step on a different node
-                sh 'mvn -P${JENKINS_PROFILE},development,with-cpp,with-python,with-proxies,with-sandbox ${MVN_TEST_FAIL_IGNORE} ${JQASSISTANT_NEO4J_VERSION} -DaltDeploymentRepository=snapshot-repo::default::file:./local-snapshots-dir clean deploy'
+                sh 'mvn -P${JENKINS_PROFILE},development,with-cpp,with-dotnet,with-python,with-proxies,with-sandbox ${MVN_TEST_FAIL_IGNORE} ${JQASSISTANT_NEO4J_VERSION} -DaltDeploymentRepository=snapshot-repo::default::file:./local-snapshots-dir clean deploy'
 
                 // Stash the build results so we can deploy them on another node
                 stash name: 'plc4x-build-snapshots', includes: 'local-snapshots-dir/**'
@@ -126,7 +126,7 @@ pipeline {
             steps {
                 echo 'Checking Code Quality'
                 withSonarQubeEnv('ASF Sonar Analysis') {
-                    sh 'mvn -P${JENKINS_PROFILE},with-cpp,with-python,with-proxies sonar:sonar'
+                    sh 'mvn -P${JENKINS_PROFILE},with-cpp,with-dotnet,with-python,with-proxies sonar:sonar'
                 }
             }
         }


[plc4x] 07/12: Added vscode files to gitignore

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

jfeinauer pushed a commit to branch feature/code-gen
in repository https://gitbox.apache.org/repos/asf/plc4x.git

commit fb0a08285e54613c100713410c0b20f4f0c573ba
Author: Björn Höper <ho...@ltsoft.de>
AuthorDate: Sat May 4 11:27:31 2019 +0200

    Added vscode files to gitignore
---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitignore b/.gitignore
index 5aeefeb..ac3cf67 100644
--- a/.gitignore
+++ b/.gitignore
@@ -94,3 +94,4 @@ plc4cpp/cmake-build-debug/
 # Exclude temporary python stuff
 plc4py/venv/
 **/__pycache__/**/*
+/plc4cpp/.vscode/ipch


[plc4x] 05/12: [PLC4X-110] Added core class implementation

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

jfeinauer pushed a commit to branch feature/code-gen
in repository https://gitbox.apache.org/repos/asf/plc4x.git

commit 1304684dbe0cd663edae8b43cf67d26036536880
Author: Björn Höper <ho...@ltsoft.de>
AuthorDate: Mon Apr 15 21:06:19 2019 +0200

    [PLC4X-110] Added core class implementation
---
 plc4net/plc4net.driver/IPlcDriver.cs               |  10 ++
 plc4net/plc4net.driver/plc4net.driver.csproj       |   7 ++
 plc4net/plc4net/PlcDriverManager.cs                | 104 +++++++++++++++++++++
 plc4net/plc4net/api/IPlcConnection.cs              |  50 ++++++++++
 plc4net/plc4net/api/IPlcDriver.cs                  |  56 +++++++++++
 .../api/authentication/IPlcAuthentication.cs       |  29 ++++++
 .../PlcUsernamePasswordAuthentication.cs           |  48 ++++++++++
 .../plc4net/api/metadata/IPlcConnectionMetadata.cs |  39 ++++++++
 .../plc4net/exceptions/PlcConnectionException.cs   |  50 ++++++++++
 plc4net/plc4net/exceptions/PlcException.cs         |  50 ++++++++++
 10 files changed, 443 insertions(+)

diff --git a/plc4net/plc4net.driver/IPlcDriver.cs b/plc4net/plc4net.driver/IPlcDriver.cs
new file mode 100644
index 0000000..b6b1f99
--- /dev/null
+++ b/plc4net/plc4net.driver/IPlcDriver.cs
@@ -0,0 +1,10 @@
+namespace plc4net.driver
+{
+    /// <summary>
+    /// Interface for PLC drivers to be implemented
+    /// </summary>
+    public interface IPlcDriver
+    {
+        IPlcC
+    }
+}
\ No newline at end of file
diff --git a/plc4net/plc4net.driver/plc4net.driver.csproj b/plc4net/plc4net.driver/plc4net.driver.csproj
new file mode 100644
index 0000000..9f5c4f4
--- /dev/null
+++ b/plc4net/plc4net.driver/plc4net.driver.csproj
@@ -0,0 +1,7 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+  <PropertyGroup>
+    <TargetFramework>netstandard2.0</TargetFramework>
+  </PropertyGroup>
+
+</Project>
diff --git a/plc4net/plc4net/PlcDriverManager.cs b/plc4net/plc4net/PlcDriverManager.cs
new file mode 100644
index 0000000..7597e3a
--- /dev/null
+++ b/plc4net/plc4net/PlcDriverManager.cs
@@ -0,0 +1,104 @@
+/*
+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.
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using org.apache.plc4net.api;
+using org.apache.plc4net.api.authentication;
+using org.apache.plc4net.exceptions;
+
+namespace org.apache.plc4net
+{
+    /// <summary>
+    /// Manages connections to PLCs
+    /// </summary>
+    public class PlcDriverManager
+    {
+        /// <summary>
+        /// Singleton instance of the manager
+        /// </summary>
+        private static PlcDriverManager _instance;
+
+        /// <summary>
+        /// Get the singleton instance
+        /// </summary>
+        public static PlcDriverManager Instance => _instance ?? (_instance = new PlcDriverManager());
+
+        /// <summary>
+        /// Dictionary for the drivers
+        /// </summary>
+        private readonly Dictionary<string, IPlcDriver> _drivers;
+
+        /// <summary>
+        /// Private constructor for the singleton driver manager.
+        /// </summary>
+        private PlcDriverManager()
+        {
+            _drivers = new Dictionary<string, IPlcDriver>();
+
+            /*
+             * TODO: Implement some mechanism to provide drivers -> MEF?
+             */
+        }
+
+        /// <summary>
+        /// Get the connection to the a PLC identified by the URL
+        /// </summary>
+        /// <param name="url">URL including the schema to connect to the PLC</param>
+        /// <param name="authentication">Authentication to use</param>
+        /// <returns>Created PLC connection</returns>
+        public async Task<IPlcConnection> GetConnection(string url, IPlcAuthentication authentication)
+        {
+            var plcDriver = GetDriver(url);
+            var connection = await plcDriver.ConnectAsync(url, authentication);
+            
+            //TODO: Does the driver method already connect or is a separate connect needed?
+            //TODO: Should we do it like this?
+            if (!connection.IsConnected)
+            {
+                await connection.ConnectAsync();
+            }
+
+            return connection;
+        }
+
+        public IPlcDriver GetDriver(string url)
+        {
+            try
+            {
+                Uri plcUri = new Uri(url);
+                var proto = plcUri.Scheme;
+
+                _drivers.TryGetValue(proto, out var plcDriver);
+
+                if (plcDriver == null)
+                {
+                    throw new PlcConnectionException($"Unknown driver for protocol '{proto}'");
+                }
+
+                return plcDriver;
+            }
+            catch (UriFormatException invalidUriException)
+            {
+                throw new PlcConnectionException($"Provided connection string '{url}' is invalid", invalidUriException);
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/plc4net/plc4net/api/IPlcConnection.cs b/plc4net/plc4net/api/IPlcConnection.cs
new file mode 100644
index 0000000..63be8dc
--- /dev/null
+++ b/plc4net/plc4net/api/IPlcConnection.cs
@@ -0,0 +1,50 @@
+/*
+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.
+*/
+
+using System;
+using System.Threading.Tasks;
+
+namespace org.apache.plc4net.api
+{
+    /// <inheritdoc />
+    /// <summary>
+    /// Interface for generalized PLC connections providing
+    /// functionality for basic operations like connect / disconnect etc.
+    /// </summary>
+    public interface IPlcConnection: IDisposable
+    {
+        /// <summary>
+        /// Connect to the PLC asynchronously
+        /// </summary>
+        /// <returns>Awaitable task</returns>
+        /// <exception cref="org.apache.plc4net.exceptions.PlcConnectionException">Thrown if the connection to the PLC fails</exception>
+        Task ConnectAsync();
+
+        /// <summary>
+        /// Indicates the connection state
+        /// </summary>
+        bool IsConnected { get; }
+
+        /// <summary>
+        /// Close the PLC connection asynchronously
+        /// </summary>
+        /// <returns>Awaitable task</returns>
+        Task CloseAsync();
+    }
+}
\ No newline at end of file
diff --git a/plc4net/plc4net/api/IPlcDriver.cs b/plc4net/plc4net/api/IPlcDriver.cs
new file mode 100644
index 0000000..6a969d9
--- /dev/null
+++ b/plc4net/plc4net/api/IPlcDriver.cs
@@ -0,0 +1,56 @@
+/*
+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.
+*/
+
+using System.Threading.Tasks;
+using org.apache.plc4net.api.authentication;
+
+namespace org.apache.plc4net.api
+{
+    /// <summary>
+    /// Interface for PLC drivers to be implemented
+    /// </summary>
+    public interface IPlcDriver
+    {
+        /// <summary>
+        /// Get the code of the implemented protocol
+        /// </summary>
+        string ProtocolCode { get; }
+
+        /// <summary>
+        /// Full Name of the implemented protocol
+        /// </summary>
+        string ProtocolName { get; }
+
+        /// <summary>
+        /// Connects to the PLC identified by the connection string
+        /// </summary>
+        /// <param name="connectionString">Connection string identifying the PLC to connect to</param>
+        /// <returns>Awaitable task returning the <see cref="IPlcConnection"/> to which the connection was established</returns>
+        /// <exception cref="org.apache.plc4net.exceptions.PlcConnectionException">Thrown on connection failure</exception>
+        Task<IPlcConnection> ConnectAsync(string connectionString);
+
+        /// <summary>
+        /// Connects to the PLC identified by the connection string and using the 
+        /// </summary>
+        /// <param name="connectionString"></param>
+        /// <param name="authentication"></param>
+        /// <returns></returns>
+        Task<IPlcConnection> ConnectAsync(string connectionString, IPlcAuthentication authentication);
+    }
+}
\ No newline at end of file
diff --git a/plc4net/plc4net/api/authentication/IPlcAuthentication.cs b/plc4net/plc4net/api/authentication/IPlcAuthentication.cs
new file mode 100644
index 0000000..4a94403
--- /dev/null
+++ b/plc4net/plc4net/api/authentication/IPlcAuthentication.cs
@@ -0,0 +1,29 @@
+/*
+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.
+*/
+
+namespace org.apache.plc4net.api.authentication
+{
+    /// <summary>
+    /// Base interface for possible authentication methods
+    /// used by the PLCs
+    /// </summary>
+    public interface IPlcAuthentication
+    {
+    }
+}
\ No newline at end of file
diff --git a/plc4net/plc4net/api/authentication/PlcUsernamePasswordAuthentication.cs b/plc4net/plc4net/api/authentication/PlcUsernamePasswordAuthentication.cs
new file mode 100644
index 0000000..2c7f52c
--- /dev/null
+++ b/plc4net/plc4net/api/authentication/PlcUsernamePasswordAuthentication.cs
@@ -0,0 +1,48 @@
+/*
+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.
+*/
+
+namespace org.apache.plc4net.api.authentication
+{
+    /// <summary>
+    /// Authentication using Username and Password
+    /// </summary>
+    public class PlcUsernamePasswordAuthentication : IPlcAuthentication
+    {
+        /// <summary>
+        /// Create a new instance using username and password
+        /// </summary>
+        /// <param name="username">Username to set</param>
+        /// <param name="password">Password to set</param>
+        public PlcUsernamePasswordAuthentication(string username, string password)
+        {
+            Username = username;
+            Password = password;
+        }
+
+        /// <summary>
+        /// Username
+        /// </summary>
+        public string Username { get; protected set; }
+
+        /// <summary>
+        /// Password
+        /// </summary>
+        public string Password { get; protected set; }
+    }
+}
\ No newline at end of file
diff --git a/plc4net/plc4net/api/metadata/IPlcConnectionMetadata.cs b/plc4net/plc4net/api/metadata/IPlcConnectionMetadata.cs
new file mode 100644
index 0000000..7504c91
--- /dev/null
+++ b/plc4net/plc4net/api/metadata/IPlcConnectionMetadata.cs
@@ -0,0 +1,39 @@
+/*
+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.
+*/
+
+namespace org.apache.plc4net.api.metadata
+{
+    public interface IPlcConnectionMetadata
+    {
+        /// <summary>
+        /// Indicates that the connection is able to read from the PLC
+        /// </summary>
+        bool CanRead { get; }
+
+        /// <summary>
+        /// Indicates that the connection is able to write to the PLC
+        /// </summary>
+        bool CanWrite { get; }
+
+        /// <summary>
+        /// Indicates that the connection is able to subscribe to PLC data
+        /// </summary>
+        bool CanSubscribe { get; }
+    }
+}
\ No newline at end of file
diff --git a/plc4net/plc4net/exceptions/PlcConnectionException.cs b/plc4net/plc4net/exceptions/PlcConnectionException.cs
new file mode 100644
index 0000000..bc6af44
--- /dev/null
+++ b/plc4net/plc4net/exceptions/PlcConnectionException.cs
@@ -0,0 +1,50 @@
+/*
+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.
+*/
+
+using System;
+using System.Runtime.Serialization;
+
+namespace org.apache.plc4net.exceptions
+{
+    /// <summary>
+    /// Exception raised when the connection to a
+    /// PLC fails
+    /// </summary>
+    [Serializable]
+    public class PlcConnectionException : PlcException
+    {
+        public PlcConnectionException()
+        {
+        }
+
+        public PlcConnectionException(string message) : base(message)
+        {
+        }
+
+        public PlcConnectionException(string message, Exception inner) : base(message, inner)
+        {
+        }
+
+        protected PlcConnectionException(
+            SerializationInfo info,
+            StreamingContext context) : base(info, context)
+        {
+        }
+    }
+}
\ No newline at end of file
diff --git a/plc4net/plc4net/exceptions/PlcException.cs b/plc4net/plc4net/exceptions/PlcException.cs
new file mode 100644
index 0000000..6345854
--- /dev/null
+++ b/plc4net/plc4net/exceptions/PlcException.cs
@@ -0,0 +1,50 @@
+/*
+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.
+*/
+
+using System;
+using System.Runtime.Serialization;
+
+namespace org.apache.plc4net.exceptions
+{
+    /// <summary>
+    /// General exception that gets thrown when errors while communicating
+    /// with PLC
+    /// </summary>
+    [Serializable]
+    public class PlcException : Exception
+    {        
+        public PlcException()
+        {
+        }
+
+        public PlcException(string message) : base(message)
+        {
+        }
+
+        public PlcException(string message, Exception inner) : base(message, inner)
+        {
+        }
+
+        protected PlcException(
+            SerializationInfo info,
+            StreamingContext context) : base(info, context)
+        {
+        }
+    }              
+}
\ No newline at end of file


[plc4x] 01/12: - Streamlined the calls to run python to be equal for compile and package

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

jfeinauer pushed a commit to branch feature/code-gen
in repository https://gitbox.apache.org/repos/asf/plc4x.git

commit 9749552eb8590716058ee11bee25a62a2489f33b
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Sat May 4 13:48:24 2019 +0200

    - Streamlined the calls to run python to be equal for compile and package
---
 plc4py/pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/plc4py/pom.xml b/plc4py/pom.xml
index 82fc4b4..661acc7 100644
--- a/plc4py/pom.xml
+++ b/plc4py/pom.xml
@@ -158,9 +158,9 @@
             </goals>
             <configuration>
               <executable>python</executable>
-              <workingDirectory>${project.basedir}</workingDirectory>
+              <workingDirectory>${project.build.directory}/python</workingDirectory>
               <arguments>
-                <argument>setup.py</argument>
+                <argument>../../setup.py</argument>
                 <argument>build</argument>
                 <argument>--build-base=${project.build.directory}/python</argument>
               </arguments>


[plc4x] 12/12: Fix link to material

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

jfeinauer pushed a commit to branch feature/code-gen
in repository https://gitbox.apache.org/repos/asf/plc4x.git

commit 5930763061edd7e17e33096770a13698481e106f
Author: Niklas Merz <ni...@linux.com>
AuthorDate: Sun May 5 12:11:56 2019 +0200

    Fix link to material
---
 src/site/asciidoc/developers/conferences.adoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/site/asciidoc/developers/conferences.adoc b/src/site/asciidoc/developers/conferences.adoc
index cf7ce62..fe79601 100644
--- a/src/site/asciidoc/developers/conferences.adoc
+++ b/src/site/asciidoc/developers/conferences.adoc
@@ -44,4 +44,4 @@ If you've got or found any events or talks we might be missing, please inform us
 
 == Additional Material
 
-PLC4X [Banner](../images/PLC4X_rollup_83x237cm-final.pdf)
+link:/images/PLC4X_rollup_83x237cm-final.pdf[PLC4X Banner]


[plc4x] 02/12: - Removed the double import of plc4py

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

jfeinauer pushed a commit to branch feature/code-gen
in repository https://gitbox.apache.org/repos/asf/plc4x.git

commit ad536e099343660f2883e426c52fea05469b19af
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Sat May 4 14:16:41 2019 +0200

    - Removed the double import of plc4py
---
 pom.xml | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/pom.xml b/pom.xml
index 6b68eff..7470f58 100644
--- a/pom.xml
+++ b/pom.xml
@@ -170,9 +170,6 @@
     <!--module>plc4cpp</module-->
     <module>plc4j</module>
 
-    <!-- Python language binding-->
-    <module>plc4py</module>
-
     <!-- Integration modules for other frameworks -->
     <module>integrations</module>
 


[plc4x] 04/12: [PLC4X-110] Added VS solution and project

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

jfeinauer pushed a commit to branch feature/code-gen
in repository https://gitbox.apache.org/repos/asf/plc4x.git

commit dcfac6f53ae96ab1620b143678be75ada08004e9
Author: Björn Höper <ho...@ltsoft.de>
AuthorDate: Sun Apr 14 09:50:48 2019 +0200

    [PLC4X-110] Added VS solution and project
    
    Initial commit for plc4net after creating the empty solution and project
---
 .vscode/settings.json          |   8 +
 plc4net/.gitignore             | 344 +++++++++++++++++++++++++++++++++++++++++
 plc4net/plc4net.sln            |  25 +++
 plc4net/plc4net/plc4net.csproj |   8 +
 4 files changed, 385 insertions(+)

diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..2421e38
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,8 @@
+{
+    "files.exclude": {
+        "**/.classpath": true,
+        "**/.project": true,
+        "**/.settings": true,
+        "**/.factorypath": true
+    }
+}
\ No newline at end of file
diff --git a/plc4net/.gitignore b/plc4net/.gitignore
new file mode 100644
index 0000000..912bc0a
--- /dev/null
+++ b/plc4net/.gitignore
@@ -0,0 +1,344 @@
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+##
+## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
+
+# User-specific files
+*.rsuser
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Mono auto generated files
+mono_crash.*
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+[Aa][Rr][Mm]/
+[Aa][Rr][Mm]64/
+bld/
+[Bb]in/
+[Oo]bj/
+[Ll]og/
+
+# Visual Studio 2015/2017 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+
+# Visual Studio 2017 auto generated files
+Generated\ Files/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUNIT
+*.VisualState.xml
+TestResult.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# Benchmark Results
+BenchmarkDotNet.Artifacts/
+
+# .NET Core
+project.lock.json
+project.fragment.lock.json
+artifacts/
+
+# StyleCop
+StyleCopReport.xml
+
+# Files built by Visual Studio
+*_i.c
+*_p.c
+*_h.h
+*.ilk
+*.meta
+*.obj
+*.iobj
+*.pch
+*.pdb
+*.ipdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*_wpftmp.csproj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opendb
+*.opensdf
+*.sdf
+*.cachefile
+*.VC.db
+*.VC.VC.opendb
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+*.sap
+
+# Visual Studio Trace Files
+*.e2e
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# JustCode is a .NET coding add-in
+.JustCode
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# AxoCover is a Code Coverage Tool
+.axoCover/*
+!.axoCover/settings.json
+
+# Visual Studio code coverage results
+*.coverage
+*.coveragexml
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+# Note: Comment the next line if you want to checkin your web deploy settings,
+# but database connection strings (with potential passwords) will be unencrypted
+*.pubxml
+*.publishproj
+
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+PublishScripts/
+
+# NuGet Packages
+*.nupkg
+# The packages folder can be ignored because of Package Restore
+**/[Pp]ackages/*
+# except build/, which is used as an MSBuild target.
+!**/[Pp]ackages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/[Pp]ackages/repositories.config
+# NuGet v3's project.json files produces more ignorable files
+*.nuget.props
+*.nuget.targets
+
+# Microsoft Azure Build Output
+csx/
+*.build.csdef
+
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Windows Store app package directories and files
+AppPackages/
+BundleArtifacts/
+Package.StoreAssociation.xml
+_pkginfo.txt
+*.appx
+*.appxbundle
+*.appxupload
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!?*.[Cc]ache/
+
+# Others
+ClientBin/
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.jfm
+*.pfx
+*.publishsettings
+orleans.codegen.cs
+
+# Including strong name files can present a security risk
+# (https://github.com/github/gitignore/pull/2483#issue-259490424)
+#*.snk
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+#bower_components/
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+ServiceFabricBackup/
+*.rptproj.bak
+
+# SQL Server files
+*.mdf
+*.ldf
+*.ndf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+*.rptproj.rsuser
+*- Backup*.rdl
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+node_modules/
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
+*.vbw
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
+
+# Paket dependency manager
+.paket/paket.exe
+paket-files/
+
+# FAKE - F# Make
+.fake/
+
+# CodeRush personal settings
+.cr/personal
+
+# Python Tools for Visual Studio (PTVS)
+__pycache__/
+*.pyc
+
+# Cake - Uncomment if you are using it
+# tools/**
+# !tools/packages.config
+
+# Tabs Studio
+*.tss
+
+# Telerik's JustMock configuration file
+*.jmconfig
+
+# BizTalk build output
+*.btp.cs
+*.btm.cs
+*.odx.cs
+*.xsd.cs
+
+# OpenCover UI analysis results
+OpenCover/
+
+# Azure Stream Analytics local run output
+ASALocalRun/
+
+# MSBuild Binary and Structured Log
+*.binlog
+
+# NVidia Nsight GPU debugger configuration file
+*.nvuser
+
+# MFractors (Xamarin productivity tool) working folder
+.mfractor/
+
+# Local History for Visual Studio
+.localhistory/
+
+# BeatPulse healthcheck temp database
+healthchecksdb
+
+# Backup folder for Package Reference Convert tool in Visual Studio 2017
+MigrationBackup/
\ No newline at end of file
diff --git a/plc4net/plc4net.sln b/plc4net/plc4net.sln
new file mode 100644
index 0000000..1781a3a
--- /dev/null
+++ b/plc4net/plc4net.sln
@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.28803.156
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "plc4net", "plc4net\plc4net.csproj", "{343770DC-ECE5-4131-9066-A09C120BB3D9}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{343770DC-ECE5-4131-9066-A09C120BB3D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{343770DC-ECE5-4131-9066-A09C120BB3D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{343770DC-ECE5-4131-9066-A09C120BB3D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{343770DC-ECE5-4131-9066-A09C120BB3D9}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {DCB0DDB3-E6AA-4801-844E-5C71EB50CB1B}
+	EndGlobalSection
+EndGlobal
diff --git a/plc4net/plc4net/plc4net.csproj b/plc4net/plc4net/plc4net.csproj
new file mode 100644
index 0000000..0c5a8bf
--- /dev/null
+++ b/plc4net/plc4net/plc4net.csproj
@@ -0,0 +1,8 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+  <PropertyGroup>
+    <TargetFramework>netstandard2.0</TargetFramework>
+    <RootNamespace>org.apache.plc4net</RootNamespace>
+  </PropertyGroup>
+
+</Project>


[plc4x] 06/12: [PLC4X-110] Implemented messages and builders

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

jfeinauer pushed a commit to branch feature/code-gen
in repository https://gitbox.apache.org/repos/asf/plc4x.git

commit b0c6253200612477952cd696a890403f94f81598
Author: Björn Höper <ho...@ltsoft.de>
AuthorDate: Mon Apr 22 19:48:39 2019 +0200

    [PLC4X-110] Implemented messages and builders
    
    For implementation of the C# API the interfaces for messages and
    builders
---
 plc4net/plc4net/api/IPlcConnection.cs              |  41 ++++++-
 plc4net/plc4net/api/IPlcDriver.cs                  |   3 +-
 .../plc4net/exceptions/PlcInvalidFieldException.cs |  46 +++++++
 .../IPlcFieldRequest.cs}                           |  34 +++---
 .../IPlcFieldResponse.cs}                          |  31 +++--
 plc4net/plc4net/messages/IPlcMessage.cs            |  29 +++++
 plc4net/plc4net/messages/IPlcReadRequest.cs        |  29 +++++
 .../IPlcReadRequestBuilder.cs}                     |  31 ++---
 plc4net/plc4net/messages/IPlcReadResponse.cs       |  29 +++++
 .../IPlcConnection.cs => messages/IPlcRequest.cs}  |  28 ++---
 .../IPlcRequestBuilder.cs}                         |  30 ++---
 .../IPlcConnection.cs => messages/IPlcResponse.cs} |  29 +----
 .../IPlcSubscriptionEventArgs.cs}                  |  27 +----
 .../plc4net/messages/IPlcSubscriptionRequest.cs    |  29 +++++
 .../messages/IPlcSubscriptionRequestBuilder.cs     |  54 +++++++++
 .../IPlcSubscriptionResponse.cs}                   |  30 ++---
 .../plc4net/messages/IPlcUnsubscriptionRequest.cs  |  29 +++++
 .../messages/IPlcUnsubscriptionRequestBuilder.cs   |  45 +++++++
 .../plc4net/messages/IPlcUnsubscriptionResponse.cs |  29 +++++
 .../IPlcWriteRequest.cs}                           |  28 +----
 .../plc4net/messages/IPlcWriteRequestBuilder.cs    | 134 +++++++++++++++++++++
 plc4net/plc4net/model/IPlcField.cs                 |  39 ++++++
 .../IPlcSubscriptionHandle.cs}                     |  27 +----
 plc4net/plc4net/plc4net.csproj                     |   2 +
 plc4net/plc4net/types/PlcResponseCode.cs           |  35 ++++++
 25 files changed, 660 insertions(+), 208 deletions(-)

diff --git a/plc4net/plc4net/api/IPlcConnection.cs b/plc4net/plc4net/api/IPlcConnection.cs
index 63be8dc..0b4ad43 100644
--- a/plc4net/plc4net/api/IPlcConnection.cs
+++ b/plc4net/plc4net/api/IPlcConnection.cs
@@ -19,10 +19,12 @@ under the License.
 
 using System;
 using System.Threading.Tasks;
+using org.apache.plc4net.api.metadata;
+using org.apache.plc4net.messages;
+using org.apache.plc4net.model;
 
 namespace org.apache.plc4net.api
 {
-    /// <inheritdoc />
     /// <summary>
     /// Interface for generalized PLC connections providing
     /// functionality for basic operations like connect / disconnect etc.
@@ -46,5 +48,42 @@ namespace org.apache.plc4net.api
         /// </summary>
         /// <returns>Awaitable task</returns>
         Task CloseAsync();
+
+        /// <summary>
+        /// Get the metadata for the connection
+        /// </summary>
+        IPlcConnectionMetadata PlcConnectionMetadata { get; }
+
+        /// <summary>
+        /// Parse the given field query
+        /// </summary>
+        /// <param name="fieldQuery">Query for the field</param>
+        /// <returns>Field parsed from the query string</returns>
+        /// <exception cref="org.apache.plc4net.exceptions.PlcInvalidFieldException">Thrown when the query can not be parsed</exception>
+        IPlcField Parse(string fieldQuery);
+
+        /// <summary>
+        /// Request builder for constructing read requests
+        /// </summary>
+        /// <returns>null if the connection does not support reading</returns>
+        IPlcReadRequestBuilder? ReadRequestBuilder { get; }
+
+        /// <summary>
+        /// Request builder for constructing write requests
+        /// </summary>
+        /// <returns>null if the connection does not support writing</returns>
+        IPlcWriteRequestBuilder? WriteRequestBuilder { get; }
+
+        /// <summary>
+        /// Request builder for constructing subscription requests
+        /// </summary>
+        /// <returns>null if the connection does not support subscriptions</returns>
+        IPlcSubscriptionRequestBuilder? SubscriptionRequestBuilder { get; }
+
+        /// <summary>
+        /// Request builder for unsubscribing
+        /// </summary>
+        /// <returns>null if the connection does not support subscriptions</returns>
+        IPlcUnsubscriptionRequestBuilder? UnsubscriptionRequestBuilder { get; }
     }
 }
\ No newline at end of file
diff --git a/plc4net/plc4net/api/IPlcDriver.cs b/plc4net/plc4net/api/IPlcDriver.cs
index 6a969d9..40aff40 100644
--- a/plc4net/plc4net/api/IPlcDriver.cs
+++ b/plc4net/plc4net/api/IPlcDriver.cs
@@ -50,7 +50,8 @@ namespace org.apache.plc4net.api
         /// </summary>
         /// <param name="connectionString"></param>
         /// <param name="authentication"></param>
-        /// <returns></returns>
+        /// <returns>Awaitable task returning the <see cref="IPlcConnection"/> to which the connection was established</returns>
+        /// <exception cref="org.apache.plc4net.exceptions.PlcConnectionException">Thrown on connection failure</exception>
         Task<IPlcConnection> ConnectAsync(string connectionString, IPlcAuthentication authentication);
     }
 }
\ No newline at end of file
diff --git a/plc4net/plc4net/exceptions/PlcInvalidFieldException.cs b/plc4net/plc4net/exceptions/PlcInvalidFieldException.cs
new file mode 100644
index 0000000..b3c4aa9
--- /dev/null
+++ b/plc4net/plc4net/exceptions/PlcInvalidFieldException.cs
@@ -0,0 +1,46 @@
+/*
+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.
+*/
+
+using System;
+using System.Runtime.Serialization;
+
+namespace org.apache.plc4net.exceptions
+{
+    [Serializable]
+    public class PlcInvalidFieldException : PlcException
+    {        
+        public PlcInvalidFieldException()
+        {
+        }
+
+        public PlcInvalidFieldException(string message) : base(message)
+        {
+        }
+
+        public PlcInvalidFieldException(string message, Exception inner) : base(message, inner)
+        {
+        }
+
+        protected PlcInvalidFieldException(
+            SerializationInfo info,
+            StreamingContext context) : base(info, context)
+        {
+        }
+    }
+}
\ No newline at end of file
diff --git a/plc4net/plc4net/api/IPlcConnection.cs b/plc4net/plc4net/messages/IPlcFieldRequest.cs
similarity index 56%
copy from plc4net/plc4net/api/IPlcConnection.cs
copy to plc4net/plc4net/messages/IPlcFieldRequest.cs
index 63be8dc..d66b9b1 100644
--- a/plc4net/plc4net/api/IPlcConnection.cs
+++ b/plc4net/plc4net/messages/IPlcFieldRequest.cs
@@ -17,34 +17,36 @@ specific language governing permissions and limitations
 under the License.
 */
 
-using System;
-using System.Threading.Tasks;
+using System.Collections.Generic;
+using org.apache.plc4net.model;
 
-namespace org.apache.plc4net.api
+namespace org.apache.plc4net.messages
 {
-    /// <inheritdoc />
     /// <summary>
-    /// Interface for generalized PLC connections providing
-    /// functionality for basic operations like connect / disconnect etc.
+    /// Request for certain fields inside the PLC
     /// </summary>
-    public interface IPlcConnection: IDisposable
+    public interface IPlcFieldRequest: IPlcRequest
     {
         /// <summary>
-        /// Connect to the PLC asynchronously
+        /// Number of fields in the request
         /// </summary>
-        /// <returns>Awaitable task</returns>
-        /// <exception cref="org.apache.plc4net.exceptions.PlcConnectionException">Thrown if the connection to the PLC fails</exception>
-        Task ConnectAsync();
+        int FieldCount { get; }
 
         /// <summary>
-        /// Indicates the connection state
+        /// Enumeration of field names
         /// </summary>
-        bool IsConnected { get; }
+        IEnumerable<string> FieldNames { get; }
 
         /// <summary>
-        /// Close the PLC connection asynchronously
+        /// Get a field inside the request by its name
         /// </summary>
-        /// <returns>Awaitable task</returns>
-        Task CloseAsync();
+        /// <param name="name">Name of the PLC field to return</param>
+        /// <returns></returns>
+        IPlcField GetFieldByName(string name);
+
+        /// <summary>
+        /// Returns all fields inside the request
+        /// </summary>
+        IEnumerable<IPlcField> Fields { get; }
     }
 }
\ No newline at end of file
diff --git a/plc4net/plc4net/api/IPlcConnection.cs b/plc4net/plc4net/messages/IPlcFieldResponse.cs
similarity index 56%
copy from plc4net/plc4net/api/IPlcConnection.cs
copy to plc4net/plc4net/messages/IPlcFieldResponse.cs
index 63be8dc..b418ad8 100644
--- a/plc4net/plc4net/api/IPlcConnection.cs
+++ b/plc4net/plc4net/messages/IPlcFieldResponse.cs
@@ -17,34 +17,33 @@ specific language governing permissions and limitations
 under the License.
 */
 
-using System;
-using System.Threading.Tasks;
+using System.Collections.Generic;
+using org.apache.plc4net.model;
+using org.apache.plc4net.types;
 
-namespace org.apache.plc4net.api
+namespace org.apache.plc4net.messages
 {
-    /// <inheritdoc />
     /// <summary>
-    /// Interface for generalized PLC connections providing
-    /// functionality for basic operations like connect / disconnect etc.
+    /// Interface for responses to requests realted to
+    /// a specific PLC field
     /// </summary>
-    public interface IPlcConnection: IDisposable
+    public interface IPlcFieldResponse: IPlcResponse
     {
         /// <summary>
-        /// Connect to the PLC asynchronously
+        /// Enumeration of fields in the response
         /// </summary>
-        /// <returns>Awaitable task</returns>
-        /// <exception cref="org.apache.plc4net.exceptions.PlcConnectionException">Thrown if the connection to the PLC fails</exception>
-        Task ConnectAsync();
+        IEnumerable<string> FieldNames { get; }
 
         /// <summary>
-        /// Indicates the connection state
+        /// Get a field by name
         /// </summary>
-        bool IsConnected { get; }
+        /// <param name="name">Name of the field to retrieve</param>
+        /// <returns>Field with the given name</returns>
+        IPlcField GetFieldByName(string name);
 
         /// <summary>
-        /// Close the PLC connection asynchronously
+        /// Get the response code from the PLC
         /// </summary>
-        /// <returns>Awaitable task</returns>
-        Task CloseAsync();
+        PlcResponseCode ResponseCode { get; }
     }
 }
\ No newline at end of file
diff --git a/plc4net/plc4net/messages/IPlcMessage.cs b/plc4net/plc4net/messages/IPlcMessage.cs
new file mode 100644
index 0000000..e7af221
--- /dev/null
+++ b/plc4net/plc4net/messages/IPlcMessage.cs
@@ -0,0 +1,29 @@
+/*
+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.
+*/
+
+namespace org.apache.plc4net.messages
+{
+    /// <summary>
+    /// Base interface for PLC messages
+    /// </summary>
+    public interface IPlcMessage
+    {
+        
+    }
+}
\ No newline at end of file
diff --git a/plc4net/plc4net/messages/IPlcReadRequest.cs b/plc4net/plc4net/messages/IPlcReadRequest.cs
new file mode 100644
index 0000000..17182ca
--- /dev/null
+++ b/plc4net/plc4net/messages/IPlcReadRequest.cs
@@ -0,0 +1,29 @@
+/*
+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.
+*/
+
+namespace org.apache.plc4net.messages
+{
+    /// <summary>
+    /// Interface for requests reading data from a PLC
+    /// </summary>
+    public interface IPlcReadRequest: IPlcRequest
+    {
+        
+    }
+}
\ No newline at end of file
diff --git a/plc4net/plc4net/api/IPlcConnection.cs b/plc4net/plc4net/messages/IPlcReadRequestBuilder.cs
similarity index 50%
copy from plc4net/plc4net/api/IPlcConnection.cs
copy to plc4net/plc4net/messages/IPlcReadRequestBuilder.cs
index 63be8dc..79ff783 100644
--- a/plc4net/plc4net/api/IPlcConnection.cs
+++ b/plc4net/plc4net/messages/IPlcReadRequestBuilder.cs
@@ -17,34 +17,19 @@ specific language governing permissions and limitations
 under the License.
 */
 
-using System;
-using System.Threading.Tasks;
-
-namespace org.apache.plc4net.api
+namespace org.apache.plc4net.messages
 {
-    /// <inheritdoc />
     /// <summary>
-    /// Interface for generalized PLC connections providing
-    /// functionality for basic operations like connect / disconnect etc.
+    /// Builds requests for reading values from a PLC
     /// </summary>
-    public interface IPlcConnection: IDisposable
+    public interface IPlcReadRequestBuilder: IPlcRequestBuilder<IPlcReadRequest>
     {
         /// <summary>
-        /// Connect to the PLC asynchronously
-        /// </summary>
-        /// <returns>Awaitable task</returns>
-        /// <exception cref="org.apache.plc4net.exceptions.PlcConnectionException">Thrown if the connection to the PLC fails</exception>
-        Task ConnectAsync();
-
-        /// <summary>
-        /// Indicates the connection state
-        /// </summary>
-        bool IsConnected { get; }
-
-        /// <summary>
-        /// Close the PLC connection asynchronously
+        /// Add an item to the request
         /// </summary>
-        /// <returns>Awaitable task</returns>
-        Task CloseAsync();
+        /// <param name="name">Name of the field to add</param>
+        /// <param name="fieldQuery">Query string for the field parameter</param>
+        /// <returns>Request builder to allow fluent API calls</returns>
+        IPlcReadRequestBuilder AddItem(string name, string fieldQuery);
     }
 }
\ No newline at end of file
diff --git a/plc4net/plc4net/messages/IPlcReadResponse.cs b/plc4net/plc4net/messages/IPlcReadResponse.cs
new file mode 100644
index 0000000..66fc79b
--- /dev/null
+++ b/plc4net/plc4net/messages/IPlcReadResponse.cs
@@ -0,0 +1,29 @@
+/*
+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.
+*/
+
+namespace org.apache.plc4net.messages
+{
+    /// <summary>
+    /// Response for read requests <see cref="IPlcReadRequest"/>
+    /// </summary>
+    public interface IPlcReadResponse : IPlcResponse
+    {
+
+    }
+}
\ No newline at end of file
diff --git a/plc4net/plc4net/api/IPlcConnection.cs b/plc4net/plc4net/messages/IPlcRequest.cs
similarity index 52%
copy from plc4net/plc4net/api/IPlcConnection.cs
copy to plc4net/plc4net/messages/IPlcRequest.cs
index 63be8dc..174d506 100644
--- a/plc4net/plc4net/api/IPlcConnection.cs
+++ b/plc4net/plc4net/messages/IPlcRequest.cs
@@ -17,34 +17,20 @@ specific language governing permissions and limitations
 under the License.
 */
 
-using System;
 using System.Threading.Tasks;
 
-namespace org.apache.plc4net.api
+namespace org.apache.plc4net.messages
 {
-    /// <inheritdoc />
     /// <summary>
-    /// Interface for generalized PLC connections providing
-    /// functionality for basic operations like connect / disconnect etc.
+    /// Base interface for PLC requests that can be executed
+    /// and receive responses
     /// </summary>
-    public interface IPlcConnection: IDisposable
+    public interface IPlcRequest : IPlcMessage
     {
         /// <summary>
-        /// Connect to the PLC asynchronously
+        /// Execute the request asynchronously
         /// </summary>
-        /// <returns>Awaitable task</returns>
-        /// <exception cref="org.apache.plc4net.exceptions.PlcConnectionException">Thrown if the connection to the PLC fails</exception>
-        Task ConnectAsync();
-
-        /// <summary>
-        /// Indicates the connection state
-        /// </summary>
-        bool IsConnected { get; }
-
-        /// <summary>
-        /// Close the PLC connection asynchronously
-        /// </summary>
-        /// <returns>Awaitable task</returns>
-        Task CloseAsync();
+        /// <returns>Awaitable task returning the response from the PLC</returns>
+        Task<IPlcResponse> ExecuteAsync();
     }
 }
\ No newline at end of file
diff --git a/plc4net/plc4net/api/IPlcConnection.cs b/plc4net/plc4net/messages/IPlcRequestBuilder.cs
similarity index 50%
copy from plc4net/plc4net/api/IPlcConnection.cs
copy to plc4net/plc4net/messages/IPlcRequestBuilder.cs
index 63be8dc..44e25d9 100644
--- a/plc4net/plc4net/api/IPlcConnection.cs
+++ b/plc4net/plc4net/messages/IPlcRequestBuilder.cs
@@ -17,34 +17,18 @@ specific language governing permissions and limitations
 under the License.
 */
 
-using System;
-using System.Threading.Tasks;
-
-namespace org.apache.plc4net.api
+namespace org.apache.plc4net.messages
 {
-    /// <inheritdoc />
     /// <summary>
-    /// Interface for generalized PLC connections providing
-    /// functionality for basic operations like connect / disconnect etc.
+    /// Base interface for request builders
     /// </summary>
-    public interface IPlcConnection: IDisposable
+    /// <typeparam name="TRequest">Type of request returned when building the request</typeparam>
+    public interface IPlcRequestBuilder<out TRequest> where TRequest : IPlcRequest
     {
         /// <summary>
-        /// Connect to the PLC asynchronously
-        /// </summary>
-        /// <returns>Awaitable task</returns>
-        /// <exception cref="org.apache.plc4net.exceptions.PlcConnectionException">Thrown if the connection to the PLC fails</exception>
-        Task ConnectAsync();
-
-        /// <summary>
-        /// Indicates the connection state
-        /// </summary>
-        bool IsConnected { get; }
-
-        /// <summary>
-        /// Close the PLC connection asynchronously
+        /// Builds the defined request
         /// </summary>
-        /// <returns>Awaitable task</returns>
-        Task CloseAsync();
+        /// <returns>Request built from the definition</returns>
+        TRequest Build();
     }
 }
\ No newline at end of file
diff --git a/plc4net/plc4net/api/IPlcConnection.cs b/plc4net/plc4net/messages/IPlcResponse.cs
similarity index 50%
copy from plc4net/plc4net/api/IPlcConnection.cs
copy to plc4net/plc4net/messages/IPlcResponse.cs
index 63be8dc..616a380 100644
--- a/plc4net/plc4net/api/IPlcConnection.cs
+++ b/plc4net/plc4net/messages/IPlcResponse.cs
@@ -17,34 +17,17 @@ specific language governing permissions and limitations
 under the License.
 */
 
-using System;
-using System.Threading.Tasks;
-
-namespace org.apache.plc4net.api
+namespace org.apache.plc4net.messages
 {
-    /// <inheritdoc />
     /// <summary>
-    /// Interface for generalized PLC connections providing
-    /// functionality for basic operations like connect / disconnect etc.
+    /// Interface for responses received from
+    /// PLCs
     /// </summary>
-    public interface IPlcConnection: IDisposable
+    public interface IPlcResponse: IPlcMessage 
     {
         /// <summary>
-        /// Connect to the PLC asynchronously
-        /// </summary>
-        /// <returns>Awaitable task</returns>
-        /// <exception cref="org.apache.plc4net.exceptions.PlcConnectionException">Thrown if the connection to the PLC fails</exception>
-        Task ConnectAsync();
-
-        /// <summary>
-        /// Indicates the connection state
-        /// </summary>
-        bool IsConnected { get; }
-
-        /// <summary>
-        /// Close the PLC connection asynchronously
+        /// Get the request that generated the response
         /// </summary>
-        /// <returns>Awaitable task</returns>
-        Task CloseAsync();
+        IPlcRequest Request { get; }
     }
 }
\ No newline at end of file
diff --git a/plc4net/plc4net/api/IPlcConnection.cs b/plc4net/plc4net/messages/IPlcSubscriptionEventArgs.cs
similarity index 51%
copy from plc4net/plc4net/api/IPlcConnection.cs
copy to plc4net/plc4net/messages/IPlcSubscriptionEventArgs.cs
index 63be8dc..0b7c447 100644
--- a/plc4net/plc4net/api/IPlcConnection.cs
+++ b/plc4net/plc4net/messages/IPlcSubscriptionEventArgs.cs
@@ -18,33 +18,18 @@ under the License.
 */
 
 using System;
-using System.Threading.Tasks;
 
-namespace org.apache.plc4net.api
+namespace org.apache.plc4net.messages
 {
-    /// <inheritdoc />
     /// <summary>
-    /// Interface for generalized PLC connections providing
-    /// functionality for basic operations like connect / disconnect etc.
+    /// Base interface for event data associated with
+    /// subscription events
     /// </summary>
-    public interface IPlcConnection: IDisposable
+    public interface IPlcSubscriptionEventArgs
     {
         /// <summary>
-        /// Connect to the PLC asynchronously
+        /// Timestamp of the event that occured
         /// </summary>
-        /// <returns>Awaitable task</returns>
-        /// <exception cref="org.apache.plc4net.exceptions.PlcConnectionException">Thrown if the connection to the PLC fails</exception>
-        Task ConnectAsync();
-
-        /// <summary>
-        /// Indicates the connection state
-        /// </summary>
-        bool IsConnected { get; }
-
-        /// <summary>
-        /// Close the PLC connection asynchronously
-        /// </summary>
-        /// <returns>Awaitable task</returns>
-        Task CloseAsync();
+        DateTime Timestamp { get; }
     }
 }
\ No newline at end of file
diff --git a/plc4net/plc4net/messages/IPlcSubscriptionRequest.cs b/plc4net/plc4net/messages/IPlcSubscriptionRequest.cs
new file mode 100644
index 0000000..7fcaf3b
--- /dev/null
+++ b/plc4net/plc4net/messages/IPlcSubscriptionRequest.cs
@@ -0,0 +1,29 @@
+/*
+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.
+*/
+
+namespace org.apache.plc4net.messages
+{
+    /// <summary>
+    /// Interface for requests to subscribe to value changes
+    /// </summary>
+    public interface IPlcSubscriptionRequest: IPlcFieldRequest
+    {
+
+    }
+}
\ No newline at end of file
diff --git a/plc4net/plc4net/messages/IPlcSubscriptionRequestBuilder.cs b/plc4net/plc4net/messages/IPlcSubscriptionRequestBuilder.cs
new file mode 100644
index 0000000..773f8ed
--- /dev/null
+++ b/plc4net/plc4net/messages/IPlcSubscriptionRequestBuilder.cs
@@ -0,0 +1,54 @@
+/*
+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.
+*/
+
+using System;
+
+namespace org.apache.plc4net.messages
+{
+    /// <summary>
+    /// Interface for classes building requests for subscriptions
+    /// </summary>
+    public interface IPlcSubscriptionRequestBuilder: IPlcRequestBuilder<IPlcSubscriptionRequest>
+    {
+        /// <summary>
+        /// Add a field that gets polled cyclically
+        /// </summary>
+        /// <param name="name">Alias for the field</param>
+        /// <param name="fieldQuery">Query string for the field</param>
+        /// <param name="pollingInterval">Time Interval at which the field should be polled</param>
+        /// <returns>Builder instance for Fluid API requests</returns>
+        IPlcSubscriptionRequestBuilder AddCyclicField(string name, string fieldQuery, TimeSpan pollingInterval);
+
+        /// <summary>
+        /// Add a field that sends an update when its value is changed
+        /// </summary>
+        /// <param name="name">Alias for the field</param>
+        /// <param name="fieldQuery">Query string for the field</param>        
+        /// <returns>Builder instance for Fluid API requests</returns>
+        IPlcSubscriptionRequestBuilder AddChangeOfStateField(string name, string fieldQuery);
+
+        /// <summary>
+        /// Add a field that sends an update when an event occurs
+        /// </summary>
+        /// <param name="name">Alias for the field</param>
+        /// <param name="fieldQuery">Query string for the field</param>        
+        /// <returns>Builder instance for Fluid API requests</returns>
+        IPlcSubscriptionRequestBuilder AddEventField(string name, string fieldQuery);
+    }
+}
\ No newline at end of file
diff --git a/plc4net/plc4net/api/IPlcConnection.cs b/plc4net/plc4net/messages/IPlcSubscriptionResponse.cs
similarity index 53%
copy from plc4net/plc4net/api/IPlcConnection.cs
copy to plc4net/plc4net/messages/IPlcSubscriptionResponse.cs
index 63be8dc..25e0fcd 100644
--- a/plc4net/plc4net/api/IPlcConnection.cs
+++ b/plc4net/plc4net/messages/IPlcSubscriptionResponse.cs
@@ -17,34 +17,26 @@ specific language governing permissions and limitations
 under the License.
 */
 
-using System;
-using System.Threading.Tasks;
+using System.Collections.Generic;
+using org.apache.plc4net.model;
 
-namespace org.apache.plc4net.api
+namespace org.apache.plc4net.messages
 {
-    /// <inheritdoc />
     /// <summary>
-    /// Interface for generalized PLC connections providing
-    /// functionality for basic operations like connect / disconnect etc.
+    /// Response to a <see cref="IPlcSubscriptionRequest"/>
     /// </summary>
-    public interface IPlcConnection: IDisposable
+    public interface IPlcSubscriptionResponse: IPlcFieldResponse
     {
         /// <summary>
-        /// Connect to the PLC asynchronously
+        /// Get the handle for the subscription with the given name
         /// </summary>
-        /// <returns>Awaitable task</returns>
-        /// <exception cref="org.apache.plc4net.exceptions.PlcConnectionException">Thrown if the connection to the PLC fails</exception>
-        Task ConnectAsync();
+        /// <param name="name">Name of the subscription</param>
+        /// <returns>Subscription handle</returns>
+        IPlcSubscriptionHandle GetSubscriptionHandle(string name);
 
         /// <summary>
-        /// Indicates the connection state
+        /// Get all subscription handles
         /// </summary>
-        bool IsConnected { get; }
-
-        /// <summary>
-        /// Close the PLC connection asynchronously
-        /// </summary>
-        /// <returns>Awaitable task</returns>
-        Task CloseAsync();
+        IEnumerable<IPlcSubscriptionHandle> SubscriptionHandles { get; }
     }
 }
\ No newline at end of file
diff --git a/plc4net/plc4net/messages/IPlcUnsubscriptionRequest.cs b/plc4net/plc4net/messages/IPlcUnsubscriptionRequest.cs
new file mode 100644
index 0000000..0d0bd1f
--- /dev/null
+++ b/plc4net/plc4net/messages/IPlcUnsubscriptionRequest.cs
@@ -0,0 +1,29 @@
+/*
+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.
+*/
+
+namespace org.apache.plc4net.messages
+{
+    /// <summary>
+    /// Request for releasing a subscription
+    /// </summary>
+    public interface IPlcUnsubscriptionRequest: IPlcRequest
+    {
+        
+    }
+}
\ No newline at end of file
diff --git a/plc4net/plc4net/messages/IPlcUnsubscriptionRequestBuilder.cs b/plc4net/plc4net/messages/IPlcUnsubscriptionRequestBuilder.cs
new file mode 100644
index 0000000..a5752f8
--- /dev/null
+++ b/plc4net/plc4net/messages/IPlcUnsubscriptionRequestBuilder.cs
@@ -0,0 +1,45 @@
+/*
+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.
+*/
+
+using System.Collections.Generic;
+using org.apache.plc4net.model;
+
+namespace org.apache.plc4net.messages
+{
+    /// <summary>
+    /// Constructs requests for unsubscribing from PLC fields
+    /// </summary>
+    public interface IPlcUnsubscriptionRequestBuilder: 
+        IPlcRequestBuilder<IPlcUnsubscriptionRequest>
+    {
+        /// <summary>
+        /// Add the given handles to the unsubscription request
+        /// </summary>      
+        /// <param name="subscriptionHandles">Handles to unsubscribe</param>
+        /// <returns>Builder for chaining requests as Fluid API</returns>
+        IPlcUnsubscriptionRequestBuilder AddHandles(params IPlcSubscriptionHandle[] subscriptionHandles);
+
+        /// <summary>
+        /// Add the given handles to the unsubscription request
+        /// </summary>      
+        /// <param name="subscriptionHandles">Handles to unsubscribe</param>
+        /// <returns>Builder for chaining requests as Fluid API</returns>
+        IPlcUnsubscriptionRequestBuilder AddHandles(IEnumerable<IPlcSubscriptionHandle> subscriptionHandles);
+    }
+}
\ No newline at end of file
diff --git a/plc4net/plc4net/messages/IPlcUnsubscriptionResponse.cs b/plc4net/plc4net/messages/IPlcUnsubscriptionResponse.cs
new file mode 100644
index 0000000..0b5e8f9
--- /dev/null
+++ b/plc4net/plc4net/messages/IPlcUnsubscriptionResponse.cs
@@ -0,0 +1,29 @@
+/*
+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.
+*/
+
+namespace org.apache.plc4net.messages
+{
+    /// <summary>
+    /// Interface for requests to release a subscription
+    /// </summary>
+    public interface IPlcUnsubscriptionResponse: IPlcResponse
+    {
+        
+    }
+}
\ No newline at end of file
diff --git a/plc4net/plc4net/api/IPlcConnection.cs b/plc4net/plc4net/messages/IPlcWriteRequest.cs
similarity index 50%
copy from plc4net/plc4net/api/IPlcConnection.cs
copy to plc4net/plc4net/messages/IPlcWriteRequest.cs
index 63be8dc..13e617a 100644
--- a/plc4net/plc4net/api/IPlcConnection.cs
+++ b/plc4net/plc4net/messages/IPlcWriteRequest.cs
@@ -17,34 +17,16 @@ specific language governing permissions and limitations
 under the License.
 */
 
-using System;
-using System.Threading.Tasks;
-
-namespace org.apache.plc4net.api
+namespace org.apache.plc4net.messages
 {
-    /// <inheritdoc />
     /// <summary>
-    /// Interface for generalized PLC connections providing
-    /// functionality for basic operations like connect / disconnect etc.
+    /// Interface for writing values to PLCs
     /// </summary>
-    public interface IPlcConnection: IDisposable
+    public interface IPlcWriteRequest: IPlcRequest
     {
         /// <summary>
-        /// Connect to the PLC asynchronously
-        /// </summary>
-        /// <returns>Awaitable task</returns>
-        /// <exception cref="org.apache.plc4net.exceptions.PlcConnectionException">Thrown if the connection to the PLC fails</exception>
-        Task ConnectAsync();
-
-        /// <summary>
-        /// Indicates the connection state
-        /// </summary>
-        bool IsConnected { get; }
-
-        /// <summary>
-        /// Close the PLC connection asynchronously
+        /// Number of values in the request
         /// </summary>
-        /// <returns>Awaitable task</returns>
-        Task CloseAsync();
+        int NumberOfValues { get; }
     }
 }
\ No newline at end of file
diff --git a/plc4net/plc4net/messages/IPlcWriteRequestBuilder.cs b/plc4net/plc4net/messages/IPlcWriteRequestBuilder.cs
new file mode 100644
index 0000000..4e24554
--- /dev/null
+++ b/plc4net/plc4net/messages/IPlcWriteRequestBuilder.cs
@@ -0,0 +1,134 @@
+/*
+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.
+*/
+
+/*
+ * TODO: Decide if distinguishment between date, time and datetime are needed (see plc4j)
+ * TODO: Decide if implementation of byte[] and Byte[] as in plc4j are needed
+ * TODO: Check type compatibility between Java BigDecimal and Decimal
+ */
+
+using System;
+
+namespace org.apache.plc4net.messages
+{
+    /// <summary>
+    /// Interface for a builder that constructs write requests
+    /// </summary>
+    public interface IPlcWriteRequestBuilder: IPlcRequestBuilder<IPlcWriteRequest>
+    {
+        /// <summary>
+        /// Add item with bool value
+        /// </summary>
+        /// <param name="name">Identifying name of the field</param>
+        /// <param name="fieldQuery">Query string for the field</param>
+        /// <param name="values">Values to set</param>
+        /// <returns>Own instance to allow Fluid API calls</returns>
+        IPlcWriteRequestBuilder AddItem(string name, string fieldQuery, params bool[] values);
+        
+        /// <summary>
+        /// Add item with byte value
+        /// </summary>
+        /// <param name="name">Identifying name of the field</param>
+        /// <param name="fieldQuery">Query string for the field</param>
+        /// <param name="values">Values to set</param>
+        /// <returns>Own instance to allow Fluid API calls</returns>
+        IPlcWriteRequestBuilder AddItem(string name, string fieldQuery, params byte[] values);
+
+        /// <summary>
+        /// Add item with short value
+        /// </summary>
+        /// <param name="name">Identifying name of the field</param>
+        /// <param name="fieldQuery">Query string for the field</param>
+        /// <param name="values">Values to set</param>
+        /// <returns>Own instance to allow Fluid API calls</returns>
+        IPlcWriteRequestBuilder AddItem(string name, string fieldQuery, params short[] values);
+        
+        /// <summary>
+        /// Add item with int value
+        /// </summary>
+        /// <param name="name">Identifying name of the field</param>
+        /// <param name="fieldQuery">Query string for the field</param>
+        /// <param name="values">Values to set</param>
+        /// <returns>Own instance to allow Fluid API calls</returns>
+        IPlcWriteRequestBuilder AddItem(string name, string fieldQuery, params int[] values);
+
+        /// <summary>
+        /// Add item with long value
+        /// </summary>
+        /// <param name="name">Identifying name of the field</param>
+        /// <param name="fieldQuery">Query string for the field</param>
+        /// <param name="values">Values to set</param>
+        /// <returns>Own instance to allow Fluid API calls</returns>
+        IPlcWriteRequestBuilder AddItem(string name, string fieldQuery, params long[] values);
+
+        /// <summary>
+        /// Add item with float value
+        /// </summary>
+        /// <param name="name">Identifying name of the field</param>
+        /// <param name="fieldQuery">Query string for the field</param>
+        /// <param name="values">Values to set</param>
+        /// <returns>Own instance to allow Fluid API calls</returns>
+        IPlcWriteRequestBuilder AddItem(string name, string fieldQuery, params float[] values);
+
+        /// <summary>
+        /// Add item with double value
+        /// </summary>
+        /// <param name="name">Identifying name of the field</param>
+        /// <param name="fieldQuery">Query string for the field</param>
+        /// <param name="values">Values to set</param>
+        /// <returns>Own instance to allow Fluid API calls</returns>
+        IPlcWriteRequestBuilder AddItem(string name, string fieldQuery, params double[] values);
+
+        /// <summary>
+        /// Add item with Decimal value
+        /// </summary>
+        /// <param name="name">Identifying name of the field</param>
+        /// <param name="fieldQuery">Query string for the field</param>
+        /// <param name="values">Values to set</param>
+        /// <returns>Own instance to allow Fluid API calls</returns>
+        IPlcWriteRequestBuilder AddItem(string name, string fieldQuery, params Decimal[] values);
+
+        /// <summary>
+        /// Add item with string value
+        /// </summary>
+        /// <param name="name">Identifying name of the field</param>
+        /// <param name="fieldQuery">Query string for the field</param>
+        /// <param name="values">Values to set</param>
+        /// <returns>Own instance to allow Fluid API calls</returns>
+        IPlcWriteRequestBuilder AddItem(string name, string fieldQuery, params string[] values);
+
+        /// <summary>
+        /// Add item with DateTime value
+        /// </summary>
+        /// <param name="name">Identifying name of the field</param>
+        /// <param name="fieldQuery">Query string for the field</param>
+        /// <param name="values">Values to set</param>
+        /// <returns>Own instance to allow Fluid API calls</returns>
+        IPlcWriteRequestBuilder AddItem(string name, string fieldQuery, params DateTime[] values);
+
+        /// <summary>
+        /// Add item with value of generic type
+        /// </summary>
+        /// <param name="name">Identifying name of the field</param>
+        /// <param name="fieldQuery">Query string for the field</param>
+        /// <param name="values">Values to set</param>        
+        /// <returns>Own instance to allow Fluid API calls</returns>
+        IPlcWriteRequestBuilder AddItem<T>(string name, string fieldQuery, params T[] values);
+    }
+}
\ No newline at end of file
diff --git a/plc4net/plc4net/model/IPlcField.cs b/plc4net/plc4net/model/IPlcField.cs
new file mode 100644
index 0000000..098baf3
--- /dev/null
+++ b/plc4net/plc4net/model/IPlcField.cs
@@ -0,0 +1,39 @@
+/*
+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.
+*/
+
+
+namespace org.apache.plc4net.model
+{
+    /// <summary>
+    /// Base type for all field types.
+    /// Typically every driver provides an implementation of this interface in order
+    /// to be able to describe the fields of a resource.As this is completely tied to
+    /// the implemented protocol, this base interface makes absolutely no assumption to
+    /// any information it should provide.
+
+    /// In order to stay platform and protocol independent every driver connection implementation
+    /// provides a prepareField(String) method that is able to parse a string representation of
+    /// a resource into it's individual field type. Manually constructing PlcField objects
+    /// manually makes the solution less independent from the protocol, but might be faster.
+    /// </summary>
+    public interface IPlcField
+    {
+
+    }
+}
\ No newline at end of file
diff --git a/plc4net/plc4net/api/IPlcConnection.cs b/plc4net/plc4net/model/IPlcSubscriptionHandle.cs
similarity index 51%
copy from plc4net/plc4net/api/IPlcConnection.cs
copy to plc4net/plc4net/model/IPlcSubscriptionHandle.cs
index 63be8dc..c2c1d54 100644
--- a/plc4net/plc4net/api/IPlcConnection.cs
+++ b/plc4net/plc4net/model/IPlcSubscriptionHandle.cs
@@ -18,33 +18,18 @@ under the License.
 */
 
 using System;
-using System.Threading.Tasks;
+using org.apache.plc4net.messages;
 
-namespace org.apache.plc4net.api
+namespace org.apache.plc4net.model
 {
-    /// <inheritdoc />
     /// <summary>
-    /// Interface for generalized PLC connections providing
-    /// functionality for basic operations like connect / disconnect etc.
+    /// Handle to a subscription
     /// </summary>
-    public interface IPlcConnection: IDisposable
+    public interface IPlcSubscriptionHandle
     {
         /// <summary>
-        /// Connect to the PLC asynchronously
+        /// Event that can be subscribed to handle events raised by the subscription
         /// </summary>
-        /// <returns>Awaitable task</returns>
-        /// <exception cref="org.apache.plc4net.exceptions.PlcConnectionException">Thrown if the connection to the PLC fails</exception>
-        Task ConnectAsync();
-
-        /// <summary>
-        /// Indicates the connection state
-        /// </summary>
-        bool IsConnected { get; }
-
-        /// <summary>
-        /// Close the PLC connection asynchronously
-        /// </summary>
-        /// <returns>Awaitable task</returns>
-        Task CloseAsync();
+        event EventHandler<IPlcSubscriptionEventArgs> PlcSubscriptionEvent;
     }
 }
\ No newline at end of file
diff --git a/plc4net/plc4net/plc4net.csproj b/plc4net/plc4net/plc4net.csproj
index 0c5a8bf..5d10bac 100644
--- a/plc4net/plc4net/plc4net.csproj
+++ b/plc4net/plc4net/plc4net.csproj
@@ -3,6 +3,8 @@
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
     <RootNamespace>org.apache.plc4net</RootNamespace>
+    <LangVersion>8.0</LangVersion>
+    <NullableContextOptions>enable</NullableContextOptions>
   </PropertyGroup>
 
 </Project>
diff --git a/plc4net/plc4net/types/PlcResponseCode.cs b/plc4net/plc4net/types/PlcResponseCode.cs
new file mode 100644
index 0000000..7b9d0f8
--- /dev/null
+++ b/plc4net/plc4net/types/PlcResponseCode.cs
@@ -0,0 +1,35 @@
+/*
+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.
+*/
+
+namespace org.apache.plc4net.types
+{
+    /// <summary>
+    /// Possible responses
+    /// </summary>
+    public enum PlcResponseCode
+    {
+        Ok,
+        NotFound,
+        AccessDenied,
+        InvalidAddress,
+        InvalidDatatype,
+        InternalError,
+        ResponsePending
+    }
+}
\ No newline at end of file