2 * Copyright (c) 2010-2020 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.bsblan.internal;
15 import java.util.HashSet;
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.openhab.core.thing.ThingTypeUID;
22 * The {@link BsbLanBindingConstants} class defines common constants, which are
23 * used across the whole binding.
25 * @author Peter Schraffl - Initial contribution
28 public class BsbLanBindingConstants {
30 private static final String BINDING_ID = "bsblan";
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");
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";
45 public static final Set<String> WRITEABLE_CHANNELS = new HashSet<String>() {
47 private static final long serialVersionUID = 1L;
49 add(PARAMETER_CHANNEL_NUMBER_VALUE);
50 add(PARAMETER_CHANNEL_STRING_VALUE);
51 add(PARAMETER_CHANNEL_SWITCH_VALUE);
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;