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.synopanalyzer.internal;
15 import static org.openhab.core.library.unit.MetricPrefix.HECTO;
17 import javax.measure.Unit;
18 import javax.measure.quantity.Angle;
19 import javax.measure.quantity.Pressure;
20 import javax.measure.quantity.Temperature;
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;
28 * The {@link SynopAnalyzerBinding} class defines common constants used across the whole binding.
30 * @author Gaƫl L'hopital - Initial contribution
33 public class SynopAnalyzerBindingConstants {
34 private static final String BINDING_ID = "synopanalyzer";
36 // List of all Thing Type UIDs
37 public static final ThingTypeUID THING_SYNOP = new ThingTypeUID(BINDING_ID, "synopanalyzer");
39 // List of all Channel ids
40 public static final String HORIZONTAL_VISIBILITY = "horizontal-visibility";
41 public static final String OCTA = "octa";
42 public static final String ATTENUATION_FACTOR = "attenuation-factor";
43 public static final String OVERCAST = "overcast";
44 public static final String PRESSURE = "pressure";
45 public static final String TEMPERATURE = "temperature";
46 public static final String WIND_ANGLE = "wind-angle";
47 public static final String WIND_DIRECTION = "wind-direction";
48 public static final String WIND_STRENGTH = "wind-speed";
49 public static final String WIND_SPEED_BEAUFORT = "wind-speed-beaufort";
50 public static final String TIME_UTC = "time-utc";
53 public static final Unit<Temperature> TEMPERATURE_UNIT = SIUnits.CELSIUS;
54 public static final Unit<Pressure> PRESSURE_UNIT = HECTO(SIUnits.PASCAL);
55 public static final Unit<Angle> WIND_DIRECTION_UNIT = Units.DEGREE_ANGLE;
57 // Synop message origin station codes
58 public static final String LAND_STATION_CODE = "AAXX";
59 public static final String SHIP_STATION_CODE = "BBXX";
60 public static final String MOBILE_LAND_STATION_CODE = "OOXX";