]> git.basschouten.com Git - openhab-addons.git/blob
9bcc7382ce86cf36e3dc6f571ecf599492f86fee
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
7  * This program and the accompanying materials are made available under the
8  * terms of the Eclipse Public License 2.0 which is available at
9  * http://www.eclipse.org/legal/epl-2.0
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.knx.internal.client;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
17 import org.openhab.binding.knx.internal.handler.GroupAddressListener;
18
19 import tuwien.auto.calimero.IndividualAddress;
20 import tuwien.auto.calimero.KNXException;
21 import tuwien.auto.calimero.datapoint.Datapoint;
22
23 /**
24  *
25  * @author Simon Kaufmann - initial contribution and API
26  *
27  */
28 @NonNullByDefault
29 public class NoOpClient implements KNXClient {
30
31     @Override
32     public boolean isConnected() {
33         return false;
34     }
35
36     @Override
37     public boolean isReachable(@Nullable IndividualAddress address) throws KNXException {
38         return false;
39     }
40
41     @Override
42     public DeviceInfoClient getDeviceInfoClient() {
43         throw new IllegalStateException("KNX client not properly configured");
44     }
45
46     @Override
47     public void restartNetworkDevice(@Nullable IndividualAddress address) {
48         throw new IllegalStateException("KNX client not properly configured");
49     }
50
51     @Override
52     public boolean registerGroupAddressListener(GroupAddressListener listener) {
53         return false;
54     }
55
56     @Override
57     public boolean unregisterGroupAddressListener(GroupAddressListener listener) {
58         return false;
59     }
60
61     @Override
62     public void readDatapoint(Datapoint datapoint) {
63     }
64
65     @Override
66     public void writeToKNX(OutboundSpec commandSpec) throws KNXException {
67     }
68
69     @Override
70     public void respondToKNX(OutboundSpec responseSpec) throws KNXException {
71     }
72 }