/**
 * Copyright © 2016-2026 The Thingsboard Authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
syntax = "proto3";

option java_package = "org.thingsboard.server.gen.transport.coap";
option java_outer_classname = "MeasurementTypeProtos";

enum MeasurementType {

    /* [] - No sensor on the channel.                                                                                             */
    MEASUREMENT_TYPE_NO_SENSOR = 0;

    /* [°C] - Celsius degree. Temperature. Resolution: 0.1°C. Range: [-273.2:4000.0]. Type: Continuous.                           */
    MEASUREMENT_TYPE_TEMPERATURE = 1;

    /* [% RH] - Percentage. Relative humidity. Resolution: 1%. Range: [0:100]. Type: Continuous.                                  */
    MEASUREMENT_TYPE_HUMIDITY = 2;

    /* [hPa] - Hectopascal. Atmospheric pressure. Resolution: 0.1hPa. Range: [1.0:2000.0]. Type: Continuous.                      */
    MEASUREMENT_TYPE_ATMOSPHERIC_PRESSURE = 3;

    /* [Pa] - Pascal. Differential pressure. Resolution: 1Pa. Range: [-10000:10000]. Type: Continuous.                            */
    MEASUREMENT_TYPE_DIFFERENTIAL_PRESSURE = 4;

    /* Sign indicates state: (+) Alarm, (-) OK. Type: Binary.                                                                     */
    MEASUREMENT_TYPE_OK_ALARM = 5;

    /* [IAQ] - IAQ index. Air quality. Resolution: 1IAQ. Range: [0:500]. Type: Continuous.                                        *
     * To obtain the IAQ index, the measurement value should be divided by 3.                                                     *
     * Measurement also includes calibration status as metadata (is the remainder of the absolute value divided by 3):            *
     *   - 0 - Calibration required (sensor returns not accurate values)                                                          *
     *   - 1 - Calibration on-going (sensor returns not accurate values)                                                          *
     *   - 2 - Calibration done (best accuracy of IAQ sensor)                                                                     */
    MEASUREMENT_TYPE_IAQ = 6;

    /* Sign indicates state: (+) Water detected, (-) Water not detected. Type: Binary.                                            */
    MEASUREMENT_TYPE_FLOODING = 7;

    /* [NB] - Number of pulses. Number of pulses in a single period. Resolution: 1 pulse. Range: [0:8000000]. Type: Continuous.   */
    MEASUREMENT_TYPE_PULSE_CNT = 8;

    /* [Wh] - Watt-hour. Number of watt-hours in a single period. Resolution: 1Wh. Range: [0:8000000]. Type: Continuous.          */
    MEASUREMENT_TYPE_ELECTRICITY_METER = 9;

    /* [l] - Liter. Number of litres in a single period. Resolution: 1l. Range: [0:8000000]. Type: Continuous.                    */
    MEASUREMENT_TYPE_WATER_METER = 10;

    /* [kPa] - Kilopascal. Soil moisture (tension). Resolution: 1kPa. Range: [-1000:0]. Type: Continuous.                         */
    MEASUREMENT_TYPE_SOIL_MOISTURE = 11;

    /* [ppm] - Parts per million. Carbon monoxide concentration. Resolution: 1ppm. Range: [0:1000000]. Type: Continuous.          */
    MEASUREMENT_TYPE_CO_GAS = 12;

    /* [ppm] - Parts per million. Nitrogen dioxide concentration. Resolution: 1ppm. Range: [0:1000000]. Type: Continuous.         */
    MEASUREMENT_TYPE_NO2_GAS = 13;

    /* [ppm] - Parts per million. Hydrogen sulfide concentration. Resolution: 0.01ppm. Range: [0.00:80000.00]. Type: Continuous.  */
    MEASUREMENT_TYPE_H2S_GAS = 14;

    /* [lx] - Lux. Illuminance. Resolution: 0.1lx. Range: [0.0:100000.0]. Type: Continuous.                                       */
    MEASUREMENT_TYPE_AMBIENT_LIGHT = 15;

    /* [µg/m^3] - Microgram per cubic meter. Particles with an aerodynamic diameter of less than 1 micrometers.                   *
     * Resolution: 1µg/m^3. Range: [0:1000]. Type: Continuous.                                                                    */
    MEASUREMENT_TYPE_PM_1_0 = 16;

    /* [µg/m^3] - Microgram per cubic meter. Particles with an aerodynamic diameter of less than 2.5 micrometers.                 *
     * Resolution: 1µg/m^3. Range: [0:1000]. Type: Continuous.                                                                    */
    MEASUREMENT_TYPE_PM_2_5 = 17;

    /* [µg/m^3] - Microgram per cubic meter. Particles with an aerodynamic diameter of less than 10 micrometers.                  *
     * Resolution: 1µg/m^3. Range: [0:1000]. Type: Continuous.                                                                    */
    MEASUREMENT_TYPE_PM_10_0 = 18;

    /* [dB] - Decibel. Noise level. Resolution: 0.1 dB. Range: [0.0:200.0]. Type: Continuous.                                     */
    MEASUREMENT_TYPE_NOISE_LEVEL = 19;

    /* [ppm] - Parts per million. Ammonia concentration. Resolution: 1ppm. Range: [0:1000000]. Type: Continuous.                  */
    MEASUREMENT_TYPE_NH3_GAS = 20;

    /* [ppm] - Parts per million. Methane concentration. Resolution: 1ppm. Range: [0:1000000]. Type: Continuous.                  */
    MEASUREMENT_TYPE_CH4_GAS = 21;

    /* [kPa] - Kilopascal (100kPa = 1bar). Pressure. Resolution: 1kPa. Range: [0:200000]. Type: Continuous.                       */
    MEASUREMENT_TYPE_HIGH_PRESSURE = 22;

    /* [mm] - Millimeter. Distance. Resolution: 1mm. Range: [0:100000]. Type: Continuous.                                         */
    MEASUREMENT_TYPE_DISTANCE_MM = 23;

    /* [l] - Liter. Water meter (minor). Resolution: 1l. Range: [0:99]. Type: Continuous.                                         *
     * To obtain the liters, the measurement value should be divided by 6.                                                        *
     * Measurement also includes a major channel index related with the minor channel as metadata                                 *
     * (is the remainder of the absolute value divided by 6).                                                                     */
    MEASUREMENT_TYPE_WATER_METER_ACC_MINOR = 24;

    /* [hl] - Hectoliter. Water meter (major). Resolution: 1hl. Range: [0:999999]. Type: Continuous.                              *
     * To obtain the hectoliters, the measurement value should be divided by 4.                                                   *
     * Measurement also includes a measurement status as metadata (is the remainder of the absolute value divided by 4):          *
     *   - 0 - Counter works properly                                                                                             *
     *   - 1 - Error occurred (the counted value may be underestimated)                                                           *
     *   - 2 - Sensor reset occurred (the counted value may be underestimated)                                                    *
     *   - 3 - Sensor reset and error occurred (the counted value may be underestimated)                                          */
    MEASUREMENT_TYPE_WATER_METER_ACC_MAJOR = 25;

    /* [ppm] - Parts per million. Carbon dioxide concentration. Resolution: 1ppm. Range: [0:1000000]. Type: Continuous.           *
     * To obtain the carbon dioxide concentration, the measurement value should be divided by 3.                                  *
     * Measurement also includes calibration status as metadata (is the remainder of the absolute value divided by 3):            *
     *   - 0 - Auto calibration has not yet been performed                                                                        *
     *   - 1 - The last auto calibration was successful                                                                           *
     *   - 2 - Last auto calibration failed                                                                                       */
    MEASUREMENT_TYPE_CO2_GAS = 26;

    /* [% RH] - Percentage. Relative humidity (accurate). Resolution: 0.1%. Range: [0.0:100.0]. Type: Continuous.                 */
    MEASUREMENT_TYPE_HUMIDITY_ACCURATE = 27;

    /* [sIAQ] - Static IAQ index. Air quality. Resolution: 1sIAQ. Range: [0:10000]. Type: Continuous.                             *
     * To obtain the static IAQ index, the measurement value should be divided by 3.                                              *
     * Measurement also includes calibration status as metadata (is the remainder of the absolute value divided by 3):            *
     *   - 0 - Calibration required (sensor returns not accurate values)                                                          *
     *   - 1 - Calibration on-going (sensor returns not accurate values)                                                          *
     *   - 2 - Calibration done (best accuracy of IAQ sensor)                                                                     */
    MEASUREMENT_TYPE_STATIC_IAQ = 28;

    /* [ppm] - Parts per million. CO2 equivalent. Resolution: 1ppm. Range: [0:1000000]. Type: Continuous.                         *
     * To obtain the CO2 equivalent, the measurement value should be divided by 3.                                                *
     * Measurement also includes calibration status as metadata (is the remainder of the absolute value divided by 3):            *
     *   - 0 - Calibration required (sensor returns not accurate values)                                                          *
     *   - 1 - Calibration on-going (sensor returns not accurate values)                                                          *
     *   - 2 - Calibration done (best accuracy of IAQ sensor)                                                                     */
    MEASUREMENT_TYPE_CO2_EQUIVALENT = 29;

    /* [ppm] - Parts per million. Breath VOC estimate. Resolution: 1ppm. Range: [0:100000]. Type: Continuous.                     *
     * To obtain the breath VOC estimate, the measurement value should be divided by 3.                                           *
     * Measurement also includes calibration status as metadata (is the remainder of the absolute value divided by 3):            *
     *   - 0 - Calibration required (sensor returns not accurate values)                                                          *
     *   - 1 - Calibration on-going (sensor returns not accurate values)                                                          *
     *   - 2 - Calibration done (best accuracy of IAQ sensor)                                                                     */
    MEASUREMENT_TYPE_BREATH_VOC = 30;

    /* Reserved for the Shared Modem functionality. Type: Continuous.                                                             */
    MEASUREMENT_TYPE_SHARED_MODEM = 31;

    /* [%] - Percentage. Generic type. Resolution: 0.01%. Range: [0.00:100.00]. Type: Continuous.                                 */
    MEASUREMENT_TYPE_PERCENTAGE = 32;

    /* [mV] - Millivolt. Voltage. Resolution: 0.1mV. Range: [0.0:100000.0]. Type: Continuous.                                     */
    MEASUREMENT_TYPE_VOLTAGE = 33;

    /* [mA] - Milliampere. Current. Resolution: 0.01mA. Range: [0.00:10000.00]. Type: Continuous.                                 */
    MEASUREMENT_TYPE_CURRENT = 34;

    /* [NB] - Number of pulses. Pulse counter (minor). Resolution: 1 pulse. Range: [0:999]. Type: Continuous.                     *
     * To obtain the number of pulses, the measurement value should be divided by 6.                                              *
     * Measurement also includes a major channel index related with the minor channel as metadata                                 *
     * (is the remainder of the absolute value divided by 6).                                                                     */
    MEASUREMENT_TYPE_PULSE_CNT_ACC_MINOR = 35;

    /* [kNB] - Number of kilopulses. Pulse counter (major). Resolution: 1 kilopulse. Range: [0:999999]. Type: Continuous.         *
     * To obtain the number of kilopulses, the measurement value should be divided by 4.                                          *
     * Measurement also includes a measurement status as metadata (is the remainder of the absolute value divided by 4):          *
     *   - 0 - Counter works properly                                                                                             *
     *   - 1 - Error occurred (the counted value may be underestimated)                                                           *
     *   - 2 - Sensor reset occurred (the counted value may be underestimated)                                                    *
     *   - 3 - Sensor reset and error occurred (the counted value may be underestimated)                                          */
    MEASUREMENT_TYPE_PULSE_CNT_ACC_MAJOR = 36;

    /* [Wh] - Watt-hour. Electricity meter (minor). Resolution: 1Wh. Range: [0:999]. Type: Continuous.                            *
     * To obtain the watt-hours, the measurement value should be divided by 6.                                                    *
     * Measurement also includes a major channel index related with the minor channel as metadata                                 *
     * (is the remainder of the absolute value divided by 6).                                                                     */
    MEASUREMENT_TYPE_ELEC_METER_ACC_MINOR = 37;

    /* [kWh] - Kilowatt-hour. Electricity meter (major). Resolution: 1kWh. Range: [0:999999]. Type: Continuous.                   *
     * To obtain the kilowatt-hours, the measurement value should be divided by 4.                                                *
     * Measurement also includes a measurement status as metadata (is the remainder of the absolute value divided by 4):          *
     *   - 0 - Counter works properly                                                                                             *
     *   - 1 - Error occurred (the counted value may be underestimated)                                                           *
     *   - 2 - Sensor reset occurred (the counted value may be underestimated)                                                    *
     *   - 3 - Sensor reset and error occurred (the counted value may be underestimated)                                          */
    MEASUREMENT_TYPE_ELEC_METER_ACC_MAJOR = 38;

    /* [NB] - Number of pulses. Wide-range pulse counter (minor). Resolution: 1 pulse. Range: [0:999999]. Type: Continuous.       *
     * To obtain the number of pulses, the measurement value should be divided by 6.                                              *
     * Measurement also includes a major channel index related with the minor channel as metadata                                 *
     * (is the remainder of the absolute value divided by 6).                                                                     */
    MEASUREMENT_TYPE_PULSE_CNT_ACC_WIDE_MINOR = 39;

    /* [MNB] - Number of megapulses. Wide-range pulse counter (major). Resolution: 1 megapulse. Range: [0:999999].                *
     * Type: Continuous.                                                                                                          *
     * To obtain the number of megapulses, the measurement value should be divided by 4.                                          *
     * Measurement also includes a measurement status as metadata (is the remainder of the absolute value divided by 4):          *
     *   - 0 - Counter works properly                                                                                             *
     *   - 1 - Error occurred (the counted value may be underestimated)                                                           *
     *   - 2 - Sensor reset occurred (the counted value may be underestimated)                                                    *
     *   - 3 - Sensor reset and error occurred (the counted value may be underestimated)                                          */
    MEASUREMENT_TYPE_PULSE_CNT_ACC_WIDE_MAJOR = 40;

    /* [mA] - Milliampere. Current (precise). Resolution: 0.001mA. Range: [-4000.000:4000.000]. Type: Continuous.                 */
    MEASUREMENT_TYPE_CURRENT_PRECISE = 41;

    /* Sign indicates state: (+) ON, (-) OFF. Type: Binary.                                                                       */
    MEASUREMENT_TYPE_OUTPUT_CONTROL = 42;

    /* [Ω] - Ohm. Resolution: 1Ω. Range: [0:1000000]. Type: Continuous.                                                           */
    MEASUREMENT_TYPE_RESISTANCE = 43;
}