]> git.basschouten.com Git - openhab-addons.git/blob
bf270337cacaafbd02e827b996d84a352d800671
[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.tellstick.internal.handler;
14
15 import java.math.BigDecimal;
16
17 import org.openhab.core.types.Command;
18 import org.openhab.core.types.State;
19 import org.tellstick.device.TellstickException;
20 import org.tellstick.device.iface.Device;
21
22 /**
23  * Interface for telldus controllers. This is used to send and get status of devices from the controller.
24  *
25  * @author Jarle Hjortland - Initial contribution
26  */
27 public interface TelldusDeviceController {
28
29     /**
30      * Send an event to the controller.
31      *
32      * @param device
33      * @param resendCount
34      * @param isdimmer
35      * @param command
36      * @throws TellstickException
37      */
38     void handleSendEvent(Device device, int resendCount, boolean isdimmer, Command command) throws TellstickException;
39
40     /**
41      * Get the state of the given device.
42      *
43      * @param dev
44      * @return
45      */
46     State calcState(Device dev);
47
48     /**
49      * Get the current dim state for a device.
50      *
51      * @param device
52      * @return
53      */
54     BigDecimal calcDimValue(Device device);
55
56     /**
57      *
58      * Clean up the device controller before shutdown.
59      *
60      */
61     void dispose();
62 }