FotaUpdate

sealed class FotaUpdate

Sealed class representing the various states and progress of a Firmware Over The Air (FOTA) update process.

This class hierarchy provides a type-safe way to track and report the different stages of a FOTA update, from initial device connection through download, installation progress, to final completion. The sealed nature ensures all possible update states are known at compile time.

Inheritors

Types

Link copied to clipboard

Represents the initial state when the update process is connecting to the device.

Link copied to clipboard
data object Downloading : FotaUpdate

Represents the state when firmware files are being downloaded.

Link copied to clipboard
data class Message(val type: Int, val message: String) : FotaUpdate

Represents a message or notification during the update process.

Link copied to clipboard
data class Progress(val progress: Int) : FotaUpdate

Represents the ongoing progress of the firmware update installation.

Link copied to clipboard
data object Success : FotaUpdate

Represents the successful completion of the firmware update process.