DfuProgress

sealed interface DfuProgress

Observable states of a firmware update.

Emitted sequentially by DfuController.performDfu: Starting → (VerifyingTransferring)* → CompletingCompleted. On error the flow emits Failed; on cancellation it emits Aborted.

Inheritors

Types

Link copied to clipboard
data object Aborted : DfuProgress

Firmware update was cancelled via DfuController.abort or flow cancellation.

Link copied to clipboard
data object Completed : DfuProgress

Firmware update finished successfully.

Link copied to clipboard
data object Completing : DfuProgress

All objects transferred; executing the firmware on the peripheral.

Link copied to clipboard
data class Failed(val error: DfuError) : DfuProgress

Firmware update failed. Inspect error for the cause.

Link copied to clipboard
data object Starting : DfuProgress

DFU session is being set up (PRN configured, init packet prepared).

Link copied to clipboard
data class Transferring(val currentObject: Int, val totalObjects: Int, val bytesSent: Long, val totalBytes: Long, val bytesPerSecond: Long) : DfuProgress

Firmware bytes are being written to the peripheral.

Link copied to clipboard
data class Verifying(val objectIndex: Int) : DfuProgress

CRC32 verification in progress for a completed DFU object.