]> git.basschouten.com Git - openhab-addons.git/blob
a9579f08271a7a7aa5058663fbbed7751a9f9a9d
[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.gpstracker.internal;
14
15 import java.util.Set;
16 import java.util.stream.Collectors;
17 import java.util.stream.Stream;
18
19 import org.eclipse.jdt.annotation.NonNullByDefault;
20 import org.openhab.core.thing.ThingTypeUID;
21 import org.openhab.core.thing.type.ChannelTypeUID;
22
23 /**
24  * Binding constants
25  *
26  * @author Gabor Bicskei - Initial contribution
27  */
28 @NonNullByDefault
29 public abstract class GPSTrackerBindingConstants {
30     public static final String BINDING_ID = "gpstracker";
31     static final String CONFIG_PID = "binding." + BINDING_ID;
32     private static final String THING_TYPE = "tracker";
33     public static final ThingTypeUID THING_TYPE_TRACKER = new ThingTypeUID(BINDING_ID, THING_TYPE);
34
35     // channels
36     public static final String CHANNEL_REGION_TRIGGER = "regionTrigger";
37     public static final String CHANNEL_LAST_REPORT = "lastReport";
38     public static final String CHANNEL_LAST_LOCATION = "lastLocation";
39     public static final String CHANNEL_BATTERY_LEVEL = "batteryLevel";
40     private static final String CHANNEL_REGION_DISTANCE = "regionDistance";
41     public static final String CHANNEL_GPS_ACCURACY = "gpsAccuracy";
42
43     // system distance channel
44     public static final String CHANNEL_DISTANCE_SYSTEM_ID = "distanceSystem";
45     public static final String CHANNEL_DISTANCE_SYSTEM_NAME = "System";
46     public static final Integer CHANNEL_DISTANCE_SYSTEM_RADIUS = 100;
47
48     public static final ChannelTypeUID CHANNEL_TYPE_DISTANCE = new ChannelTypeUID(BINDING_ID, CHANNEL_REGION_DISTANCE);
49     public static final ChannelTypeUID CHANNEL_TYPE_REGION = new ChannelTypeUID(BINDING_ID, CHANNEL_REGION_TRIGGER);
50
51     public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Stream.of(THING_TYPE_TRACKER)
52             .collect(Collectors.toSet());
53 }