/**
 * @license
 * Copyright 2022-2024 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { Val } from "#behavior/state/Val.js";
import { ValueSupervisor } from "#behavior/supervision/ValueSupervisor.js";
import { GeneralDiagnostics } from "#clusters/general-diagnostics";
import { Endpoint } from "#endpoint/Endpoint.js";
import { Timer } from "#general";
declare const Base: import("../../index.js").ClusterBehavior.Type<import("#types").ClusterComposer.WithFeatures<GeneralDiagnostics.Cluster, readonly [GeneralDiagnostics.Feature]>, import("../../index.js").ClusterBehavior.Type<GeneralDiagnostics.Cluster, import("../../index.js").ClusterBehavior.Type<import("#types").ClusterType.Of<{
    readonly id: 0;
    readonly revision: 0;
    readonly name: "Unknown";
    readonly attributes: {};
    readonly commands: {};
    readonly events: {};
}>, typeof import("../../index.js").ClusterBehavior, import("./GeneralDiagnosticsInterface.js").GeneralDiagnosticsInterface>, import("./GeneralDiagnosticsInterface.js").GeneralDiagnosticsInterface>, import("./GeneralDiagnosticsInterface.js").GeneralDiagnosticsInterface>;
/**
 * This is the default server implementation of GeneralDiagnosticsBehavior.
 *
 * The implementation provides convenience methods to register and clear hardware, radio, and network faults and to
 * handle test Event triggers.
 *
 * To handle test Event triggers please override the triggerTestEvent method. If these test events are used in
 * certification please also set the EnableKey in the enhanced state as `deviceTestEnableKey`.
 *
 * To register or clear hardware, radio, and network faults, please use the provided convenience methods:
 * * registerHardwareFault and clearHardwareFault
 * * registerRadioFault and clearRadioFault
 * * registerNetworkFault and clearNetworkFault
 * If you want to send events when faults are registered or cleared you need to enable these events when the Root
 * Endpoint gets initialized.
 */
export declare class GeneralDiagnosticsServer extends Base {
    #private;
    protected internal: GeneralDiagnosticsServer.Internal;
    state: GeneralDiagnosticsServer.State;
    schema: import("../../index.js").Schema;
    initialize(): void;
    testEventTrigger({ eventTrigger, enableKey }: GeneralDiagnostics.TestEventTriggerRequest): void;
    protected triggerTestEvent(eventTrigger: number | bigint): void;
    timeSnapshot(): {
        systemTimeMs: number;
        posixTimeMs: number;
    };
    payloadTestRequest({ enableKey, value, count, }: GeneralDiagnostics.PayloadTestRequest): GeneralDiagnostics.PayloadTestResponse;
    /**
     * Register a hardware fault. This convenience method updates the activeHardwareFaults attribute and sends out the
     * HardwareFaultChanged event. Make sure to clear the fault when it is resolved.
     * This method requires that the activeHardwareFaults attribute is activated when the cluster gets initialized.
     *
     * @param faultType The hardware fault to register.
     */
    registerHardwareFault(faultType: GeneralDiagnostics.HardwareFault): void;
    /**
     * Clear a hardware fault. This convenience method updates the activeHardwareFaults attribute and sends out the
     * HardwareFaultChanged event.
     *
     * @param faultType The hardware fault to clear.
     */
    clearHardwareFault(faultType: GeneralDiagnostics.HardwareFault): void;
    /**
     * Register a radio fault. This convenience method updates the activeRadioFaults attribute and sends out the
     * RadioFaultChanged event. Make sure to clear the fault when it is resolved.
     * This method requires that the activeRadioFaults attribute is activated when the cluster gets initialized.
     *
     * @param faultType The radio fault to register.
     */
    registerRadioFault(faultType: GeneralDiagnostics.RadioFault): void;
    /**
     * Clear a radio fault. This convenience method updates the activeRadioFaults attribute and sends out the
     * RadioFaultChanged event.
     *
     * @param faultType The radio fault to clear.
     */
    clearRadioFault(faultType: GeneralDiagnostics.RadioFault): void;
    /**
     * Register a network fault. This convenience method updates the activeNetworkFaults attribute and sends out the
     * NetworkFaultChanged event. Make sure to clear the fault when it is resolved.
     * This method requires that the activeNetworkFaults attribute is activated when the cluster gets initialized.
     *
     * @param faultType The network fault to register.
     */
    registerNetworkFault(faultType: GeneralDiagnostics.NetworkFault): void;
    /**
     * Clear a network fault. This convenience method updates the activeNetworkFaults attribute and sends out the
     * NetworkFaultChanged event.
     *
     * @param faultType The network fault to clear.
     */
    clearNetworkFault(faultType: GeneralDiagnostics.NetworkFault): void;
}
export declare namespace GeneralDiagnosticsServer {
    class Internal {
        /** Remember the bootUp time for the device. */
        bootUpTime: number;
        /** Last time the total operational hours counter was updated. */
        lastTotalOperationalHoursCounterUpdateTime: number;
        /** Timer to update the total operational hours counter every 5 minutes. */
        lastTotalOperationalHoursTimer: Timer | undefined;
    }
    class State extends Base.State {
        /** Internal counter of the total operational hours, counted in seconds, updated every 5 minutes. */
        totalOperationalHoursCounter: number;
        /** The TestEnableKey set for this device for the test commands. Default means "not enabled"." */
        deviceTestEnableKey: Uint8Array;
        [Val.properties](endpoint: Endpoint, _session: ValueSupervisor.Session): {
            /**
             * Dynamically calculate the upTime. This is ok because the attribute is not send out via subscriptions
             * anyway.
             */
            readonly upTime: number;
            /**
             * Dynamically calculate the operating Hours from our internal counter. This is ok because the attribute
             * is not send out via subscriptions anyway.
             */
            readonly totalOperationalHours: number;
        };
    }
    const ExtensionInterface: {
        triggerTestEvent: (eventTrigger: number | bigint) => void;
        registerHardwareFault: (current: GeneralDiagnostics.HardwareFault[], previous: GeneralDiagnostics.HardwareFault[]) => void;
        registerRadioFault: (current: GeneralDiagnostics.RadioFault[], previous: GeneralDiagnostics.RadioFault[]) => void;
        registerNetworkFault: (current: GeneralDiagnostics.NetworkFault[], previous: GeneralDiagnostics.NetworkFault[]) => void;
        clearHardwareFault: (faultType: GeneralDiagnostics.HardwareFault) => void;
        clearRadioFault: (faultType: GeneralDiagnostics.RadioFault) => void;
        clearNetworkFault: (faultType: GeneralDiagnostics.NetworkFault) => void;
    };
}
export {};
//# sourceMappingURL=GeneralDiagnosticsServer.d.ts.map