2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.homematic.internal.communicator;
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;
20 * Adapter with methods called from events within the {@link HomematicGateway} class.
22 * @author Gerhard Riegler - Initial contribution
24 public interface HomematicGatewayAdapter {
27 * Called when a datapoint has been updated.
29 public void onStateUpdated(HmDatapoint dp);
32 * Called when a new device has been detected on the gateway.
34 public void onNewDevice(HmDevice device);
37 * Called when a device has been deleted from the gateway.
39 public void onDeviceDeleted(HmDevice device);
42 * Called when the devices values should be reloaded from the gateway.
44 public void reloadDeviceValues(HmDevice device);
47 * Called when all values for all devices should be reloaded from the gateway.
49 public void reloadAllDeviceValues();
52 * Called when a device has been loaded from the gateway.
54 public void onDeviceLoaded(HmDevice device);
57 * Called when the connection is lost to the gateway.
59 public void onConnectionLost();
62 * Called when the connection is resumed to the gateway.
64 public void onConnectionResumed();
67 * Returns the configuration of a datapoint.
69 public HmDatapointConfig getDatapointConfig(HmDatapoint dp);
72 * Called when a new value for the duty cycle of the gateway has been received.
74 public void onDutyCycleRatioUpdate(int dutyCycleRatio);