]> git.basschouten.com Git - openhab-addons.git/blob
9738c61f249375118498c6146bd5dad5466b2103
[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.bsblan.internal;
14
15 import java.util.Set;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.openhab.core.thing.ThingTypeUID;
19
20 /**
21  * The {@link BsbLanBindingConstants} class defines common constants, which are
22  * used across the whole binding.
23  *
24  * @author Peter Schraffl - Initial contribution
25  */
26 @NonNullByDefault
27 public class BsbLanBindingConstants {
28
29     private static final String BINDING_ID = "bsblan";
30
31     // List of all Thing Type UIDs
32     public static final ThingTypeUID THING_TYPE_BRIDGE = new ThingTypeUID(BINDING_ID, "bridge");
33     public static final ThingTypeUID THING_TYPE_PARAMETER = new ThingTypeUID(BINDING_ID, "parameter");
34
35     // List of all channel ids
36     public static final String PARAMETER_CHANNEL_NAME = "name";
37     public static final String PARAMETER_CHANNEL_NUMBER_VALUE = "number-value";
38     public static final String PARAMETER_CHANNEL_STRING_VALUE = "string-value";
39     public static final String PARAMETER_CHANNEL_SWITCH_VALUE = "switch-value";
40     public static final String PARAMETER_CHANNEL_UNIT = "unit";
41     public static final String PARAMETER_CHANNEL_DESCRIPTION = "description";
42     public static final String PARAMETER_CHANNEL_DATATYPE = "datatype";
43
44     public static final Set<String> WRITEABLE_CHANNELS = Set.of(PARAMETER_CHANNEL_NUMBER_VALUE,
45             PARAMETER_CHANNEL_STRING_VALUE, PARAMETER_CHANNEL_SWITCH_VALUE);
46
47     public static final int MIN_REFRESH_INTERVAL = 5;
48     public static final int DEFAULT_REFRESH_INTERVAL = 60;
49     public static final int API_TIMEOUT = 10000;
50     public static final int DEFAULT_API_PORT = 80;
51 }