You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2018/10/24 20:29:56 UTC

[incubator-plc4x] branch master updated (d58e523 -> 1a80a93)

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

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


    from d58e523  - Moved the analysis back to our 'plc4x' node (Just checking, if this works)
     new b8a391e  - Resolving some simple Sonar findings
     new 8b146e1  - Resolving some simple Sonar findings
     new f8e215a  - Resolving some simple Sonar findings
     new a6b3fe3  - Resolving some simple Sonar findings
     new 7d5d2f8  - Resolving some simple Sonar findings
     new 23d7afb  - Resolving some simple Sonar findings
     new 1a80a93  - Added List-Producers to the Edgent integration to support multi-value responses. - Adjusted the IotElasticsearchFactory to work after the latest changes to API and Edgent Integration

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


Summary of changes:
 .../azure/iothub/S7PlcToAzureIoTHubSample.java     |  9 +--
 .../google/iotcore/S7PlcToGoogleIoTCoreSample.java | 18 +++--
 .../iotfactory/IotElasticsearchFactory.java        | 27 ++++----
 .../apache/plc4x/edgent/PlcConnectionAdapter.java  | 79 ++++++++++++++++++++++
 .../java/org/apache/plc4x/edgent/PlcFunctions.java | 45 ++++++++++++
 .../messages/DefaultPlcProprietaryRequest.java     |  3 +-
 .../org/apache/plc4x/java/base/util/HexUtil.java   |  3 +-
 .../ethernetip/netty/Plc4XEtherNetIpProtocol.java  |  2 +-
 .../org/apache/plc4x/java/s7/netty/S7Protocol.java | 18 +++--
 9 files changed, 166 insertions(+), 38 deletions(-)


[incubator-plc4x] 05/07: - Resolving some simple Sonar findings

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

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

commit 7d5d2f8d80d94dfb6315d829d15dcfe1a0bb51f3
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Wed Oct 24 21:28:16 2018 +0100

    - Resolving some simple Sonar findings
---
 .../org/apache/plc4x/java/ethernetip/netty/Plc4XEtherNetIpProtocol.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/netty/Plc4XEtherNetIpProtocol.java b/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/netty/Plc4XEtherNetIpProtocol.java
index 49087c1..a4d823f 100644
--- a/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/netty/Plc4XEtherNetIpProtocol.java
+++ b/plc4j/protocols/ethernetip/src/main/java/org/apache/plc4x/java/ethernetip/netty/Plc4XEtherNetIpProtocol.java
@@ -121,7 +121,7 @@ public class Plc4XEtherNetIpProtocol extends MessageToMessageCodec<EnipPacket, P
     protected void encode(ChannelHandlerContext ctx, PlcRequestContainer<InternalPlcRequest, InternalPlcResponse> msg, List<Object> out) {
         LOGGER.trace("(<--OUT): {}, {}, {}", ctx, msg, out);
         // Reset transactionId on overflow
-        messageId.compareAndSet(Short.MAX_VALUE + 1, 0);
+        messageId.compareAndSet(Short.MAX_VALUE + 1L, 0);
         PlcRequest request = msg.getRequest();
         if (request instanceof PlcReadRequest) {
             encodeReadRequest(msg, out);


[incubator-plc4x] 04/07: - Resolving some simple Sonar findings

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

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

commit a6b3fe3f5fa8dcb277fd369a980c7781fcf005b6
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Wed Oct 24 21:27:53 2018 +0100

    - Resolving some simple Sonar findings
---
 .../test/src/main/java/org/apache/plc4x/java/base/util/HexUtil.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/plc4j/protocols/driver-bases/test/src/main/java/org/apache/plc4x/java/base/util/HexUtil.java b/plc4j/protocols/driver-bases/test/src/main/java/org/apache/plc4x/java/base/util/HexUtil.java
index 40e5680..83b425c 100644
--- a/plc4j/protocols/driver-bases/test/src/main/java/org/apache/plc4x/java/base/util/HexUtil.java
+++ b/plc4j/protocols/driver-bases/test/src/main/java/org/apache/plc4x/java/base/util/HexUtil.java
@@ -21,6 +21,7 @@ package org.apache.plc4x.java.base.util;
 
 import org.apache.commons.io.HexDump;
 import org.apache.commons.lang3.ArrayUtils;
+import org.apache.plc4x.java.api.exceptions.PlcRuntimeException;
 
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
@@ -42,7 +43,7 @@ public class HexUtil {
             HexDump.dump(bytes, 0, byteArrayOutputStream, 0);
             return byteArrayOutputStream.toString();
         } catch (IOException e) {
-            throw new RuntimeException(e);
+            throw new PlcRuntimeException(e);
         }
     }
 }


