Skip to content

Commit

Permalink
[knx] Upgrade Calimero library to release 2.5. (#11759)
Browse files Browse the repository at this point in the history
- 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>
  • Loading branch information
holgerfriedrich authored Dec 12, 2021
1 parent e9ac2be commit 4a58a51
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions bundles/org.openhab.binding.knx/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand All @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -48,7 +49,7 @@
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;
Expand Down Expand Up @@ -181,17 +182,17 @@ private synchronized boolean connect() {
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);
Expand Down Expand Up @@ -439,7 +440,7 @@ public void respondToKNX(OutboundSpec responseSpec) throws KNXException {
}
}

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;
Expand Down

0 comments on commit 4a58a51

Please sign in to comment.