Package-level declarations

Types

Link copied to clipboard
sealed class CheckDFUResult

Result of waiting for install mode and checking DFU

Link copied to clipboard
data class DFUDevice(val deviceId: UInt, var peripheral: BluetoothDevice, var parsedManifest: ParsedManifest? = null, var parsedMcubootManifest: ParsedMcubootManifest? = null, var oobRequestPayload: ByteArray? = null, var currentVersion: DeviceFirmwareVersion? = null, var dfuVersion: String? = null, var applicationUpdateRequired: Boolean = false, var mcubootUpdateRequired: Boolean = false, var stageIndex: Int = 0)

Device object pertaining to DFU library. Stores device information along with an optional parsed binary file representation used for performing DFU

Link copied to clipboard
Link copied to clipboard

Defines the interface that implementors implementing DFUDriver for their respective bridgeOS need to implement

Link copied to clipboard
class DFUError(message: String) : Exception
Link copied to clipboard
Link copied to clipboard

UI-oriented flow state for the DFU process. Used by ViewModels to drive progress and phase (download vs install) display.

Link copied to clipboard
sealed class DFUGrpcFetchOutcome

Result of asking Link for a DFU payload for a device.

Link copied to clipboard
class DFUProvider(iOSDFUDriver: DFUDriverImplementation, iOSDFUImageManager: GRPCDFUImageManager, iOSZipProvider: ZipPackageInterface, blueLink: BlueLink, proxy: BLEProxy)

Used by iOS app to create a properly configured DFUService and register it in Koin. This ensures BLEProxy can access the same DFUService instance via Koin.

Link copied to clipboard
data class DFUResponse(var deviceId: UInt, var dfuVersion: String, var dfuImage: ByteArray, var oobRequest: ByteArray, var mcubootFirmware: ByteArray = ByteArray(0))

Matches the DFU object from link.proto

Link copied to clipboard
class DFUService(iOSDFUDriver: DFUDriverImplementation?, iOSDFUImageManager: GRPCDFUImageManager?, iOSZipProvider: ZipPackageInterface?, blueLink: BlueLink, proxy: BLEProxy) : BlueLinkEventListener

Exposes performing functionality for Device Firmware Upgrades on supported Last Lock BLE devices Class handles the entire bridge - device DFU process including DFU image fetching and validation, and conducting the firmware upgrade.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class DFUUiState(val flowState: DFUFlowState, val installProgress: Float, val postInstallProgress: Float, val dfuAvailable: Boolean, val dfuImage: DFUResponse?, val dfuImageLoading: Boolean)
Link copied to clipboard
@Serializable
data class FileEntry(val imageIndex: String, val fileName: String, val firmwareVersion: String? = null, val size: Int)
Link copied to clipboard
data class FilePayload(val fileName: String, val rawBytes: ByteArray)
Link copied to clipboard
Link copied to clipboard
@Serializable
data class Manifest(val formatVersion: Int, val files: List<FileEntry>)

Manifest FileEntry definitions used for parsing through manifest.json in the DFU zip files

Link copied to clipboard
@Serializable
data class McubootFileEntry(val slot: String, val firmwareVersion: String, val fileName: String, val size: Int)
Link copied to clipboard
@Serializable
data class McubootManifest(val formatVersion: Int, val files: List<McubootFileEntry>)
Link copied to clipboard
data class ParsedManifest(val fileEntries: List<Pair<Int, FilePayload>>, val firmwareVersion: String)

Used for storing DFU image parsed in a usable format. FileEntries are listed out by each file where each entry is a Pair with the key being the imageIndex of that DFU image and value being the raw bytes. Firmware version parsed from manifest.json is also included here as well

Link copied to clipboard
data class ParsedMcubootManifest(val fileEntries: Map<Int, FilePayload>, val firmwareVersion: String)
Link copied to clipboard
Link copied to clipboard

Properties

Link copied to clipboard
val dfuModule: Module

Functions

Link copied to clipboard
Link copied to clipboard