[incubator-plc4x] 02/07: - Resolving some simple Sonar findings

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

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

commit 8b146e1836769217dcd0908f9da73a8c00256411
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Wed Oct 24 21:27:21 2018 +0100

    - Resolving some simple Sonar findings
---
 .../java/examples/azure/iothub/S7PlcToAzureIoTHubSample.java     | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/examples/azure/src/main/java/org/apache/plc4x/java/examples/azure/iothub/S7PlcToAzureIoTHubSample.java b/examples/azure/src/main/java/org/apache/plc4x/java/examples/azure/iothub/S7PlcToAzureIoTHubSample.java
index a9994be..1d6d3fa 100644
--- a/examples/azure/src/main/java/org/apache/plc4x/java/examples/azure/iothub/S7PlcToAzureIoTHubSample.java
+++ b/examples/azure/src/main/java/org/apache/plc4x/java/examples/azure/iothub/S7PlcToAzureIoTHubSample.java
@@ -53,15 +53,13 @@ public class S7PlcToAzureIoTHubSample {
         String iotConnectionString = args[2];
         LOGGER.info("Connecting {}, {}, {}", plc4xConnectionString, addressString, iotConnectionString);
 
-        // Open a connection to the remote PLC.
-        try (PlcConnection plcConnection = new PlcDriverManager().getConnection(plc4xConnectionString)) {
+        // Open both a connection to the remote PLC as well as a connection to the cloud service.
+        try (PlcConnection plcConnection = new PlcDriverManager().getConnection(plc4xConnectionString);
+             DeviceClient client = new DeviceClient(iotConnectionString, IotHubClientProtocol.MQTT)) {
             LOGGER.info("Connected");
 
-            // Open a connection to the cloud service.
-            DeviceClient client = new DeviceClient(iotConnectionString, IotHubClientProtocol.MQTT);
             client.open();
 
-
             // Prepare a read request.
             PlcReadRequest request = plcConnection.readRequestBuilder().get().addItem(FIELD_NAME, addressString).build();
 
@@ -82,7 +80,6 @@ public class S7PlcToAzureIoTHubSample {
                 // Wait a second.
                 TimeUnit.SECONDS.sleep(1);
             }
-
         }
     }
 }


[incubator-plc4x] 03/07: - Resolving some simple Sonar findings

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

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

commit f8e215ab8bea291fb71096035bb6f23c6f715fc6
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Wed Oct 24 21:27:27 2018 +0100

    - Resolving some simple Sonar findings
---
 .../google/iotcore/S7PlcToGoogleIoTCoreSample.java     | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/examples/google/src/main/java/org/apache/plc4x/java/examples/google/iotcore/S7PlcToGoogleIoTCoreSample.java b/examples/google/src/main/java/org/apache/plc4x/java/examples/google/iotcore/S7PlcToGoogleIoTCoreSample.java
index 0bb8b0e..ba93c46 100644
--- a/examples/google/src/main/java/org/apache/plc4x/java/examples/google/iotcore/S7PlcToGoogleIoTCoreSample.java
+++ b/examples/google/src/main/java/org/apache/plc4x/java/examples/google/iotcore/S7PlcToGoogleIoTCoreSample.java
@@ -31,10 +31,13 @@ import org.joda.time.DateTime;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.IOException;
 import java.nio.ByteBuffer;
 import java.nio.file.Files;
 import java.nio.file.Paths;
 import java.security.KeyFactory;
