/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { MatterDefinition } from "../MatterDefinition.js";
import {
  ClusterElement as Cluster,
  AttributeElement as Attribute,
  FieldElement as Field,
  EventElement as Event,
  CommandElement as Command,
  DatatypeElement as Datatype
} from "../../elements/index.js";
const SoftwareDiagnostics = Cluster(
  { name: "SoftwareDiagnostics", id: 52, classification: "node", quality: "K" },
  Attribute({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 1 }),
  Attribute(
    { name: "FeatureMap", id: 65532, type: "FeatureMap" },
    Field({ name: "WTRMRK", constraint: "0", title: "Watermarks" })
  ),
  Attribute(
    { name: "ThreadMetrics", id: 0, type: "list", access: "R V", conformance: "O", constraint: "max 64" },
    Field({ name: "entry", type: "ThreadMetricsStruct" })
  ),
  Attribute({ name: "CurrentHeapFree", id: 1, type: "uint64", access: "R V", conformance: "O" }),
  Attribute({ name: "CurrentHeapUsed", id: 2, type: "uint64", access: "R V", conformance: "O" }),
  Attribute({ name: "CurrentHeapHighWatermark", id: 3, type: "uint64", access: "R V", conformance: "WTRMRK" }),
  Event(
    { name: "SoftwareFault", id: 0, access: "V", conformance: "O", priority: "info" },
    Field({ name: "Id", id: 0, type: "uint64", conformance: "M", default: 0 }),
    Field({ name: "Name", id: 1, type: "string", conformance: "O", constraint: "max 8" }),
    Field({ name: "FaultRecording", id: 2, type: "octstr", conformance: "O", constraint: "max 1024" })
  ),
  Command({ name: "ResetWatermarks", id: 0, access: "M", conformance: "WTRMRK", direction: "request", response: "status" }),
  Datatype(
    { name: "ThreadMetricsStruct", type: "struct" },
    Field({ name: "Id", id: 0, type: "uint64", conformance: "M" }),
    Field({ name: "Name", id: 1, type: "string", conformance: "O", constraint: "max 8" }),
    Field({ name: "StackFreeCurrent", id: 2, type: "uint32", conformance: "O" }),
    Field({ name: "StackFreeMinimum", id: 3, type: "uint32", conformance: "O" }),
    Field({ name: "StackSize", id: 4, type: "uint32", conformance: "O" })
  )
);
MatterDefinition.children.push(SoftwareDiagnostics);
export {
  SoftwareDiagnostics
};
//# sourceMappingURL=software-diagnostics.element.js.map
