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 2022/08/10 19:28:43 UTC

[plc4x] branch feature/ads-symbol-discovery updated (6b832fc88 -> 7fa925ccf)

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

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


    from 6b832fc88 chore(plc4j): Continued implementing the browse functionality
     new 8e13543ce chore(plc4j): Removed an unneeded class
     new 7fa925ccf chore(plc4j): Made the profinet driver sort of react to the case that the PLC rejects the connection

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


Summary of changes:
 .../plc4x/java/ads/connection/AdsConnection.java   | 23 ----------------------
 .../profinet/protocol/ProfinetProtocolLogic.java   |  2 ++
 2 files changed, 2 insertions(+), 23 deletions(-)
 delete mode 100644 plc4j/drivers/ads/src/main/java/org/apache/plc4x/java/ads/connection/AdsConnection.java


[plc4x] 02/02: chore(plc4j): Made the profinet driver sort of react to the case that the PLC rejects the connection

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

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

commit 7fa925ccf3e2234b43fd0aa6926596a1b04ccf72
Author: Christofer Dutz <ch...@rivian.com>
AuthorDate: Wed Aug 10 21:28:36 2022 +0200

    chore(plc4j): Made the profinet driver sort of react to the case that the PLC rejects the connection
---
 .../org/apache/plc4x/java/profinet/protocol/ProfinetProtocolLogic.java  | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/plc4j/drivers/profinet/src/main/java/org/apache/plc4x/java/profinet/protocol/ProfinetProtocolLogic.java b/plc4j/drivers/profinet/src/main/java/org/apache/plc4x/java/profinet/protocol/ProfinetProtocolLogic.java
index b05b3b909..1d6d138e0 100644
--- a/plc4j/drivers/profinet/src/main/java/org/apache/plc4x/java/profinet/protocol/ProfinetProtocolLogic.java
+++ b/plc4j/drivers/profinet/src/main/java/org/apache/plc4x/java/profinet/protocol/ProfinetProtocolLogic.java
@@ -157,6 +157,8 @@ public class ProfinetProtocolLogic extends Plc4xProtocolBase<Ethernet_Frame> {
                 } else {
                     throw new PlcException("Unexpected response");
                 }
+            } else if (dceRpc_packet.getPacketType() == DceRpc_PacketType.REJECT) {
+                throw new PlcException("Device rejected connection request");
             } else {
                 throw new PlcException("Unexpected response");
             }


[plc4x] 01/02: chore(plc4j): Removed an unneeded class

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

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

commit 8e13543ce202abdc18b8612464454c2ba0165359
Author: Christofer Dutz <ch...@rivian.com>
AuthorDate: Wed Aug 10 21:28:08 2022 +0200

    chore(plc4j): Removed an unneeded class
---
 .../plc4x/java/ads/connection/AdsConnection.java   | 23 ----------------------
 1 file changed, 23 deletions(-)

diff --git a/plc4j/drivers/ads/src/main/java/org/apache/plc4x/java/ads/connection/AdsConnection.java b/plc4j/drivers/ads/src/main/java/org/apache/plc4x/java/ads/connection/AdsConnection.java
deleted file mode 100644
index 1c5c02e67..000000000
--- a/plc4j/drivers/ads/src/main/java/org/apache/plc4x/java/ads/connection/AdsConnection.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.apache.plc4x.java.ads.connection;
-
-import org.apache.plc4x.java.api.messages.PlcBrowseRequest;
-import org.apache.plc4x.java.api.messages.PlcBrowseResponse;
-import org.apache.plc4x.java.api.value.PlcValueHandler;
-import org.apache.plc4x.java.spi.configuration.Configuration;
-import org.apache.plc4x.java.spi.connection.*;
-import org.apache.plc4x.java.spi.optimizer.BaseOptimizer;
-
-import java.util.concurrent.CompletableFuture;
-
-public class AdsConnection  extends DefaultNettyPlcConnection {
-
-    public AdsConnection(boolean canRead, boolean canWrite, boolean canSubscribe, boolean canBrowse, PlcFieldHandler fieldHandler, PlcValueHandler valueHandler, Configuration configuration, ChannelFactory channelFactory, boolean awaitSessionSetupComplete, boolean awaitSessionDisconnectComplete, boolean awaitSessionDiscoverComplete, ProtocolStackConfigurer stackConfigurer, BaseOptimizer optimizer) {
-        super(canRead, canWrite, canSubscribe, canBrowse, fieldHandler, valueHandler, configuration, channelFactory, awaitSessionSetupComplete, awaitSessionDisconnectComplete, awaitSessionDiscoverComplete, stackConfigurer, optimizer);
-    }
-
-    @Override
-    public CompletableFuture<PlcBrowseResponse> browse(PlcBrowseRequest browseRequest) {
-        return super.browse(browseRequest);
-    }
-
-}