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.eclipse.jdt.annotation.NonNullByDefault;
20 import org.openhab.core.thing.ThingTypeUID;
21 import org.openhab.core.thing.type.ChannelTypeUID;
26 * @author Gabor Bicskei - Initial contribution
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);
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";
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;
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);
51 public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Stream.of(THING_TYPE_TRACKER)
52 .collect(Collectors.toSet());