]> git.basschouten.com Git - openhab-addons.git/blob
082d571ea9bd1c4b3f5217ede2643c45d1c85f2f
[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.homematic.internal.communicator;
14
15 import org.openhab.binding.homematic.internal.model.HmDatapoint;
16 import org.openhab.binding.homematic.internal.model.HmDatapointConfig;
17 import org.openhab.binding.homematic.internal.model.HmDevice;
18
19 /**
20  * Adapter with methods called from events within the {@link HomematicGateway} class.
21  *
22  * @author Gerhard Riegler - Initial contribution
23  */
24 public interface HomematicGatewayAdapter {
25
26     /**
27      * Called when a datapoint has been updated.
28      */
29     public void onStateUpdated(HmDatapoint dp);
30
31     /**
32      * Called when a new device has been detected on the gateway.
33      */
34     public void onNewDevice(HmDevice device);
35
36     /**
37      * Called when a device has been deleted from the gateway.
38      */
39     public void onDeviceDeleted(HmDevice device);
40
41     /**
42      * Called when the devices values should be reloaded from the gateway.
43      */
44     public void reloadDeviceValues(HmDevice device);
45
46     /**
47      * Called when all values for all devices should be reloaded from the gateway.
48      */
49     public void reloadAllDeviceValues();
50
51     /**
52      * Called when a device has been loaded from the gateway.
53      */
54     public void onDeviceLoaded(HmDevice device);
55
56     /**
57      * Called when the connection is lost to the gateway.
58      */
59     public void onConnectionLost();
60
61     /**
62      * Called when the connection is resumed to the gateway.
63      */
64     public void onConnectionResumed();
65
66     /**
67      * Returns the configuration of a datapoint.
68      */
69     public HmDatapointConfig getDatapointConfig(HmDatapoint dp);
70
71     /**
72      * Called when a new value for the duty cycle of the gateway has been received.
73      */
74     public void onDutyCycleRatioUpdate(int dutyCycleRatio);
75 }