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