2 * Copyright (c) 2010-2024 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.network.internal;
15 import java.util.HashSet;
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.openhab.core.thing.ThingTypeUID;
22 * The {@link NetworkBindingConstants} class defines common constants, which are
23 * used across the whole binding.
25 * @author Marc Mettke - Initial contribution
26 * @author David Gräff - 2016, Add dhcp listen
29 public class NetworkBindingConstants {
31 private static final String BINDING_ID = "network";
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");
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";
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";
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";
64 public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = new HashSet<>();
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);