"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var ConcentrationMeasurement_exports = {};
__export(ConcentrationMeasurement_exports, {
  ConcentrationMeasurement: () => ConcentrationMeasurement
});
module.exports = __toCommonJS(ConcentrationMeasurement_exports);
var import_MatterDefinition = require("../MatterDefinition.js");
var import_elements = require("../../elements/index.js");
/**
 * @license
 * Copyright 2022-2024 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
const ConcentrationMeasurement = (0, import_elements.ClusterElement)({
  name: "ConcentrationMeasurement",
  classification: "application",
  pics: "CONC",
  details: "The server cluster provides an interface to concentration measurement functionality. This cluster shall to be used via an alias to a specific substance (see Cluster IDs).",
  xref: { document: "cluster", section: "2.10" },
  children: [
    (0, import_elements.AttributeElement)({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 3 }),
    (0, import_elements.AttributeElement)({
      name: "FeatureMap",
      id: 65532,
      type: "FeatureMap",
      xref: { document: "cluster", section: "2.10.4" },
      children: [
        (0, import_elements.FieldElement)({
          name: "MEA",
          conformance: "O.a+",
          constraint: "0",
          description: "NumericMeasurement",
          details: "Cluster supports numeric measurement of substance"
        }),
        (0, import_elements.FieldElement)({
          name: "LEV",
          conformance: "O.a+",
          constraint: "1",
          description: "LevelIndication",
          details: "Cluster supports basic level indication for substance using the ConcentrationLevel enum"
        }),
        (0, import_elements.FieldElement)({
          name: "MED",
          conformance: "[LEV]",
          constraint: "2",
          description: "MediumLevel",
          details: "Cluster supports the Medium Concentration Level"
        }),
        (0, import_elements.FieldElement)({
          name: "CRI",
          conformance: "[LEV]",
          constraint: "3",
          description: "CriticalLevel",
          details: "Cluster supports the Critical Concentration Level"
        }),
        (0, import_elements.FieldElement)({
          name: "PEA",
          conformance: "[MEA]",
          constraint: "4",
          description: "PeakMeasurement",
          details: "Cluster supports peak numeric measurement of substance"
        }),
        (0, import_elements.FieldElement)({
          name: "AVG",
          conformance: "[MEA]",
          constraint: "5",
          description: "AverageMeasurement",
          details: "Cluster supports average numeric measurement of substance"
        })
      ]
    }),
    (0, import_elements.AttributeElement)({
      name: "MeasuredValue",
      id: 0,
      type: "single",
      access: "R V",
      conformance: "MEA",
      constraint: "minMeasuredValue to maxMeasuredValue",
      default: null,
      quality: "X P",
      details: "Indicates the most recent measurement as a single-precision floating-point number. MeasuredValue\u2019s unit is represented by MeasurementUnit.\nA value of null indicates that the measurement is unknown or outside the valid range. MinMeasuredValue and MaxMeasuredValue define the valid range for MeasuredValue.",
      xref: { document: "cluster", section: "2.10.6.1" }
    }),
    (0, import_elements.AttributeElement)({
      name: "MinMeasuredValue",
      id: 1,
      type: "single",
      access: "R V",
      conformance: "MEA",
      constraint: "max maxMeasuredValue",
      default: null,
      quality: "X",
      details: "Indicates the minimum value of MeasuredValue that is capable of being measured. A MinMeasuredValue of null indicates that the MinMeasuredValue is not defined.",
      xref: { document: "cluster", section: "2.10.6.2" }
    }),
    (0, import_elements.AttributeElement)({
      name: "MaxMeasuredValue",
      id: 2,
      type: "single",
      access: "R V",
      conformance: "MEA",
      constraint: "min minMeasuredValue",
      default: null,
      quality: "X",
      details: "Indicates the maximum value of MeasuredValue that is capable of being measured. A MaxMeasuredValue of null indicates that the MaxMeasuredValue is not defined.",
      xref: { document: "cluster", section: "2.10.6.3" }
    }),
    (0, import_elements.AttributeElement)({
      name: "PeakMeasuredValue",
      id: 3,
      type: "single",
      access: "R V",
      conformance: "PEA",
      constraint: "minMeasuredValue to maxMeasuredValue",
      default: null,
      quality: "X P",
      details: "Indicates the maximum value of MeasuredValue that has been measured during the PeakMeasuredValueWindow. If this attribute is provided, the PeakMeasuredValueWindow attribute shall also be provided.",
      xref: { document: "cluster", section: "2.10.6.4" }
    }),
    (0, import_elements.AttributeElement)({
      name: "PeakMeasuredValueWindow",
      id: 4,
      type: "elapsed-s",
      access: "R V",
      conformance: "PEA",
      constraint: "max 604800",
      default: 1,
      quality: "P",
      details: "Indicates the window of time used for determining the PeakMeasuredValue. The value is in seconds.",
      xref: { document: "cluster", section: "2.10.6.5" }
    }),
    (0, import_elements.AttributeElement)({
      name: "AverageMeasuredValue",
      id: 5,
      type: "single",
      access: "R V",
      conformance: "AVG",
      constraint: "minMeasuredValue to maxMeasuredValue",
      default: null,
      quality: "X P",
      details: "Indicates the average value of MeasuredValue that has been measured during the AverageMeasuredValueWindow. If this attribute is provided, the AverageMeasuredValueWindow attribute shall also be provided.",
      xref: { document: "cluster", section: "2.10.6.6" }
    }),
    (0, import_elements.AttributeElement)({
      name: "AverageMeasuredValueWindow",
      id: 6,
      type: "elapsed-s",
      access: "R V",
      conformance: "AVG",
      constraint: "max 604800",
      default: 1,
      quality: "P",
      details: "Indicates the window of time used for determining the AverageMeasuredValue. The value is in seconds.",
      xref: { document: "cluster", section: "2.10.6.7" }
    }),
    (0, import_elements.AttributeElement)({
      name: "Uncertainty",
      id: 7,
      type: "single",
      access: "R V",
      conformance: "[MEA]",
      constraint: "ms",
      details: "Indicates the range of error or deviation that can be found in MeasuredValue and PeakMeasuredValue. This is considered a +/- value and should be considered to be in MeasurementUnit.",
      xref: { document: "cluster", section: "2.10.6.8" }
    }),
    (0, import_elements.AttributeElement)({
      name: "MeasurementUnit",
      id: 8,
      type: "MeasurementUnitEnum",
      access: "R V",
      conformance: "MEA",
      quality: "F",
      details: "Indicates the unit of MeasuredValue. See MeasurementUnitEnum.",
      xref: { document: "cluster", section: "2.10.6.9" }
    }),
    (0, import_elements.AttributeElement)({
      name: "MeasurementMedium",
      id: 9,
      type: "MeasurementMediumEnum",
      access: "R V",
      conformance: "M",
      quality: "F",
      details: "Indicates the medium in which MeasuredValue is being measured. See MeasurementMediumEnum.",
      xref: { document: "cluster", section: "2.10.6.10" }
    }),
    (0, import_elements.AttributeElement)({
      name: "LevelValue",
      id: 10,
      type: "LevelValueEnum",
      access: "R V",
      conformance: "LEV",
      default: 0,
      details: "Indicates the level of the substance detected. See LevelValueEnum.",
      xref: { document: "cluster", section: "2.10.6.11" }
    }),
    (0, import_elements.DatatypeElement)({
      name: "MeasurementUnitEnum",
      type: "enum8",
      details: "Where mentioned, Billion refers to 10, Trillion refers to 1012 (short scale).",
      xref: { document: "cluster", section: "2.10.5.1" },
      children: [
        (0, import_elements.FieldElement)({ name: "Ppm", id: 0, conformance: "MEA", description: "Parts per Million (10)" }),
        (0, import_elements.FieldElement)({ name: "Ppb", id: 1, conformance: "MEA", description: "Parts per Billion (10)" }),
        (0, import_elements.FieldElement)({ name: "Ppt", id: 2, conformance: "MEA", description: "Parts per Trillion (1012)" }),
        (0, import_elements.FieldElement)({ name: "Mgm3", id: 3, conformance: "MEA", description: "Milligram per m" }),
        (0, import_elements.FieldElement)({ name: "Ugm3", id: 4, conformance: "MEA", description: "Microgram per m" }),
        (0, import_elements.FieldElement)({ name: "Ngm3", id: 5, conformance: "MEA", description: "Nanogram per m" }),
        (0, import_elements.FieldElement)({ name: "Pm3", id: 6, conformance: "MEA", description: "Particles per m" }),
        (0, import_elements.FieldElement)({ name: "Bqm3", id: 7, conformance: "MEA", description: "Becquerel per m" })
      ]
    }),
    (0, import_elements.DatatypeElement)({
      name: "MeasurementMediumEnum",
      type: "enum8",
      xref: { document: "cluster", section: "2.10.5.2" },
      children: [
        (0, import_elements.FieldElement)({ name: "Air", id: 0, conformance: "M", description: "The measurement is being made in Air" }),
        (0, import_elements.FieldElement)({ name: "Water", id: 1, conformance: "M", description: "The measurement is being made in Water" }),
        (0, import_elements.FieldElement)({ name: "Soil", id: 2, conformance: "M", description: "The measurement is being made in Soil" })
      ]
    }),
    (0, import_elements.DatatypeElement)({
      name: "LevelValueEnum",
      type: "enum8",
      xref: { document: "cluster", section: "2.10.5.3" },
      children: [
        (0, import_elements.FieldElement)({ name: "Unknown", id: 0, conformance: "M", description: "The level is Unknown" }),
        (0, import_elements.FieldElement)({ name: "Low", id: 1, conformance: "M", description: "The level is considered Low" }),
        (0, import_elements.FieldElement)({ name: "Medium", id: 2, conformance: "MED", description: "The level is considered Medium" }),
        (0, import_elements.FieldElement)({ name: "High", id: 3, conformance: "M", description: "The level is considered High" }),
        (0, import_elements.FieldElement)({ name: "Critical", id: 4, conformance: "CRI", description: "The level is considered Critical" })
      ]
    })
  ]
});
import_MatterDefinition.MatterDefinition.children.push(ConcentrationMeasurement);
//# sourceMappingURL=ConcentrationMeasurement.js.map
