import { CommandClasses, InterviewStage } from "@zwave-js/core"; import { DeviceConfigMixin } from "./80_DeviceConfig.js"; export declare abstract class InterviewProgressMixin extends DeviceConfigMixin { /** The last reported overall interview progress in percent [0, 100]. Monotonically non-decreasing. */ private _interviewProgress; /** Whether the CC interview has reached the bulk phase, where the total amount of work is known */ private _ccInterviewBulkPhase; /** Total remaining CC interview weight at the start of the bulk phase */ private _ccInterviewBulkRemainingWeight; /** Width of the progress band [`_interviewProgress` … CC band end] available to the bulk phase */ private _ccInterviewBulkBand; /** Start of the progress slice allotted to the CC currently being interviewed */ private _ccInterviewStepStart; /** Width of the progress slice allotted to the CC currently being interviewed */ private _ccInterviewStepWidth; private _ccInterviewCurrentEndpoint; private _ccInterviewCurrentCC; private emitInterviewProgress; private emitInterviewProgressUpdate; /** * Resets the overall progress baseline to 0 for a fresh interview and emits an initial * progress event (stage `None`). This gives consumers a meaningful 0% anchor right away, * even if the first interview stage never starts. */ protected resetInterviewProgressBaseline(): void; /** * Resets the per-stage progress tracking at the start of the CC interview. * The overall progress baseline is intentionally NOT reset here, so it stays monotonic * across a resumed interview. It is reset for a fresh interview in `interviewInternal`. */ protected resetCCInterviewProgress(): void; /** * Sets up proportional progress distribution for the bulk phase of the CC interview, * which is reached once the complete CC inventory is known. From here, progress is * distributed proportionally to the remaining interview weight, summed across every * not-yet-interviewed CC of the root device and all endpoints. */ protected setupCCInterviewBulkProgress(...remainingCCs: Iterable[]): void; /** * The relative weight of a CC's interview, used to distribute interview progress more * realistically. The weight approximates the number of device queries the CC's interview * performs, so the progress bar advances at a roughly constant per-query rate. Most CCs are * quick (weight 1); CCs that iterate over a runtime-enumerated collection get a higher weight * derived from the typical size of that collection. * * Typical collection sizes used to derive the weights below (median across a survey of ~30 * certified products in the Z-Wave Alliance product database, plus some common sense): * * | Collection | Typical | Affected CC(s) | * | ----------------------------------- | ------- | --------------------------------------------------------- | * | Configuration parameters | ~30* | Configuration (*fallback when no config file) | * | Supported CCs (queried for version) | ~20 | Version | * | Association groups | ~5 | Association, Association Group Information, | * | | | Multi Channel Association, Scene Controller Configuration | * | Notification types | ~3 | Notification | * | Multi Channel endpoints | ~3 | Multi Channel | * | Multilevel Sensor types | ~3 | Multilevel Sensor | * | Meter scales/rate types | ~4 | Meter | * | Alarm Sensor types | ~2 | Alarm Sensor | * | Binary Sensor types | ~1 | Binary Sensor | * | User codes / credentials | ~25 | User Code (opt-in only), User Credential | */ private ccInterviewWeight; /** * The interview weight of the Configuration CC scales with the number of parameters that get * queried. When they are known up front from the device config file, the weight is the count * of distinct parameters, otherwise we assume a typical count. */ private configurationCCInterviewWeight; /** Computes the progress slice width for the CC that is about to be interviewed */ private computeCCInterviewStepWidth; /** Reserves a progress slice for the CC that is about to be interviewed */ protected reserveCCInterviewStepProgress(endpoint: number, cc: CommandClasses): void; /** Completes the current CC's progress slice and emits an update */ protected completeCCInterviewStepProgress(): void; /** * Advances the overall progress to the start of the given interview stage and emits an update * reporting that stage as currently in progress. */ protected reportInterviewStageStarted(stage: InterviewStage): void; /** * Returns the assumed interview weight of the given CC, used by CCs to estimate their own * interview progress when the actual amount of work is not known up front. * Implements the {@link ReportInterviewProgress} trait. */ getInterviewProgressWeight(cc: CommandClasses): number; /** * Reports fine-grained progress from within the interview of the CC that is currently * being interviewed. Called by CCs (via `getNode(ctx)`) to keep the overall progress moving * during long-running interview steps. Implements the {@link ReportInterviewProgress} trait. */ reportInterviewProgress(completed: number, total: number): void; } //# sourceMappingURL=90_InterviewProgress.d.ts.map