]> git.basschouten.com Git - openhab-addons.git/blob
ff27bb182677fa441f2385fece40bcd5201e454a
[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.mqtt.homie.internal.homie300;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.binding.mqtt.generic.ChannelStateUpdateListener;
17 import org.openhab.binding.mqtt.homie.internal.homie300.DeviceAttributes.ReadyState;
18
19 /**
20  * Callbacks to inform about the Homie Device state, statistics changes, node layout changes.
21  * Meant to be used by the Homie thing handler.
22  *
23  * @author David Graeff - Initial contribution
24  */
25 @NonNullByDefault
26 public interface DeviceCallback extends ChannelStateUpdateListener {
27     /**
28      * Called whenever the device state changed
29      *
30      * @param state The new state
31      */
32     void readyStateChanged(ReadyState state);
33
34     /**
35      * Called, whenever a Homie node was existing before, but is not anymore.
36      *
37      * @param node The affected node class.
38      */
39     void nodeRemoved(Node node);
40
41     /**
42      * Called, whenever a Homie property was existing before, but is not anymore.
43      *
44      * @param property The affected property class.
45      */
46     void propertyRemoved(Property property);
47
48     /**
49      * Called, whenever a Homie node was added or changed.
50      *
51      * @param node The affected node class.
52      */
53     void nodeAddedOrChanged(Node node);
54
55     /**
56      * Called, whenever a Homie property was added or changed.
57      *
58      * @param property The affected property class.
59      */
60     void propertyAddedOrChanged(Property property);
61 }