2 * Copyright (c) 2010-2023 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.gpstracker.internal;
16 import java.util.stream.Collectors;
17 import java.util.stream.Stream;
19 import org.openhab.core.thing.ThingTypeUID;
20 import org.openhab.core.thing.type.ChannelTypeUID;
25 * @author Gabor Bicskei - Initial contribution
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);
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";
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;
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);
49 public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Stream.of(THING_TYPE_TRACKER)
50 .collect(Collectors.toSet());