"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 MeasurementAccuracyStruct_exports = {};
__export(MeasurementAccuracyStruct_exports, {
  MeasurementAccuracyStruct: () => MeasurementAccuracyStruct
});
module.exports = __toCommonJS(MeasurementAccuracyStruct_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 MeasurementAccuracyStruct = (0, import_elements.DatatypeElement)({
  name: "MeasurementAccuracyStruct",
  type: "struct",
  details: "This struct represents the set of accuracy ranges for a given measurement, the maximum and minimum values for the measurement, and whether the measurement is directly measured or just estimated from other information.",
  xref: { document: "cluster", section: "2.1.4.4" },
  children: [
    (0, import_elements.FieldElement)({
      name: "MeasurementType",
      id: 0,
      type: "MeasurementTypeEnum",
      conformance: "M",
      quality: "F",
      details: "This field shall indicate the type of measurement for the accuracy provided.",
      xref: { document: "cluster", section: "2.1.4.4.1" }
    }),
    (0, import_elements.FieldElement)({
      name: "Measured",
      id: 1,
      type: "bool",
      conformance: "M",
      default: false,
      quality: "F",
      details: "This field shall indicate whether the associated measurement was directly measured. If this field is not set to true, then the associated measurement was estimated.",
      xref: { document: "cluster", section: "2.1.4.4.2" }
    }),
    (0, import_elements.FieldElement)({ name: "MinMeasuredValue", id: 2, type: "int64", conformance: "M", quality: "F" }),
    (0, import_elements.FieldElement)({ name: "MaxMeasuredValue", id: 3, type: "int64", conformance: "M", quality: "F" }),
    (0, import_elements.FieldElement)({
      name: "AccuracyRanges",
      id: 4,
      type: "list",
      conformance: "M",
      constraint: "min 1",
      quality: "F",
      details: "This field shall indicate a list of measurement ranges and their associated accuracies.\nThe value of the RangeMin field on the first MeasurementAccuracyRangeStruct in this list shall be equal to the value of the MinMeasuredValue field.\nThe value of the RangeMax field on the last MeasurementAccuracyRangeStruct in this list shall be less than or equal to the value of the MaxMeasuredValue field.\nThe value of the RangeMin field on each MeasurementAccuracyRangeStruct in this list other than the first shall be one more the value of the RangeMax field on the previous MeasurementAccuracyRangeStruct in this list (i.e. there shall be no gaps in the accuracy ranges, and the ranges shall be in increasing order).",
      xref: { document: "cluster", section: "2.1.4.4.5" },
      children: [(0, import_elements.FieldElement)({ name: "entry", type: "MeasurementAccuracyRangeStruct" })]
    })
  ]
});
import_MatterDefinition.MatterDefinition.children.push(MeasurementAccuracyStruct);
//# sourceMappingURL=MeasurementAccuracyStruct.js.map
