]> git.basschouten.com Git - openhab-addons.git/blob
46aade7d91bf9c7246061ded3b070922f6e7c897
[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.network.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 NetworkBindingConstants} class defines common constants, which are
23  * used across the whole binding.
24  *
25  * @author Marc Mettke - Initial contribution
26  * @author David Gräff - 2016, Add dhcp listen
27  */
28 @NonNullByDefault
29 public class NetworkBindingConstants {
30
31     private static final String BINDING_ID = "network";
32
33     // List of all Thing Type UIDs
34     public static final ThingTypeUID BACKWARDS_COMPATIBLE_DEVICE = new ThingTypeUID(BINDING_ID, "device");
35     public static final ThingTypeUID PING_DEVICE = new ThingTypeUID(BINDING_ID, "pingdevice");
36     public static final ThingTypeUID SERVICE_DEVICE = new ThingTypeUID(BINDING_ID, "servicedevice");
37     public static final ThingTypeUID SPEEDTEST_DEVICE = new ThingTypeUID(BINDING_ID, "speedtest");
38
39     // List of all Channel ids
40     public static final String CHANNEL_ONLINE = "online";
41     public static final String CHANNEL_LATENCY = "latency";
42     public static final String CHANNEL_DEPRECATED_TIME = "time";
43     public static final String CHANNEL_LASTSEEN = "lastseen";
44     public static final String CHANNEL_TEST_ISRUNNING = "isRunning";
45     public static final String CHANNEL_TEST_PROGRESS = "progress";
46     public static final String CHANNEL_RATE_UP = "rateUp";
47     public static final String CHANNEL_RATE_DOWN = "rateDown";
48     public static final String CHANNEL_TEST_START = "testStart";
49     public static final String CHANNEL_TEST_END = "testEnd";
50
51     // List of all Parameters
52     public static final String PARAMETER_HOSTNAME = "hostname";
53     public static final String PARAMETER_RETRY = "retry";
54     public static final String PARAMETER_TIMEOUT = "timeout";
55     public static final String PARAMETER_REFRESH_INTERVAL = "refreshInterval";
56     public static final String PARAMETER_PORT = "port";
57
58     public static final String PROPERTY_DHCP_STATE = "dhcp_state";
59     public static final String PROPERTY_ARP_STATE = "arp_state";
60     public static final String PROPERTY_ICMP_STATE = "icmp_state";
61     public static final String PROPERTY_PRESENCE_DETECTION_TYPE = "presence_detection_type";
62     public static final String PROPERTY_IOS_WAKEUP = "uses_ios_wakeup";
63
64     public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = new HashSet<>();
65
66     static {
67         SUPPORTED_THING_TYPES_UIDS.add(PING_DEVICE);
68         SUPPORTED_THING_TYPES_UIDS.add(SERVICE_DEVICE);
69         SUPPORTED_THING_TYPES_UIDS.add(BACKWARDS_COMPATIBLE_DEVICE);
70         SUPPORTED_THING_TYPES_UIDS.add(SPEEDTEST_DEVICE);
71     }
72 }