]> git.basschouten.com Git - openhab-addons.git/blob
e4a6508b6c1d973efa005c985a688e604ea67267
[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.lutron.internal.grxprg;
14
15 import org.openhab.core.thing.Bridge;
16 import org.openhab.core.thing.ThingStatus;
17 import org.openhab.core.thing.ThingStatusDetail;
18 import org.openhab.core.types.State;
19
20 /**
21  *
22  * A callback to {@link PrgBridgeHandler} that will be used by the {@link PrgProtocolHandler} to update the status and
23  * state of the {@link PrgBridgeHandler} or a specific {@link GrafikEyeHandler}
24  *
25  * @author Tim Roberts - Initial contribution
26  *
27  */
28 interface PrgHandlerCallback {
29     /**
30      * Callback to the {@link PrgBridgeHandler} to update the status of the {@link Bridge}
31      *
32      * @param status a non-null {@link org.openhab.core.thing.ThingStatus}
33      * @param detail a non-null {@link org.openhab.core.thing.ThingStatusDetail}
34      * @param msg a possibly null, possibly empty message
35      */
36     void statusChanged(ThingStatus status, ThingStatusDetail detail, String msg);
37
38     /**
39      * Callback to the {@link PrgBridgeHandler} to update the state of an item
40      *
41      * @param channelId the non-null, non-empty channel id
42      * @param state the new non-null {@State}
43      */
44     void stateChanged(String channelId, State state);
45
46     /**
47      * Callback to the {@link PrgBridgeHandler} to update the state of an item in a specific {@link GrafikEyeHandler}.
48      *
49      * @param controlUnit the control unit identifier to update
50      * @param channelId the non-null, non-empty channel id
51      * @param state the new non-null {@State}
52      */
53     void stateChanged(int controlUnit, String channelId, State state);
54
55     /**
56      * Callback to the {@link PrgBridgeHandler} to determine if the specific zone on a specific control unit is a shade
57      * or not
58      *
59      * @param controlUnit the control unit identifier
60      * @param zone the zone identify
61      * @return true if a shade zone, false otherwise
62      */
63     boolean isShade(int controlUnit, int zone);
64 }