]> git.basschouten.com Git - openhab-addons.git/blob
fc918fa89769d7b8eb828f45270018d6fd787cc2
[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.nibeheatpump.internal;
14
15 import java.util.Set;
16 import java.util.stream.Collectors;
17 import java.util.stream.Stream;
18
19 import org.openhab.core.thing.ThingTypeUID;
20
21 /**
22  * The {@link NibeHeatPumpBindingConstants} class defines common constants, which are
23  * used across the whole binding.
24  *
25  * @author Pauli Anttila - Initial contribution
26  */
27 public class NibeHeatPumpBindingConstants {
28
29     private static final String BINDING_ID = "nibeheatpump";
30
31     // List of all Thing Type UIDs
32     public static final ThingTypeUID THING_TYPE_F1X45_UDP = new ThingTypeUID(BINDING_ID, "f1x45-udp");
33     public static final ThingTypeUID THING_TYPE_F1X45_SERIAL = new ThingTypeUID(BINDING_ID, "f1x45-serial");
34     public static final ThingTypeUID THING_TYPE_F1X45_SIMULATOR = new ThingTypeUID(BINDING_ID, "f1x45-simulator");
35
36     public static final ThingTypeUID THING_TYPE_F1X55_UDP = new ThingTypeUID(BINDING_ID, "f1x55-udp");
37     public static final ThingTypeUID THING_TYPE_F1X55_SERIAL = new ThingTypeUID(BINDING_ID, "f1x55-serial");
38     public static final ThingTypeUID THING_TYPE_F1X55_SIMULATOR = new ThingTypeUID(BINDING_ID, "f1x55-simulator");
39
40     public static final ThingTypeUID THING_TYPE_F750_UDP = new ThingTypeUID(BINDING_ID, "f750-udp");
41     public static final ThingTypeUID THING_TYPE_F750_SERIAL = new ThingTypeUID(BINDING_ID, "f750-serial");
42     public static final ThingTypeUID THING_TYPE_F750_SIMULATOR = new ThingTypeUID(BINDING_ID, "f750-simulator");
43
44     public static final ThingTypeUID THING_TYPE_F470_UDP = new ThingTypeUID(BINDING_ID, "f470-udp");
45     public static final ThingTypeUID THING_TYPE_F470_SERIAL = new ThingTypeUID(BINDING_ID, "f470-serial");
46     public static final ThingTypeUID THING_TYPE_F470_SIMULATOR = new ThingTypeUID(BINDING_ID, "f470-simulator");
47
48     /**
49      * Presents all supported thing types by NibeHeatPump binding.
50      */
51     public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Stream
52             .of(THING_TYPE_F1X45_UDP, THING_TYPE_F1X45_SERIAL, THING_TYPE_F1X45_SIMULATOR, THING_TYPE_F1X55_UDP,
53                     THING_TYPE_F1X55_SERIAL, THING_TYPE_F1X55_SIMULATOR, THING_TYPE_F750_UDP, THING_TYPE_F750_SERIAL,
54                     THING_TYPE_F750_SIMULATOR, THING_TYPE_F470_UDP, THING_TYPE_F470_SERIAL, THING_TYPE_F470_SIMULATOR)
55             .collect(Collectors.toSet());
56 }