/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
/*** THIS FILE IS GENERATED, DO NOT EDIT ***/
import { MutableCluster } from "../cluster/mutation/MutableCluster.js";
import { Attribute, Command, OptionalAttribute, OptionalEvent } from "../cluster/Cluster.js";
import { BitFlag } from "../schema/BitmapSchema.js";
import { TypeFromSchema } from "../tlv/TlvSchema.js";
import { Identity } from "#general";
export declare namespace SoftwareDiagnostics {
    /**
     * These are optional features supported by SoftwareDiagnosticsCluster.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.13.4
     */
    enum Feature {
        /**
         * Watermarks (WTRMRK)
         *
         * Node makes available the metrics for high watermark related to memory consumption.
         */
        Watermarks = "Watermarks"
    }
    /**
     * @see {@link MatterSpecification.v142.Core} § 11.13.5.1
     */
    const TlvThreadMetrics: import("../tlv/TlvObject.js").ObjectSchema<{
        /**
         * The Id field shall be a server-assigned per-thread unique ID that is constant for the duration of the thread.
         * Efforts SHOULD be made to avoid reusing ID values when possible.
         *
         * @see {@link MatterSpecification.v142.Core} § 11.13.5.1.1
         */
        id: import("../tlv/TlvObject.js").FieldType<number | bigint>;
        /**
         * The Name field shall be set to a vendor defined name or prefix of the software thread that is static for the
         * duration of the thread.
         *
         * @see {@link MatterSpecification.v142.Core} § 11.13.5.1.2
         */
        name: import("../tlv/TlvObject.js").OptionalFieldType<string>;
        /**
         * The StackFreeCurrent field shall indicate the current amount of stack memory, in bytes, that are not being
         * utilized on the respective thread.
         *
         * @see {@link MatterSpecification.v142.Core} § 11.13.5.1.3
         */
        stackFreeCurrent: import("../tlv/TlvObject.js").OptionalFieldType<number>;
        /**
         * The StackFreeMinimum field shall indicate the minimum amount of stack memory, in bytes, that has been
         * available at any point between the current time and this attribute being reset or initialized on the
         * respective thread. This value shall only be reset upon a Node reboot or upon receiving of the ResetWatermarks
         * command.
         *
         * @see {@link MatterSpecification.v142.Core} § 11.13.5.1.4
         */
        stackFreeMinimum: import("../tlv/TlvObject.js").OptionalFieldType<number>;
        /**
         * The StackSize field shall indicate the amount of stack memory, in bytes, that has been allocated for use by
         * the respective thread.
         *
         * @see {@link MatterSpecification.v142.Core} § 11.13.5.1.5
         */
        stackSize: import("../tlv/TlvObject.js").OptionalFieldType<number>;
    }>;
    /**
     * @see {@link MatterSpecification.v142.Core} § 11.13.5.1
     */
    interface ThreadMetrics extends TypeFromSchema<typeof TlvThreadMetrics> {
    }
    /**
     * Body of the SoftwareDiagnostics softwareFault event
     *
     * @see {@link MatterSpecification.v142.Core} § 11.13.8.1
     */
    const TlvSoftwareFaultEvent: import("../tlv/TlvObject.js").ObjectSchema<{
        /**
         * This field shall be set to the ID of the software thread in which the last software fault occurred.
         *
         * @see {@link MatterSpecification.v142.Core} § 11.13.8.1.1
         */
        id: import("../tlv/TlvObject.js").FieldType<number | bigint>;
        /**
         * This field shall be set to a manufacturer-specified name or prefix of the software thread in which the last
         * software fault occurred.
         *
         * @see {@link MatterSpecification.v142.Core} § 11.13.8.1.2
         */
        name: import("../tlv/TlvObject.js").OptionalFieldType<string>;
        /**
         * This field shall be a manufacturer-specified payload intended to convey information to assist in further
         * diagnosing or debugging a software fault. The FaultRecording field may be used to convey information such as,
         * but not limited to, thread backtraces or register contents.
         *
         * @see {@link MatterSpecification.v142.Core} § 11.13.8.1.3
         */
        faultRecording: import("../tlv/TlvObject.js").OptionalFieldType<AllowSharedBufferSource>;
    }>;
    /**
     * Body of the SoftwareDiagnostics softwareFault event
     *
     * @see {@link MatterSpecification.v142.Core} § 11.13.8.1
     */
    interface SoftwareFaultEvent extends TypeFromSchema<typeof TlvSoftwareFaultEvent> {
    }
    /**
     * A SoftwareDiagnosticsCluster supports these elements if it supports feature Watermarks.
     */
    const WatermarksComponent: {
        readonly attributes: {
            /**
             * Indicates the maximum amount of heap memory, in bytes, that has been used by the Node. This value shall
             * only be reset upon a Node reboot or upon receiving of the ResetWatermarks command.
             *
             * @see {@link MatterSpecification.v142.Core} § 11.13.6.4
             */
            readonly currentHeapHighWatermark: Attribute<number | bigint, any>;
        };
        readonly commands: {
            /**
             * This command is used to reset the high watermarks for heap and stack memory.
             *
             * Receipt of this command shall reset the following values which track high and lower watermarks:
             *
             *   - The StackFreeMinimum field of the ThreadMetrics attribute
             *
             *   - The CurrentHeapHighWatermark attribute
             *
             * ### Effect on Receipt
             *
             * On receipt of this command, the Node shall make the following modifications to attributes it supports:
             *
             * If implemented, the server shall set the value of the CurrentHeapHighWatermark attribute to the value of
             * the CurrentHeapUsed attribute.
             *
             * If implemented, the server shall set the value of the StackFreeMinimum field for every thread to the
             * value of the corresponding thread’s StackFreeCurrent field.
             *
             * @see {@link MatterSpecification.v142.Core} § 11.13.7.1
             */
            readonly resetWatermarks: Command<void, void, any>;
        };
    };
    /**
     * These elements and properties are present in all SoftwareDiagnostics clusters.
     */
    const Base: {
        readonly id: 52;
        readonly name: "SoftwareDiagnostics";
        readonly revision: 1;
        readonly features: {
            /**
             * Node makes available the metrics for high watermark related to memory consumption.
             */
            readonly watermarks: BitFlag;
        };
        readonly attributes: {
            /**
             * This attribute shall be a list of ThreadMetricsStruct structs. Each active thread on the Node shall be
             * represented by a single entry within the ThreadMetrics attribute.
             *
             * @see {@link MatterSpecification.v142.Core} § 11.13.6.1
             */
            readonly threadMetrics: OptionalAttribute<import("../tlv/TlvObject.js").TypeFromFields<{
                /**
                 * The Id field shall be a server-assigned per-thread unique ID that is constant for the duration of the thread.
                 * Efforts SHOULD be made to avoid reusing ID values when possible.
                 *
                 * @see {@link MatterSpecification.v142.Core} § 11.13.5.1.1
                 */
                id: import("../tlv/TlvObject.js").FieldType<number | bigint>;
                /**
                 * The Name field shall be set to a vendor defined name or prefix of the software thread that is static for the
                 * duration of the thread.
                 *
                 * @see {@link MatterSpecification.v142.Core} § 11.13.5.1.2
                 */
                name: import("../tlv/TlvObject.js").OptionalFieldType<string>;
                /**
                 * The StackFreeCurrent field shall indicate the current amount of stack memory, in bytes, that are not being
                 * utilized on the respective thread.
                 *
                 * @see {@link MatterSpecification.v142.Core} § 11.13.5.1.3
                 */
                stackFreeCurrent: import("../tlv/TlvObject.js").OptionalFieldType<number>;
                /**
                 * The StackFreeMinimum field shall indicate the minimum amount of stack memory, in bytes, that has been
                 * available at any point between the current time and this attribute being reset or initialized on the
                 * respective thread. This value shall only be reset upon a Node reboot or upon receiving of the ResetWatermarks
                 * command.
                 *
                 * @see {@link MatterSpecification.v142.Core} § 11.13.5.1.4
                 */
                stackFreeMinimum: import("../tlv/TlvObject.js").OptionalFieldType<number>;
                /**
                 * The StackSize field shall indicate the amount of stack memory, in bytes, that has been allocated for use by
                 * the respective thread.
                 *
                 * @see {@link MatterSpecification.v142.Core} § 11.13.5.1.5
                 */
                stackSize: import("../tlv/TlvObject.js").OptionalFieldType<number>;
            }>[], any>;
            /**
             * Indicates the current amount of heap memory, in bytes, that are free for allocation. The effective amount
             * may be smaller due to heap fragmentation or other reasons.
             *
             * @see {@link MatterSpecification.v142.Core} § 11.13.6.2
             */
            readonly currentHeapFree: OptionalAttribute<number | bigint, any>;
            /**
             * Indicates the current amount of heap memory, in bytes, that is being used.
             *
             * @see {@link MatterSpecification.v142.Core} § 11.13.6.3
             */
            readonly currentHeapUsed: OptionalAttribute<number | bigint, any>;
        };
        readonly events: {
            /**
             * This Event shall be generated when a software fault occurs on the Node.
             *
             * @see {@link MatterSpecification.v142.Core} § 11.13.8.1
             */
            readonly softwareFault: OptionalEvent<import("../tlv/TlvObject.js").TypeFromFields<{
                /**
                 * This field shall be set to the ID of the software thread in which the last software fault occurred.
                 *
                 * @see {@link MatterSpecification.v142.Core} § 11.13.8.1.1
                 */
                id: import("../tlv/TlvObject.js").FieldType<number | bigint>;
                /**
                 * This field shall be set to a manufacturer-specified name or prefix of the software thread in which the last
                 * software fault occurred.
                 *
                 * @see {@link MatterSpecification.v142.Core} § 11.13.8.1.2
                 */
                name: import("../tlv/TlvObject.js").OptionalFieldType<string>;
                /**
                 * This field shall be a manufacturer-specified payload intended to convey information to assist in further
                 * diagnosing or debugging a software fault. The FaultRecording field may be used to convey information such as,
                 * but not limited to, thread backtraces or register contents.
                 *
                 * @see {@link MatterSpecification.v142.Core} § 11.13.8.1.3
                 */
                faultRecording: import("../tlv/TlvObject.js").OptionalFieldType<AllowSharedBufferSource>;
            }>, any>;
        };
        /**
         * This metadata controls which SoftwareDiagnosticsCluster elements matter.js activates for specific feature
         * combinations.
         */
        readonly extensions: readonly [{
            readonly flags: {
                readonly watermarks: true;
            };
            readonly component: {
                readonly attributes: {
                    /**
                     * Indicates the maximum amount of heap memory, in bytes, that has been used by the Node. This value shall
                     * only be reset upon a Node reboot or upon receiving of the ResetWatermarks command.
                     *
                     * @see {@link MatterSpecification.v142.Core} § 11.13.6.4
                     */
                    readonly currentHeapHighWatermark: Attribute<number | bigint, any>;
                };
                readonly commands: {
                    /**
                     * This command is used to reset the high watermarks for heap and stack memory.
                     *
                     * Receipt of this command shall reset the following values which track high and lower watermarks:
                     *
                     *   - The StackFreeMinimum field of the ThreadMetrics attribute
                     *
                     *   - The CurrentHeapHighWatermark attribute
                     *
                     * ### Effect on Receipt
                     *
                     * On receipt of this command, the Node shall make the following modifications to attributes it supports:
                     *
                     * If implemented, the server shall set the value of the CurrentHeapHighWatermark attribute to the value of
                     * the CurrentHeapUsed attribute.
                     *
                     * If implemented, the server shall set the value of the StackFreeMinimum field for every thread to the
                     * value of the corresponding thread’s StackFreeCurrent field.
                     *
                     * @see {@link MatterSpecification.v142.Core} § 11.13.7.1
                     */
                    readonly resetWatermarks: Command<void, void, any>;
                };
            };
        }];
    };
    /**
     * @see {@link Cluster}
     */
    const ClusterInstance: MutableCluster<{
        readonly id: 52;
        readonly name: "SoftwareDiagnostics";
        readonly revision: 1;
        readonly features: {
            /**
             * Node makes available the metrics for high watermark related to memory consumption.
             */
            readonly watermarks: BitFlag;
        };
        readonly attributes: {
            /**
             * This attribute shall be a list of ThreadMetricsStruct structs. Each active thread on the Node shall be
             * represented by a single entry within the ThreadMetrics attribute.
             *
             * @see {@link MatterSpecification.v142.Core} § 11.13.6.1
             */
            readonly threadMetrics: OptionalAttribute<import("../tlv/TlvObject.js").TypeFromFields<{
                /**
                 * The Id field shall be a server-assigned per-thread unique ID that is constant for the duration of the thread.
                 * Efforts SHOULD be made to avoid reusing ID values when possible.
                 *
                 * @see {@link MatterSpecification.v142.Core} § 11.13.5.1.1
                 */
                id: import("../tlv/TlvObject.js").FieldType<number | bigint>;
                /**
                 * The Name field shall be set to a vendor defined name or prefix of the software thread that is static for the
                 * duration of the thread.
                 *
                 * @see {@link MatterSpecification.v142.Core} § 11.13.5.1.2
                 */
                name: import("../tlv/TlvObject.js").OptionalFieldType<string>;
                /**
                 * The StackFreeCurrent field shall indicate the current amount of stack memory, in bytes, that are not being
                 * utilized on the respective thread.
                 *
                 * @see {@link MatterSpecification.v142.Core} § 11.13.5.1.3
                 */
                stackFreeCurrent: import("../tlv/TlvObject.js").OptionalFieldType<number>;
                /**
                 * The StackFreeMinimum field shall indicate the minimum amount of stack memory, in bytes, that has been
                 * available at any point between the current time and this attribute being reset or initialized on the
                 * respective thread. This value shall only be reset upon a Node reboot or upon receiving of the ResetWatermarks
                 * command.
                 *
                 * @see {@link MatterSpecification.v142.Core} § 11.13.5.1.4
                 */
                stackFreeMinimum: import("../tlv/TlvObject.js").OptionalFieldType<number>;
                /**
                 * The StackSize field shall indicate the amount of stack memory, in bytes, that has been allocated for use by
                 * the respective thread.
                 *
                 * @see {@link MatterSpecification.v142.Core} § 11.13.5.1.5
                 */
                stackSize: import("../tlv/TlvObject.js").OptionalFieldType<number>;
            }>[], any>;
            /**
             * Indicates the current amount of heap memory, in bytes, that are free for allocation. The effective amount
             * may be smaller due to heap fragmentation or other reasons.
             *
             * @see {@link MatterSpecification.v142.Core} § 11.13.6.2
             */
            readonly currentHeapFree: OptionalAttribute<number | bigint, any>;
            /**
             * Indicates the current amount of heap memory, in bytes, that is being used.
             *
             * @see {@link MatterSpecification.v142.Core} § 11.13.6.3
             */
            readonly currentHeapUsed: OptionalAttribute<number | bigint, any>;
        };
        readonly events: {
            /**
             * This Event shall be generated when a software fault occurs on the Node.
             *
             * @see {@link MatterSpecification.v142.Core} § 11.13.8.1
             */
            readonly softwareFault: OptionalEvent<import("../tlv/TlvObject.js").TypeFromFields<{
                /**
                 * This field shall be set to the ID of the software thread in which the last software fault occurred.
                 *
                 * @see {@link MatterSpecification.v142.Core} § 11.13.8.1.1
                 */
                id: import("../tlv/TlvObject.js").FieldType<number | bigint>;
                /**
                 * This field shall be set to a manufacturer-specified name or prefix of the software thread in which the last
                 * software fault occurred.
                 *
                 * @see {@link MatterSpecification.v142.Core} § 11.13.8.1.2
                 */
                name: import("../tlv/TlvObject.js").OptionalFieldType<string>;
                /**
                 * This field shall be a manufacturer-specified payload intended to convey information to assist in further
                 * diagnosing or debugging a software fault. The FaultRecording field may be used to convey information such as,
                 * but not limited to, thread backtraces or register contents.
                 *
                 * @see {@link MatterSpecification.v142.Core} § 11.13.8.1.3
                 */
                faultRecording: import("../tlv/TlvObject.js").OptionalFieldType<AllowSharedBufferSource>;
            }>, any>;
        };
        /**
         * This metadata controls which SoftwareDiagnosticsCluster elements matter.js activates for specific feature
         * combinations.
         */
        readonly extensions: readonly [{
            readonly flags: {
                readonly watermarks: true;
            };
            readonly component: {
                readonly attributes: {
                    /**
                     * Indicates the maximum amount of heap memory, in bytes, that has been used by the Node. This value shall
                     * only be reset upon a Node reboot or upon receiving of the ResetWatermarks command.
                     *
                     * @see {@link MatterSpecification.v142.Core} § 11.13.6.4
                     */
                    readonly currentHeapHighWatermark: Attribute<number | bigint, any>;
                };
                readonly commands: {
                    /**
                     * This command is used to reset the high watermarks for heap and stack memory.
                     *
                     * Receipt of this command shall reset the following values which track high and lower watermarks:
                     *
                     *   - The StackFreeMinimum field of the ThreadMetrics attribute
                     *
                     *   - The CurrentHeapHighWatermark attribute
                     *
                     * ### Effect on Receipt
                     *
                     * On receipt of this command, the Node shall make the following modifications to attributes it supports:
                     *
                     * If implemented, the server shall set the value of the CurrentHeapHighWatermark attribute to the value of
                     * the CurrentHeapUsed attribute.
                     *
                     * If implemented, the server shall set the value of the StackFreeMinimum field for every thread to the
                     * value of the corresponding thread’s StackFreeCurrent field.
                     *
                     * @see {@link MatterSpecification.v142.Core} § 11.13.7.1
                     */
                    readonly resetWatermarks: Command<void, void, any>;
                };
            };
        }];
    }, []>;
    /**
     * The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that may be used by
     * a Node to assist a user or Administrator in diagnosing potential problems. The Software Diagnostics Cluster
     * attempts to centralize all metrics that are relevant to the software that may be running on a Node.
     *
     * SoftwareDiagnosticsCluster supports optional features that you can enable with the
     * SoftwareDiagnosticsCluster.with() factory method.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.13
     */
    interface Cluster extends Identity<typeof ClusterInstance> {
    }
    const Cluster: Cluster;
    /**
     * @see {@link Complete}
     */
    const CompleteInstance: MutableCluster<{
        readonly id: import("#general").Branded<52, "ClusterId">;
        readonly name: "SoftwareDiagnostics";
        readonly revision: 1;
        readonly features: {
            /**
             * Node makes available the metrics for high watermark related to memory consumption.
             */
            readonly watermarks: BitFlag;
        };
        readonly attributes: {
            readonly currentHeapHighWatermark: Attribute<number | bigint, any> & {
                readonly optional: true;
                readonly isConditional: true;
                readonly optionalIf: [] | import("../cluster/Cluster.js").ConditionalFeatureList<import("../schema/BitmapSchema.js").BitSchema>;
                readonly mandatoryIf: [] | [{
                    watermarks: boolean;
                }];
            };
            readonly threadMetrics: OptionalAttribute<import("../tlv/TlvObject.js").TypeFromFields<{
                /**
                 * The Id field shall be a server-assigned per-thread unique ID that is constant for the duration of the thread.
                 * Efforts SHOULD be made to avoid reusing ID values when possible.
                 *
                 * @see {@link MatterSpecification.v142.Core} § 11.13.5.1.1
                 */
                id: import("../tlv/TlvObject.js").FieldType<number | bigint>;
                /**
                 * The Name field shall be set to a vendor defined name or prefix of the software thread that is static for the
                 * duration of the thread.
                 *
                 * @see {@link MatterSpecification.v142.Core} § 11.13.5.1.2
                 */
                name: import("../tlv/TlvObject.js").OptionalFieldType<string>;
                /**
                 * The StackFreeCurrent field shall indicate the current amount of stack memory, in bytes, that are not being
                 * utilized on the respective thread.
                 *
                 * @see {@link MatterSpecification.v142.Core} § 11.13.5.1.3
                 */
                stackFreeCurrent: import("../tlv/TlvObject.js").OptionalFieldType<number>;
                /**
                 * The StackFreeMinimum field shall indicate the minimum amount of stack memory, in bytes, that has been
                 * available at any point between the current time and this attribute being reset or initialized on the
                 * respective thread. This value shall only be reset upon a Node reboot or upon receiving of the ResetWatermarks
                 * command.
                 *
                 * @see {@link MatterSpecification.v142.Core} § 11.13.5.1.4
                 */
                stackFreeMinimum: import("../tlv/TlvObject.js").OptionalFieldType<number>;
                /**
                 * The StackSize field shall indicate the amount of stack memory, in bytes, that has been allocated for use by
                 * the respective thread.
                 *
                 * @see {@link MatterSpecification.v142.Core} § 11.13.5.1.5
                 */
                stackSize: import("../tlv/TlvObject.js").OptionalFieldType<number>;
            }>[], any>;
            readonly currentHeapFree: OptionalAttribute<number | bigint, any>;
            readonly currentHeapUsed: OptionalAttribute<number | bigint, any>;
            readonly clusterRevision: Attribute<number, never>;
            readonly featureMap: Attribute<import("../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
                /**
                 * Node makes available the metrics for high watermark related to memory consumption.
                 */
                readonly watermarks: BitFlag;
            }>, never>;
            readonly attributeList: Attribute<import("../index.js").AttributeId[], never>;
            readonly acceptedCommandList: Attribute<import("../index.js").CommandId[], never>;
            readonly generatedCommandList: Attribute<import("../index.js").CommandId[], never>;
        };
        readonly commands: {
            readonly resetWatermarks: Command<void, void, any> & {
                readonly optional: true;
                readonly isConditional: true;
                readonly optionalIf: [] | import("../cluster/Cluster.js").ConditionalFeatureList<import("../schema/BitmapSchema.js").BitSchema>;
                readonly mandatoryIf: [] | [{
                    watermarks: boolean;
                }];
            };
        };
        readonly events: {
            /**
             * This Event shall be generated when a software fault occurs on the Node.
             *
             * @see {@link MatterSpecification.v142.Core} § 11.13.8.1
             */
            readonly softwareFault: OptionalEvent<import("../tlv/TlvObject.js").TypeFromFields<{
                /**
                 * This field shall be set to the ID of the software thread in which the last software fault occurred.
                 *
                 * @see {@link MatterSpecification.v142.Core} § 11.13.8.1.1
                 */
                id: import("../tlv/TlvObject.js").FieldType<number | bigint>;
                /**
                 * This field shall be set to a manufacturer-specified name or prefix of the software thread in which the last
                 * software fault occurred.
                 *
                 * @see {@link MatterSpecification.v142.Core} § 11.13.8.1.2
                 */
                name: import("../tlv/TlvObject.js").OptionalFieldType<string>;
                /**
                 * This field shall be a manufacturer-specified payload intended to convey information to assist in further
                 * diagnosing or debugging a software fault. The FaultRecording field may be used to convey information such as,
                 * but not limited to, thread backtraces or register contents.
                 *
                 * @see {@link MatterSpecification.v142.Core} § 11.13.8.1.3
                 */
                faultRecording: import("../tlv/TlvObject.js").OptionalFieldType<AllowSharedBufferSource>;
            }>, any>;
        };
    }, []>;
    /**
     * This cluster supports all SoftwareDiagnostics features. It may support illegal feature combinations.
     *
     * If you use this cluster you must manually specify which features are active and ensure the set of active features
     * is legal per the Matter specification.
     */
    interface Complete extends Identity<typeof CompleteInstance> {
    }
    const Complete: Complete;
}
export type SoftwareDiagnosticsCluster = SoftwareDiagnostics.Cluster;
export declare const SoftwareDiagnosticsCluster: SoftwareDiagnostics.Cluster;
//# sourceMappingURL=software-diagnostics.d.ts.map