[incubator-plc4x] branch remove_response_reference_in_request_item deleted (was 8d1f2a5)

2018-03-07 Thread sruehl
This is an automated email from the ASF dual-hosted git repository.

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


 was 8d1f2a5  Remove response in RequestItem

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.

-- 
To stop receiving notification emails like this one, please contact
sru...@apache.org.


[incubator-plc4x] branch master updated: - Added test-constructors to the Modbus drivers. - Added some documentation on creating drivers.

2018-03-07 Thread cdutz
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new fa5dc16  - Added test-constructors to the Modbus drivers. - Added some 
documentation on creating drivers.
fa5dc16 is described below

commit fa5dc167e8a8207fe9474cd4ea52b965f098837a
Author: Christofer Dutz 
AuthorDate: Wed Mar 7 10:35:53 2018 +0100

- Added test-constructors to the Modbus drivers.
- Added some documentation on creating drivers.
---
 .../connection/ModbusSerialPlcConnection.java  |   8 +-
 .../modbus/connection/ModbusTcpPlcConnection.java  |  10 +-
 .../asciidoc/developers/implementing-drivers.adoc  | 253 +
 plc4j/protocols/src/site/site.xml  |  33 +++
 4 files changed, 299 insertions(+), 5 deletions(-)

diff --git 
a/plc4j/protocols/modbus/src/main/java/org/apache/plc4x/java/modbus/connection/ModbusSerialPlcConnection.java
 
b/plc4j/protocols/modbus/src/main/java/org/apache/plc4x/java/modbus/connection/ModbusSerialPlcConnection.java
index 696181d..915a968 100644
--- 
a/plc4j/protocols/modbus/src/main/java/org/apache/plc4x/java/modbus/connection/ModbusSerialPlcConnection.java
+++ 
b/plc4j/protocols/modbus/src/main/java/org/apache/plc4x/java/modbus/connection/ModbusSerialPlcConnection.java
@@ -22,6 +22,7 @@ import io.netty.channel.Channel;
 import io.netty.channel.ChannelHandler;
 import io.netty.channel.ChannelInitializer;
 import io.netty.channel.ChannelPipeline;
+import org.apache.plc4x.java.base.connection.ChannelFactory;
 import org.apache.plc4x.java.base.connection.SerialChannelFactory;
 import org.apache.plc4x.java.modbus.netty.ModbusProtocol;
 import org.apache.plc4x.java.modbus.netty.ModbusSerialProtocol;
@@ -37,16 +38,19 @@ public class ModbusSerialPlcConnection extends 
BaseModbusPlcConnection {
 
 public ModbusSerialPlcConnection(String port, String params) {
 super(new SerialChannelFactory(port), params);
-
 logger.info("Configured ModbusSerialPlcConnection with: serial-port 
{}", port);
 }
 
+ModbusSerialPlcConnection(ChannelFactory channelFactory, String params) {
+super(channelFactory, params);
+}
+
 @Override
 protected ChannelHandler getChannelHandler(CompletableFuture 
sessionSetupCompleteFuture) {
 return new ChannelInitializer() {
 @Override
 protected void initChannel(Channel channel) {
-// Build the protocol stack for communicating with the s7 
protocol.
+// Build the protocol stack for communicating with the Modbus 
protocol.
 ChannelPipeline pipeline = channel.pipeline();
 pipeline.addLast(new ModbusSerialProtocol());
 pipeline.addLast(new ModbusProtocol());
diff --git 
a/plc4j/protocols/modbus/src/main/java/org/apache/plc4x/java/modbus/connection/ModbusTcpPlcConnection.java
 
b/plc4j/protocols/modbus/src/main/java/org/apache/plc4x/java/modbus/connection/ModbusTcpPlcConnection.java
index fc2a9b2..373e96f 100644
--- 
a/plc4j/protocols/modbus/src/main/java/org/apache/plc4x/java/modbus/connection/ModbusTcpPlcConnection.java
+++ 
b/plc4j/protocols/modbus/src/main/java/org/apache/plc4x/java/modbus/connection/ModbusTcpPlcConnection.java
@@ -19,6 +19,7 @@ under the License.
 package org.apache.plc4x.java.modbus.connection;
 
 import io.netty.channel.*;
+import org.apache.plc4x.java.base.connection.ChannelFactory;
 import org.apache.plc4x.java.base.connection.TcpSocketChannelFactory;
 import org.apache.plc4x.java.modbus.netty.ModbusProtocol;
 import org.apache.plc4x.java.modbus.netty.ModbusTcpProtocol;
@@ -36,17 +37,20 @@ public class ModbusTcpPlcConnection extends 
BaseModbusPlcConnection {
 private static final Logger logger = 
LoggerFactory.getLogger(ModbusTcpPlcConnection.class);
 
 public ModbusTcpPlcConnection(InetAddress address, String params) {
-super(new TcpSocketChannelFactory(address, MODBUS_TCP_PORT), params);
-
+this(new TcpSocketChannelFactory(address, MODBUS_TCP_PORT), params);
 logger.info("Configured ModbusTcpPlcConnection with: host-name {}", 
address.getHostAddress());
 }
 
+ModbusTcpPlcConnection(ChannelFactory channelFactory, String params) {
+super(channelFactory, params);
+}
+
 @Override
 protected ChannelHandler getChannelHandler(CompletableFuture 
sessionSetupCompleteFuture) {
 return new ChannelInitializer() {
 @Override
 protected void initChannel(Channel channel) {
-// Build the protocol stack for communicating with the s7 
protocol.
+// Build the protocol stack for communicating with the Modbus 
protocol.
 ChannelPipeline pipeline = channel.pipeline();
 pipeline.addLast(new ModbusTcpProtocol());