+import java.security.NoSuchAlgorithmException;
+import java.security.spec.InvalidKeySpecException;
 import java.security.spec.PKCS8EncodedKeySpec;
 
 // [START iot_mqtt_includes]
@@ -49,7 +52,8 @@ public class S7PlcToGoogleIoTCoreSample {
     /**
      * Create a Cloud IoT Core JWT for the given project id, signed with the given RSA key.
      */
-    private static String createJwtRsa(String projectId, String privateKeyFile) throws Exception {
+    private static String createJwtRsa(String projectId, String privateKeyFile)
+        throws IOException, NoSuchAlgorithmException, InvalidKeySpecException {
         DateTime now = new DateTime();
         // Create a JWT to authenticate this device. The device will be disconnected after the token
         // expires, and will have to reconnect with a new token. The audience field should always be set
@@ -70,7 +74,8 @@ public class S7PlcToGoogleIoTCoreSample {
     /**
      * Create a Cloud IoT Core JWT for the given project id, signed with the given ES key.
      */
-    private static String createJwtEs(String projectId, String privateKeyFile) throws Exception {
+    private static String createJwtEs(String projectId, String privateKeyFile)
+        throws IOException, NoSuchAlgorithmException, InvalidKeySpecException {
         DateTime now = new DateTime();
         // Create a JWT to authenticate this device. The device will be disconnected after the token
         // expires, and will have to reconnect with a new token. The audience field should always be set
@@ -121,7 +126,8 @@ public class S7PlcToGoogleIoTCoreSample {
     // [END iot_mqtt_configcallback]
 
 
-    private static void setConnectPassword(MqttExampleOptions options, MqttConnectOptions connectOptions) throws Exception {
+    private static void setConnectPassword(MqttExampleOptions options, MqttConnectOptions connectOptions)
+        throws NoSuchAlgorithmException, IOException, InvalidKeySpecException {
         switch (options.algorithm) {
             case "RS256":
                 connectOptions.setPassword(
@@ -220,7 +226,7 @@ public class S7PlcToGoogleIoTCoreSample {
         attachCallback(client, options.deviceId);
 
         // Publish to the events or state topic based on the flag.
-        String subTopic = options.messageType.equals("event") ? "events" : options.messageType;
+        String subTopic = "event".equals(options.messageType) ? "events" : options.messageType;
 
         // The MQTT topic that this device will publish telemetry data to. The MQTT topic name is
         // required to be in the format below. Note that this is not the same as the device registry's
@@ -242,7 +248,7 @@ public class S7PlcToGoogleIoTCoreSample {
                 // [START iot_mqtt_jwt_refresh]
                 long secsSinceRefresh = ((new DateTime()).getMillis() - iat.getMillis()) / 1000;
                 if (secsSinceRefresh > (options.tokenExpMins * 60)) {
-                    System.out.format("\tRefreshing token after: %d seconds\n", secsSinceRefresh);
+                    System.out.format("\tRefreshing token after: %d seconds%n", secsSinceRefresh);
                     iat = new DateTime();
                     setConnectPassword(options, connectOptions);
                     client.disconnect();
@@ -262,7 +268,7 @@ public class S7PlcToGoogleIoTCoreSample {
                     MqttMessage message = new MqttMessage(array);
                     message.setQos(1);
                     client.publish(mqttTopic, message);
-                    if (options.messageType.equals("event")) {
+                    if ("event".equals(options.messageType)) {
                         // Send telemetry events every second
                         Thread.sleep(1000);
                     } else {


[incubator-plc4x] 06/07: - Resolving some simple Sonar findings

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

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

commit 23d7afbfe11574af027e5ba57018bf39d6ce1c09
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Wed Oct 24 21:28:28 2018 +0100

    - Resolving some simple Sonar findings
---
 .../org/apache/plc4x/java/s7/netty/S7Protocol.java     | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/plc4j/protocols/s7/src/main/java/org/apache/plc4x/java/s7/netty/S7Protocol.java b/plc4j/protocols/s7/src/main/java/org/apache/plc4x/java/s7/netty/S7Protocol.java
index d40f953..32d1a42 100644
--- a/plc4j/protocols/s7/src/main/java/org/apache/plc4x/java/s7/netty/S7Protocol.java
+++ b/plc4j/protocols/s7/src/main/java/org/apache/plc4x/java/s7/netty/S7Protocol.java
@@ -32,10 +32,13 @@ import org.apache.plc4x.java.isotp.netty.events.IsoTPConnectedEvent;
 import org.apache.plc4x.java.isotp.netty.model.IsoTPMessage;
 import org.apache.plc4x.java.isotp.netty.model.tpdus.DataTpdu;
 import org.apache.plc4x.java.s7.netty.events.S7ConnectedEvent;
-import org.apache.plc4x.java.s7.netty.model.messages.*;
+import org.apache.plc4x.java.s7.netty.model.messages.S7Message;
+import org.apache.plc4x.java.s7.netty.model.messages.S7RequestMessage;
+import org.apache.plc4x.java.s7.netty.model.messages.S7ResponseMessage;
+import org.apache.plc4x.java.s7.netty.model.messages.SetupCommunicationRequestMessage;
 import org.apache.plc4x.java.s7.netty.model.params.*;
-import org.apache.plc4x.java.s7.netty.model.params.items.VarParameterItem;
 import org.apache.plc4x.java.s7.netty.model.params.items.S7AnyVarParameterItem;
+import org.apache.plc4x.java.s7.netty.model.params.items.VarParameterItem;
 import org.apache.plc4x.java.s7.netty.model.payloads.CpuServicesPayload;
 import org.apache.plc4x.java.s7.netty.model.payloads.S7Payload;
 import org.apache.plc4x.java.s7.netty.model.payloads.VarPayload;
@@ -47,7 +50,6 @@ import org.apache.plc4x.java.s7.netty.strategies.DefaultS7MessageProcessor;
 import org.apache.plc4x.java.s7.netty.strategies.S7MessageProcessor;
 import org.apache.plc4x.java.s7.netty.util.S7SizeHelper;
 import org.apache.plc4x.java.s7.types.S7ControllerType;
-import org.apache.plc4x.java.s7.netty.model.types.TransportSize;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -417,7 +419,6 @@ public class S7Protocol extends ChannelDuplexHandler {
         }
 
         List<S7Parameter> s7Parameters = new LinkedList<>();
-        VarParameter readWriteVarParameter = null;
         int i = 0;
 
         while (i < headerParametersLength) {
@@ -426,9 +427,6 @@ public class S7Protocol extends ChannelDuplexHandler {
             if (parameter instanceof SetupCommunicationParameter) {
                 handleSetupCommunications(ctx, (SetupCommunicationParameter) parameter);
             }
-            if (parameter instanceof VarParameter) {
-                readWriteVarParameter = (VarParameter) parameter;
-            }
             i += S7SizeHelper.getParameterLength(parameter);
         }
 
@@ -606,15 +604,15 @@ public class S7Protocol extends ChannelDuplexHandler {
         // If the length is not 4, then it has to be at least 8.
         else if(length >= 8) {
             // TODO: We should probably ensure we don't read more than this.
-            short partialListLengthInWords = userData.readShort();
+            // Skip the partial list length in words.
+            userData.skipBytes(2);
             short partialListCount = userData.readShort();
             List<SslDataRecord> sslDataRecords = new LinkedList<>();
             for(int i = 0; i < partialListCount; i++) {
                 short index = userData.readShort();
                 byte[] articleNumberBytes = new byte[20];
                 userData.readBytes(articleNumberBytes);
-                String articleNumber = null;
-                articleNumber = new String(articleNumberBytes, StandardCharsets.UTF_8).trim();
+                String articleNumber = new String(articleNumberBytes, StandardCharsets.UTF_8).trim();
                 short bgType = userData.readShort();
                 short moduleOrOsVersion = userData.readShort();
                 short pgDescriptionFileVersion = userData.readShort();


[incubator-plc4x] 01/07: - Resolving some simple Sonar findings

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

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

commit b8a391e27dd6a2ecffa4051b1d2624f1d96cfb3b
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Wed Oct 24 12:30:18 2018 +0100

    - Resolving some simple Sonar findings
---
 .../apache/plc4x/java/base/messages/DefaultPlcProprietaryRequest.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/plc4j/protocols/driver-bases/base/src/main/java/org/apache/plc4x/java/base/messages/DefaultPlcProprietaryRequest.java b/plc4j/protocols/driver-bases/base/src/main/java/org/apache/plc4x/java/base/messages/DefaultPlcProprietaryRequest.java
index 4e73899..fc06a26 100644
--- a/plc4j/protocols/driver-bases/base/src/main/java/org/apache/plc4x/java/base/messages/DefaultPlcProprietaryRequest.java
+++ b/plc4j/protocols/driver-bases/base/src/main/java/org/apache/plc4x/java/base/messages/DefaultPlcProprietaryRequest.java
@@ -18,6 +18,7 @@
  */
 package org.apache.plc4x.java.base.messages;
 
+import org.apache.plc4x.java.api.exceptions.PlcRuntimeException;
 import org.apache.plc4x.java.api.messages.PlcResponse;
 
 import java.util.concurrent.CompletableFuture;
@@ -26,7 +27,7 @@ public class DefaultPlcProprietaryRequest<REQUEST> implements InternalPlcProprie
 
     @Override
     public CompletableFuture<PlcResponse> execute() {
-        throw new RuntimeException("not supported"); // TODO: figure out what to do with this
+        throw new PlcRuntimeException("not supported"); // TODO: figure out what to do with this
     }
 
     private REQUEST proprietaryRequest;


[incubator-plc4x] 07/07: - Added List-Producers to the Edgent integration to support multi-value responses. - Adjusted the IotElasticsearchFactory to work after the latest changes to API and Edgent Integration

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

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

commit 1a80a93b92a17259a686704dd15be9cfdb384d47
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Wed Oct 24 21:29:50 2018 +0100

    - Added List-Producers to the Edgent integration to support multi-value responses.
    - Adjusted the IotElasticsearchFactory to work after the latest changes to API and Edgent Integration
---
 .../iotfactory/IotElasticsearchFactory.java        | 27 ++++----
 .../apache/plc4x/edgent/PlcConnectionAdapter.java  | 79 ++++++++++++++++++++++
 .../java/org/apache/plc4x/edgent/PlcFunctions.java | 45 ++++++++++++
 3 files changed, 138 insertions(+), 13 deletions(-)

diff --git a/examples/iot-factory/src/main/java/org/apache/plc4x/java/examples/iotfactory/IotElasticsearchFactory.java b/examples/iot-factory/src/main/java/org/apache/plc4x/java/examples/iotfactory/IotElasticsearchFactory.java
index 35e78f4..7331be2 100644
--- a/examples/iot-factory/src/main/java/org/apache/plc4x/java/examples/iotfactory/IotElasticsearchFactory.java
+++ b/examples/iot-factory/src/main/java/org/apache/plc4x/java/examples/iotfactory/IotElasticsearchFactory.java
@@ -44,6 +44,7 @@ import java.io.IOException;
 import java.util.Calendar;
 import java.util.Collection;
 import java.util.Collections;
+import java.util.List;
 import java.util.concurrent.TimeUnit;
 
 public class IotElasticsearchFactory {
@@ -148,9 +149,9 @@ public class IotElasticsearchFactory {
 
             // Define the event stream.
             // 1) PLC4X source generating a stream of bytes.
-            Supplier<Byte> plcSupplier = PlcFunctions.byteSupplier(plcAdapter, "%Q0:BYTE");
+            Supplier<List<Boolean>> plcSupplier = PlcFunctions.booleanListSupplier(plcAdapter, "%Q0:BYTE");
             // 2) Use polling to get an item from the byte-stream in regular intervals.
-            TStream<Byte> plcOutputStates = top.poll(plcSupplier, 100, TimeUnit.MILLISECONDS);
+            TStream<List<Boolean>> plcOutputStates = top.poll(plcSupplier, 100, TimeUnit.MILLISECONDS);
 
             // 3a) Create a stream that pumps all data into a 'factory-data' index.
             TStream<XContentBuilder> factoryData = plcOutputStates.map(this::translatePlcInput);
@@ -172,14 +173,14 @@ public class IotElasticsearchFactory {
         }
     }
 
-    private XContentBuilder translatePlcInput(Byte input) {
-        boolean conveyorEntry = (input & 1) != 0;
-        boolean load = (input & 2) != 0;
-        boolean unload = (input & 4) != 0;
-        boolean transferLeft = (input & 8) != 0;
-        boolean transferRight = (input & 16) != 0;
-        boolean conveyorLeft = (input & 32) != 0;
-        boolean conveyorRight = (input & 64) != 0;
+    private XContentBuilder translatePlcInput(List<Boolean> input) {
+        boolean conveyorEntry = input.get(0);
+        boolean load = input.get(1);
+        boolean unload = input.get(2);
+        boolean transferLeft = input.get(3);
+        boolean transferRight = input.get(4);
+        boolean conveyorLeft = input.get(5);
+        boolean conveyorRight = input.get(6);
 
         try(XContentBuilder builder = XContentFactory.jsonBuilder()
             .startObject()
@@ -198,9 +199,9 @@ public class IotElasticsearchFactory {
         }
     }
 
-    private XContentBuilder handlePlcInput(Byte input) {
-        boolean transferLeft = (input & 8) != 0;
-        boolean transferRight = (input & 16) != 0;
+    private XContentBuilder handlePlcInput(List<Boolean> input) {
+        boolean transferLeft = input.get(3);
+        boolean transferRight = input.get(4);
 
         if (conveyorState == ConveyorState.STOPPED) {
             if (transferLeft) {
diff --git a/integrations/apache-edgent/src/main/java/org/apache/plc4x/edgent/PlcConnectionAdapter.java b/integrations/apache-edgent/src/main/java/org/apache/plc4x/edgent/PlcConnectionAdapter.java
index a52cd34..0f148d7 100644
--- a/integrations/apache-edgent/src/main/java/org/apache/plc4x/edgent/PlcConnectionAdapter.java
+++ b/integrations/apache-edgent/src/main/java/org/apache/plc4x/edgent/PlcConnectionAdapter.java
@@ -36,6 +36,8 @@ import org.slf4j.LoggerFactory;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.LocalTime;
+import java.util.Collections;
+import java.util.List;
 
 /**
  * PlcConnectionAdapter encapsulates a plc4x {@link PlcConnection}.
@@ -129,6 +131,11 @@ public class PlcConnectionAdapter implements AutoCloseable {
         return new MySupplier<>(genericDatatype, clientDatatype, fieldQuery);
     }
 
+    <T> Supplier<List<T>> newListSupplier(Class<T> genericDatatype, PlcClientDatatype clientDatatype, String fieldQuery) {
+        // satisfy sonar's "Reduce number of anonymous class lines" code smell
+        return new MyListSupplier<>(genericDatatype, clientDatatype, fieldQuery);
+    }
+
     private class MySupplier<T> implements Supplier<T> {
 
         private static final long serialVersionUID = 1L;
@@ -154,6 +161,9 @@ public class PlcConnectionAdapter implements AutoCloseable {
                 PlcReadResponse readResponse = readRequest.execute().get();
                 Object value = null;
                 switch (clientDatatype) {
+                    case BOOLEAN:
+                        value = readResponse.getBoolean(FIELD_NAME);
+                        break;
                     case BYTE:
                         value = readResponse.getByte(FIELD_NAME);
                         break;
@@ -199,6 +209,75 @@ public class PlcConnectionAdapter implements AutoCloseable {
         }
     }
 
+    private class MyListSupplier<T> implements Supplier<List<T>> {
+
+        private static final long serialVersionUID = 1L;
+
+        private Class<T> genericDatatype;
+        private PlcClientDatatype clientDatatype;
+        private String fieldQuery;
+
+        MyListSupplier(Class<T> genericDatatype, PlcClientDatatype clientDatatype, String fieldQuery) {
+            this.genericDatatype = genericDatatype;
+            this.clientDatatype = clientDatatype;
+            this.fieldQuery = fieldQuery;
+        }
+
+        @Override
+        @SuppressWarnings("unchecked")
+        public List<T> get() {
+            PlcConnection connection = null;
+            PlcField field = null;
+            try {
+                connection = getConnection();
+                PlcReadRequest readRequest = connection.readRequestBuilder().orElseThrow(() -> new PlcException("This connection doesn't support reading")).addItem(FIELD_NAME, fieldQuery).build();
+                PlcReadResponse readResponse = readRequest.execute().get();
+                Object value = null;
+                switch (clientDatatype) {
+                    case BOOLEAN:
+                        value = readResponse.getAllBooleans(FIELD_NAME);
+                        break;
+                    case BYTE:
+                        value = readResponse.getAllBytes(FIELD_NAME);
+                        break;
+                    case SHORT:
+                        value = readResponse.getAllShorts(FIELD_NAME);
+                        break;
+                    case INTEGER:
+                        value = readResponse.getAllIntegers(FIELD_NAME);
+                        break;
+                    case LONG:
+                        value = readResponse.getAllLongs(FIELD_NAME);
+                        break;
+                    case FLOAT:
+                        value = readResponse.getAllFloats(FIELD_NAME);
+                        break;
+                    case DOUBLE:
+                        value = readResponse.getAllDoubles(FIELD_NAME);
+                        break;
+                    case STRING:
+                        value = readResponse.getAllStrings(FIELD_NAME);
+                        break;
+                    case TIME:
+                        value = readResponse.getAllTimes(FIELD_NAME);
+                        break;
+                    case DATE:
+                        value = readResponse.getAllDates(FIELD_NAME);
+                        break;
+                    case DATE_TIME:
+                        value = readResponse.getAllDateTimes(FIELD_NAME);
+                        break;
+                }
+                if (value != null) {
+                    return Collections.checkedList((List<T>) value, genericDatatype);
+                }
+            } catch (Exception e) {
+                logger.error("reading from plc device {} {} failed", connection, field, e);
+            }
+            return null;
+        }
+    }
+
     <T> Consumer<T> newJsonConsumer(Class<T> genericDatatype, PlcClientDatatype clientDatatype, String fieldQuery) {
         return new ObjectConsumer<>(genericDatatype, clientDatatype, fieldQuery);
     }
diff --git a/integrations/apache-edgent/src/main/java/org/apache/plc4x/edgent/PlcFunctions.java b/integrations/apache-edgent/src/main/java/org/apache/plc4x/edgent/PlcFunctions.java
index ab00c82..58e630d 100644
--- a/integrations/apache-edgent/src/main/java/org/apache/plc4x/edgent/PlcFunctions.java
+++ b/integrations/apache-edgent/src/main/java/org/apache/plc4x/edgent/PlcFunctions.java
@@ -29,6 +29,7 @@ import org.apache.plc4x.java.api.types.PlcClientDatatype;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.LocalTime;
+import java.util.List;
 
 /**
  * WIP - A plc4x Apache Edgent {@link Supplier} and {@link Consumer} connector factory.
@@ -104,46 +105,90 @@ public class PlcFunctions {
         return adapter.newSupplier(Boolean.class, PlcClientDatatype.BOOLEAN, addressStr);
     }
 
+    public static Supplier<List<Boolean>> booleanListSupplier(PlcConnectionAdapter adapter, String addressStr) {
+        return adapter.newListSupplier(Boolean.class, PlcClientDatatype.BOOLEAN, addressStr);
+    }
+
     public static Supplier<Byte> byteSupplier(PlcConnectionAdapter adapter, String addressStr) {
         return adapter.newSupplier(Byte.class, PlcClientDatatype.BYTE, addressStr);
     }
 
+    public static Supplier<List<Byte>> byteListSupplier(PlcConnectionAdapter adapter, String addressStr) {
+        return adapter.newListSupplier(Byte.class, PlcClientDatatype.BYTE, addressStr);
+    }
+
     public static Supplier<Short> shortSupplier(PlcConnectionAdapter adapter, String addressStr) {
         return adapter.newSupplier(Short.class, PlcClientDatatype.SHORT, addressStr);
     }
 
+    public static Supplier<List<Short>> shortListSupplier(PlcConnectionAdapter adapter, String addressStr) {
+        return adapter.newListSupplier(Short.class, PlcClientDatatype.BYTE, addressStr);
+    }
+
     public static Supplier<Integer> integerSupplier(PlcConnectionAdapter adapter, String addressStr) {
         return adapter.newSupplier(Integer.class, PlcClientDatatype.INTEGER, addressStr);
     }
 
+    public static Supplier<List<Integer>> integerListSupplier(PlcConnectionAdapter adapter, String addressStr) {
+        return adapter.newListSupplier(Integer.class, PlcClientDatatype.BYTE, addressStr);
+    }
+
     public static Supplier<Long> longSupplier(PlcConnectionAdapter adapter, String addressStr) {
         return adapter.newSupplier(Long.class, PlcClientDatatype.LONG, addressStr);
     }
 
+    public static Supplier<List<Long>> longListSupplier(PlcConnectionAdapter adapter, String addressStr) {
+        return adapter.newListSupplier(Long.class, PlcClientDatatype.BYTE, addressStr);
+    }
+
     public static Supplier<Float> floatSupplier(PlcConnectionAdapter adapter, String addressStr) {
         return adapter.newSupplier(Float.class, PlcClientDatatype.FLOAT, addressStr);
     }
 
+    public static Supplier<List<Float>> floatListSupplier(PlcConnectionAdapter adapter, String addressStr) {
+        return adapter.newListSupplier(Float.class, PlcClientDatatype.BYTE, addressStr);
+    }
+
     public static Supplier<Double> doubleSupplier(PlcConnectionAdapter adapter, String addressStr) {
         return adapter.newSupplier(Double.class, PlcClientDatatype.DOUBLE, addressStr);
     }
 
+    public static Supplier<List<Double>> doubleListSupplier(PlcConnectionAdapter adapter, String addressStr) {
+        return adapter.newListSupplier(Double.class, PlcClientDatatype.BYTE, addressStr);
+    }
+
     public static Supplier<String> stringSupplier(PlcConnectionAdapter adapter, String addressStr) {
         return adapter.newSupplier(String.class, PlcClientDatatype.STRING, addressStr);
     }
 
+    public static Supplier<List<String>> stringListSupplier(PlcConnectionAdapter adapter, String addressStr) {
+        return adapter.newListSupplier(String.class, PlcClientDatatype.BYTE, addressStr);
+    }
+
     public static Supplier<LocalTime> timeSupplier(PlcConnectionAdapter adapter, String addressStr) {
         return adapter.newSupplier(LocalTime.class, PlcClientDatatype.TIME, addressStr);
     }
 
+    public static Supplier<List<LocalTime>> timeListSupplier(PlcConnectionAdapter adapter, String addressStr) {
+        return adapter.newListSupplier(LocalTime.class, PlcClientDatatype.BYTE, addressStr);
+    }
+
     public static Supplier<LocalDate> dateSupplier(PlcConnectionAdapter adapter, String addressStr) {
         return adapter.newSupplier(LocalDate.class, PlcClientDatatype.DATE, addressStr);
     }
 
+    public static Supplier<List<LocalDate>> dateListSupplier(PlcConnectionAdapter adapter, String addressStr) {
+        return adapter.newListSupplier(LocalDate.class, PlcClientDatatype.BYTE, addressStr);
+    }
+
     public static Supplier<LocalDateTime> dateTimeSupplier(PlcConnectionAdapter adapter, String addressStr) {
         return adapter.newSupplier(LocalDateTime.class, PlcClientDatatype.DATE_TIME, addressStr);
     }
 
+    public static Supplier<List<LocalDateTime>> dateTimeListSupplier(PlcConnectionAdapter adapter, String addressStr) {
+        return adapter.newListSupplier(LocalDateTime.class, PlcClientDatatype.BYTE, addressStr);
+    }
+
     public static Supplier<PlcReadResponse> batchSupplier(PlcConnectionAdapter adapter, PlcReadRequest readRequest) {
         return adapter.newSupplier(readRequest);
     }