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