"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 MeasurementAccuracyRangeStruct_exports = {};
__export(MeasurementAccuracyRangeStruct_exports, {
  MeasurementAccuracyRangeStruct: () => MeasurementAccuracyRangeStruct
});
module.exports = __toCommonJS(MeasurementAccuracyRangeStruct_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 MeasurementAccuracyRangeStruct = (0, import_elements.DatatypeElement)({
  name: "MeasurementAccuracyRangeStruct",
  type: "struct",
  details: "This struct represents the accuracy of a measurement for a range of measurement values. Accuracy shall be expressed as a maximum +/- percentage of the true value, a maximum +/- fixed value of the true value, or both.\n  \u2022 If both PercentMax and FixedMax are indicated, then for a given true value in the range between     RangeMin and RangeMax,\n    \u25E6 the reported value shall be less than or equal to the sum of the true value, FixedMax and       PercentMax percent of the true value.\n    \u25E6 the reported value shall be greater than or equal to the true value minus the sum of FixedMax       and PercentMax percent of the true value.\n  \u2022 If only PercentMax is indicated, then for a given true value in the range between RangeMin and     RangeMax,\n    \u25E6 the reported value shall be less than or equal to the sum of the true value and PercentMax       percent of the true value.\n    \u25E6 the reported value shall be greater than or equal to the true value minus PercentMax per\ncent of the true value.\n  \u2022 If only FixedMax is indicated, then for a given true value in the range between RangeMin and     RangeMax,\n    \u25E6 the reported value shall be less than or equal to the sum of the true value and FixedMax.\n    \u25E6 the reported value shall be greater than or equal to the true value minus FixedMax.",
  xref: { document: "cluster", section: "2.1.4.3" },
  children: [
    (0, import_elements.FieldElement)({
      name: "RangeMin",
      id: 0,
      type: "int64",
      conformance: "M",
      quality: "F",
      details: "This field shall indicate the minimum measurement value for the specified level of accuracy.\nThe value of this field shall be greater than or equal to the value of the MinMeasuredValue field on the encompassing MeasurementAccuracyStruct.\nThe value of this field shall be less than or equal to the value of the MaxMeasuredValue field on the encompassing MeasurementAccuracyStruct.",
      xref: { document: "cluster", section: "2.1.4.3.1" }
    }),
    (0, import_elements.FieldElement)({
      name: "RangeMax",
      id: 1,
      type: "int64",
      conformance: "M",
      quality: "F",
      details: "This field shall indicate the maximum measurement value for the specified level of accuracy. The value of this field shall be greater than the value of the RangeMin field.\nThe value of this field shall be greater than or equal to the value of the MinMeasuredValue field on the encompassing MeasurementAccuracyStruct.\nThe value of this field shall be less than or equal to the value of the MaxMeasuredValue field on the encompassing MeasurementAccuracyStruct.",
      xref: { document: "cluster", section: "2.1.4.3.2" }
    }),
    (0, import_elements.FieldElement)({
      name: "PercentMax",
      id: 2,
      type: "percent100ths",
      conformance: "O.a+",
      quality: "F",
      details: "This field shall indicate the maximum +/- percentage accuracy for the associated measurement.",
      xref: { document: "cluster", section: "2.1.4.3.3" }
    }),
    (0, import_elements.FieldElement)({
      name: "PercentMin",
      id: 3,
      type: "percent100ths",
      conformance: "[PercentMax]",
      constraint: "max percentTypical",
      quality: "F",
      details: "This field shall indicate the minimum +/- percentage accuracy for the associated measurement.",
      xref: { document: "cluster", section: "2.1.4.3.4" }
    }),
    (0, import_elements.FieldElement)({
      name: "PercentTypical",
      id: 4,
      type: "percent100ths",
      conformance: "[PercentMin]",
      constraint: "percentMin to percentMax",
      quality: "F",
      details: "This field shall indicate the typical +/- percentage accuracy for the associated measurement.",
      xref: { document: "cluster", section: "2.1.4.3.5" }
    }),
    (0, import_elements.FieldElement)({
      name: "FixedMax",
      id: 5,
      type: "uint64",
      conformance: "O.a+",
      quality: "F",
      details: "This field shall indicate the maximum +/- fixed accuracy for the associated measurement, in the unit indicated by MeasurementType.",
      xref: { document: "cluster", section: "2.1.4.3.6" }
    }),
    (0, import_elements.FieldElement)({
      name: "FixedMin",
      id: 6,
      type: "uint64",
      conformance: "[FixedMax]",
      constraint: "max fixedMax",
      quality: "F",
      details: "This field shall indicate the minimum +/- fixed accuracy for the associated measurement, in the unit indicated by MeasurementType.",
      xref: { document: "cluster", section: "2.1.4.3.7" }
    }),
    (0, import_elements.FieldElement)({
      name: "FixedTypical",
      id: 7,
      type: "uint64",
      conformance: "[FixedMin]",
      constraint: "fixedMin to fixedMax",
      quality: "F",
      details: "This field shall indicate the typical +/- fixed accuracy for the associated measurement, in the unit indicated by MeasurementType.",
      xref: { document: "cluster", section: "2.1.4.3.8" }
    })
  ]
});
import_MatterDefinition.MatterDefinition.children.push(MeasurementAccuracyRangeStruct);
//# sourceMappingURL=MeasurementAccuracyRangeStruct.js.map
