CacheUploader

open class CacheUploader(suitManager: SUITManager, partition: Int, data: ByteArray, windowCapacity: Int = 1, memoryAlignment: Int = 1) : Uploader

This uploader is using a SUITManager to upload the cache file during device firmware update.

After sending a SUIT Envelope using EnvelopeUploader with deferred install, use this uploader to send the cache files.

Parameters

data

The resource data, as bytes.

windowCapacity

Number of buffers available for sending data, defaults to 1. The more buffers are available, the more packets can be sent without awaiting notification with response, thus accelerating upload process.

memoryAlignment

The memory alignment of the device, defaults to 1. Some memory implementations may require bytes to be aligned to a certain value before saving them.

Constructors

Link copied to clipboard
constructor(suitManager: SUITManager, partition: Int, data: ByteArray, windowCapacity: Int = 1, memoryAlignment: Int = 1)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
suspend fun pause()

Pauses upload.

Link copied to clipboard
fun resume()

Resumes upload.

Link copied to clipboard
suspend fun upload()

Uploads the data.

Link copied to clipboard
fun uploadAsync(callback: UploadCallback, scope: CoroutineScope = GlobalScope): TransferController

Uploads the data asynchronously.