]> git.basschouten.com Git - openhab-addons.git/blob
38933f2a11e314f4caf40a2f9bfe362a046dd9d5
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2021 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.synopanalyzer.internal;
14
15 import static org.openhab.core.library.unit.MetricPrefix.HECTO;
16
17 import javax.measure.Unit;
18 import javax.measure.quantity.Angle;
19 import javax.measure.quantity.Pressure;
20 import javax.measure.quantity.Temperature;
21
22 import org.eclipse.jdt.annotation.NonNullByDefault;
23 import org.openhab.core.library.unit.SIUnits;
24 import org.openhab.core.library.unit.Units;
25 import org.openhab.core.thing.ThingTypeUID;
26
27 /**
28  * The {@link SynopAnalyzerBinding} class defines common constants, which are
29  * used across the whole binding.
30  *
31  * @author GaĆ«l L'hopital - Initial contribution
32  */
33 @NonNullByDefault
34 public class SynopAnalyzerBindingConstants {
35     public static final String BINDING_ID = "synopanalyzer";
36
37     // List of all Thing Type UIDs
38     public static final ThingTypeUID THING_SYNOP = new ThingTypeUID(BINDING_ID, "synopanalyzer");
39
40     // List of all Channel ids
41     public static final String HORIZONTAL_VISIBILITY = "horizontal-visibility";
42     public static final String OCTA = "octa";
43     public static final String ATTENUATION_FACTOR = "attenuation-factor";
44     public static final String OVERCAST = "overcast";
45     public static final String PRESSURE = "pressure";
46     public static final String TEMPERATURE = "temperature";
47     public static final String WIND_ANGLE = "wind-angle";
48     public static final String WIND_DIRECTION = "wind-direction";
49     public static final String WIND_STRENGTH = "wind-speed";
50     public static final String WIND_SPEED_BEAUFORT = "wind-speed-beaufort";
51     public static final String TIME_UTC = "time-utc";
52
53     // Default units
54     public static final Unit<Temperature> TEMPERATURE_UNIT = SIUnits.CELSIUS;
55     public static final Unit<Pressure> PRESSURE_UNIT = HECTO(SIUnits.PASCAL);
56     public static final Unit<Angle> WIND_DIRECTION_UNIT = Units.DEGREE_ANGLE;
57
58     // Synop message origin station codes
59     public static final String LAND_STATION_CODE = "AAXX";
60     public static final String SHIP_STATION_CODE = "BBXX";
61     public static final String MOBILE_LAND_STATION_CODE = "OOXX";
62 }