2 * Copyright (c) 2010-2021 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.miele.internal.handler;
15 import org.openhab.binding.miele.internal.handler.MieleBridgeHandler.DeviceMetaData;
16 import org.openhab.core.types.State;
17 import org.openhab.core.types.Type;
20 * The {@link ApplianceChannelSelector} class defines a common interface for
21 * all the data structures used by appliance thing handlers. It is used to traverse
22 * the channels that possibly exist for an appliance, and convert data
23 * returned by the appliance to a compatible State
25 * @author Karel Goderis - Initial contribution
27 public interface ApplianceChannelSelector {
33 * Returns the ChannelID for the given datapoint
35 String getChannelID();
38 * Returns the Miele defined ID for the given datapoint
43 * Returns true if the given datapoint is to be considered as a Property
44 * instead of a regular modifiable datapoint
50 * Returns a State for the given string, taking into
51 * account the metadata provided. The meta data is sent by
52 * the Miele appliance and is used to decide the State type
54 * @param s - the value to be used to instantiate the State
55 * @param dmd - the device meta data
57 State getState(String s, DeviceMetaData dmd);
60 * Returns "compatible" Type for this datapoint
62 Class<? extends Type> getTypeClass();