You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2019/05/04 19:32:06 UTC

[plc4x] branch bjoernhoeper-feature/plc4net created (now 01fc7a4)

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

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


      at 01fc7a4  - Fine tuned the build and integrated it to maven

This branch includes the following new commits:

     new 51f8781  [PLC4X-110] Added VS solution and project
     new 738f5ac  [PLC4X-110] Added core class implementation
     new 70cffb1  [PLC4X-110] Implemented messages and builders
     new a0948e6  Added vscode files to gitignore
     new a458f64  Merge branch 'feature/plc4net' of https://github.com/bjoernhoeper/incubator-plc4x into bjoernhoeper-feature/plc4net
     new 01fc7a4  - Fine tuned the build and integrated it to maven

The 6 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.



[plc4x] 02/06: [PLC4X-110] Added core class implementation

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

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

commit 738f5aca78ec19df81bfa90e11b52c8388e449f4
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] 06/06: - Fine tuned the build and integrated it to maven

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

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

commit 01fc7a4632a0151fb4d012933cb0dba07215e3eb
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 6b68eff..963808e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -737,6 +737,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>
 
@@ -1246,6 +1249,13 @@
     </profile>
 
     <profile>
+      <id>with-dotnet</id>
+      <modules>
+        <module>plc4net</module>
+      </modules>
+    </profile>
+
+    <profile>
       <id>with-python</id>
       <modules>
         <module>plc4py</module>


[plc4x] 05/06: Merge branch 'feature/plc4net' of https://github.com/bjoernhoeper/incubator-plc4x into bjoernhoeper-feature/plc4net

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

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

commit a458f649e2a02c43295583bac59b12f658517387
Merge: 616c3d6 a0948e6
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Sat May 4 14:07:18 2019 +0200

    Merge branch 'feature/plc4net' of https://github.com/bjoernhoeper/incubator-plc4x into bjoernhoeper-feature/plc4net

 .gitignore                                         |   1 +
 .vscode/settings.json                              |   8 +
 plc4net/.gitignore                                 | 344 +++++++++++++++++++++
 plc4net/plc4net.driver/IPlcDriver.cs               |  10 +
 plc4net/plc4net.driver/plc4net.driver.csproj       |   7 +
 plc4net/plc4net.sln                                |  25 ++
 plc4net/plc4net/PlcDriverManager.cs                | 104 +++++++
 plc4net/plc4net/api/IPlcConnection.cs              |  89 ++++++
 plc4net/plc4net/api/IPlcDriver.cs                  |  57 ++++
 .../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 +++
 .../plc4net/exceptions/PlcInvalidFieldException.cs |  46 +++
 plc4net/plc4net/messages/IPlcFieldRequest.cs       |  52 ++++
 plc4net/plc4net/messages/IPlcFieldResponse.cs      |  49 +++
 plc4net/plc4net/messages/IPlcMessage.cs            |  29 ++
 plc4net/plc4net/messages/IPlcReadRequest.cs        |  29 ++
 plc4net/plc4net/messages/IPlcReadRequestBuilder.cs |  35 +++
 plc4net/plc4net/messages/IPlcReadResponse.cs       |  29 ++
 plc4net/plc4net/messages/IPlcRequest.cs            |  36 +++
 plc4net/plc4net/messages/IPlcRequestBuilder.cs     |  34 ++
 plc4net/plc4net/messages/IPlcResponse.cs           |  33 ++
 .../plc4net/messages/IPlcSubscriptionEventArgs.cs  |  35 +++
 .../plc4net/messages/IPlcSubscriptionRequest.cs    |  29 ++
 .../messages/IPlcSubscriptionRequestBuilder.cs     |  54 ++++
 .../plc4net/messages/IPlcSubscriptionResponse.cs   |  42 +++
 .../plc4net/messages/IPlcUnsubscriptionRequest.cs  |  29 ++
 .../messages/IPlcUnsubscriptionRequestBuilder.cs   |  45 +++
 .../plc4net/messages/IPlcUnsubscriptionResponse.cs |  29 ++
 plc4net/plc4net/messages/IPlcWriteRequest.cs       |  32 ++
 .../plc4net/messages/IPlcWriteRequestBuilder.cs    | 134 ++++++++
 plc4net/plc4net/model/IPlcField.cs                 |  39 +++
 plc4net/plc4net/model/IPlcSubscriptionHandle.cs    |  35 +++
 plc4net/plc4net/plc4net.csproj                     |  10 +
 plc4net/plc4net/types/PlcResponseCode.cs           |  35 +++
 37 files changed, 1781 insertions(+)


[plc4x] 01/06: [PLC4X-110] Added VS solution and project

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

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

commit 51f8781db71f2f703a015eb10756902606f55dca
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] 04/06: Added vscode files to gitignore

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

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

commit a0948e63f7383ee552d679436fff41a28fc8d26c
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] 03/06: [PLC4X-110] Implemented messages and builders

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

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

commit 70cffb1f7e18a6e850f73971f8eda1caaa578ec7
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