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 2026/08/16 13:42:20 UTC

(plc4x) 03/04: chore(plc4j/ctrlx): Made the CtlrXDriver report the correct supported functions.

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

chrisdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git

commit 88c3b16a569714e3488378427f8673fc3791d3d0
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Sun Aug 16 15:38:07 2026 +0200

    chore(plc4j/ctrlx): Made the CtlrXDriver report the correct supported functions.
---
 .../java/ctrlx/readwrite/connection/CtrlXConnection.java  | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/plc4j/drivers/ctrlx/src/main/java/org/apache/plc4x/java/ctrlx/readwrite/connection/CtrlXConnection.java b/plc4j/drivers/ctrlx/src/main/java/org/apache/plc4x/java/ctrlx/readwrite/connection/CtrlXConnection.java
index 555301e6b4..7635fa8d17 100644
--- a/plc4j/drivers/ctrlx/src/main/java/org/apache/plc4x/java/ctrlx/readwrite/connection/CtrlXConnection.java
+++ b/plc4j/drivers/ctrlx/src/main/java/org/apache/plc4x/java/ctrlx/readwrite/connection/CtrlXConnection.java
@@ -132,27 +132,34 @@ public class CtrlXConnection implements PlcConnection, PlcPinger, PlcBrowser {
         return Optional.ofNullable(plcTag);
     }
 
+    /**
+     * Reading, writing and subscribing are not implemented - the corresponding request builders
+     * return {@code null}. Browsing has an implementation, but it does not work yet. Reporting any
+     * of them as supported makes callers that check the metadata first (the connection cache and
+     * the tooling among them) attempt an operation that cannot succeed, so all four are reported
+     * as unsupported until they actually work.
+     */
     @Override
     public PlcConnectionMetadata getMetadata() {
         return new PlcConnectionMetadata() {
             @Override
             public boolean isReadSupported() {
-                return true;
+                return false;
             }
 
             @Override
             public boolean isWriteSupported() {
-                return true;
+                return false;
             }
 
             @Override
             public boolean isSubscribeSupported() {
-                return true;
+                return false;
             }
 
             @Override
             public boolean isBrowseSupported() {
-                return true;
+                return false;
             }
         };
     }