]> git.basschouten.com Git - openhab-addons.git/blob
8a093712be7a5a22f833ef789f70a99942316aba
[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.knx.internal.channel;
14
15 import static org.openhab.binding.knx.internal.KNXBindingConstants.*;
16
17 import java.util.List;
18 import java.util.Set;
19
20 import org.eclipse.jdt.annotation.NonNullByDefault;
21 import org.openhab.core.library.types.StringType;
22 import org.openhab.core.thing.Channel;
23
24 import tuwien.auto.calimero.dptxlator.DPTXlatorString;
25
26 /**
27  * string channel type description
28  * 
29  * @author Simon Kaufmann - initial contribution and API.
30  *
31  */
32 @NonNullByDefault
33 class TypeString extends KNXChannel {
34     public static final Set<String> SUPPORTED_CHANNEL_TYPES = Set.of(CHANNEL_STRING, CHANNEL_STRING_CONTROL);
35
36     TypeString(Channel channel) {
37         super(List.of(StringType.class), channel);
38     }
39
40     @Override
41     protected String getDefaultDPT(String gaConfigKey) {
42         return DPTXlatorString.DPT_STRING_8859_1.getID();
43     }
44 }