]> git.basschouten.com Git - openhab-addons.git/commitdiff
[knx] Upgrade Calimero library to release 2.5. (#11759)
authorHolger Friedrich <holgerfriedrich@users.noreply.github.com>
Sun, 12 Dec 2021 11:55:09 +0000 (12:55 +0100)
committerGitHub <noreply@github.com>
Sun, 12 Dec 2021 11:55:09 +0000 (12:55 +0100)
- Upstream update of base library for KNX access from v2.4 to v2.5.
- Adapt AbstractKNXClient to new interface and replace calls of deprecated
  methods.
Fixes #6849.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
bundles/org.openhab.binding.knx/pom.xml
bundles/org.openhab.binding.knx/src/main/java/org/openhab/binding/knx/internal/client/AbstractKNXClient.java

index 0fd8b473bb5fd697ef2d75558ee4f9249d30066e..f7faff1148a825c49c26fee36a12ffa3b271be1b 100644 (file)
@@ -22,7 +22,7 @@
     <dependency>
       <groupId>com.github.calimero</groupId>
       <artifactId>calimero-core</artifactId>
-      <version>2.4</version>
+      <version>2.5</version>
       <scope>compile</scope>
       <exclusions>
         <exclusion>
@@ -34,7 +34,7 @@
     <dependency>
       <groupId>com.github.calimero</groupId>
       <artifactId>calimero-device</artifactId>
-      <version>2.4</version>
+      <version>2.5</version>
       <scope>compile</scope>
       <exclusions>
         <exclusion>
@@ -46,7 +46,7 @@
     <dependency>
       <groupId>com.github.calimero</groupId>
       <artifactId>calimero-rxtx</artifactId>
-      <version>2.4</version>
+      <version>2.5</version>
       <scope>compile</scope>
       <exclusions>
         <exclusion>
index de860c6bed2747ead0af9c39b8ac497e3ec3b003..a791cea90b0f59b404d45d793e18d3bcc0d46297 100644 (file)
@@ -12,6 +12,7 @@
  */
 package org.openhab.binding.knx.internal.client;
 
+import java.time.Duration;
 import java.util.Set;
 import java.util.concurrent.CopyOnWriteArraySet;
 import java.util.concurrent.LinkedBlockingQueue;
@@ -48,7 +49,7 @@ import tuwien.auto.calimero.mgmt.ManagementClient;
 import tuwien.auto.calimero.mgmt.ManagementClientImpl;
 import tuwien.auto.calimero.mgmt.ManagementProcedures;
 import tuwien.auto.calimero.mgmt.ManagementProceduresImpl;
-import tuwien.auto.calimero.process.ProcessCommunicationBase;
+import tuwien.auto.calimero.process.ProcessCommunication;
 import tuwien.auto.calimero.process.ProcessCommunicator;
 import tuwien.auto.calimero.process.ProcessCommunicatorImpl;
 import tuwien.auto.calimero.process.ProcessEvent;
@@ -181,17 +182,17 @@ public abstract class AbstractKNXClient implements NetworkLinkListener, KNXClien
             managementProcedures = new ManagementProceduresImpl(link);
 
             ManagementClient managementClient = new ManagementClientImpl(link);
-            managementClient.setResponseTimeout(responseTimeout);
+            managementClient.responseTimeout(Duration.ofSeconds(responseTimeout));
             this.managementClient = managementClient;
 
             deviceInfoClient = new DeviceInfoClientImpl(managementClient);
 
             ProcessCommunicator processCommunicator = new ProcessCommunicatorImpl(link);
-            processCommunicator.setResponseTimeout(responseTimeout);
+            processCommunicator.responseTimeout(Duration.ofSeconds(responseTimeout));
             processCommunicator.addProcessListener(processListener);
             this.processCommunicator = processCommunicator;
 
-            ProcessCommunicationResponder responseCommunicator = new ProcessCommunicationResponder(link);
+            ProcessCommunicationResponder responseCommunicator = new ProcessCommunicationResponder(link, null);
             this.responseCommunicator = responseCommunicator;
 
             link.addLinkListener(this);
@@ -439,7 +440,7 @@ public abstract class AbstractKNXClient implements NetworkLinkListener, KNXClien
         }
     }
 
-    private void sendToKNX(ProcessCommunicationBase communicator, KNXNetworkLink link, GroupAddress groupAddress,
+    private void sendToKNX(ProcessCommunication communicator, KNXNetworkLink link, GroupAddress groupAddress,
             String dpt, Type type) throws KNXException {
         if (!connectIfNotAutomatic()) {
             return;