SUITManagerKtx

class SUITManagerKtx(val manager: SUITManager)

A manager of the SUIT group of Mcu Manager, with suspending methods. It wraps SUITManager.

These are the single requests of the group. Use no.nordicsemi.android.mcumgr.ktx.dfu.SUITUpgradeManagerKtx to perform the whole SUIT upgrade.

Every method suspends until the response is received, and throws a McuMgrException if the request fails, or a McuMgrErrorException if the device responds with an error, that is with a non-zero return code. Cancelling the calling coroutine stops waiting for the response, but does not cancel the request, which has already been sent.

Use the manager to set a logger, the upload MTU, etc.

Constructors

Link copied to clipboard
constructor(manager: SUITManager)
constructor(transport: McuMgrTransport)

Creates the manager using the given transport.

Properties

Link copied to clipboard

The manager of the Mcu Manager library, which sends the requests.

Functions

Link copied to clipboard

Begins the deferred install of the uploaded envelope.

Link copied to clipboard
suspend fun cleanup(): McuMgrResponse

Cleans up the SUIT state on the device.

Link copied to clipboard

Reads the state of the manifest of the given role.

Link copied to clipboard

Lists the manifests on the device.

Link copied to clipboard
suspend fun poll(): McuMgrPollResponse

Polls the device for the image or resource it requires.

Link copied to clipboard
suspend fun upload(data: ByteArray, offset: Int, deferInstall: Boolean = false): McuMgrUploadResponse

Sends a chunk of the SUIT envelope.

Link copied to clipboard
suspend fun uploadCache(partition: Int, data: ByteArray, offset: Int): McuMgrUploadResponse

Sends a chunk of an image of the cache partition.

Link copied to clipboard
suspend fun uploadResource(sessionId: Int, data: ByteArray, offset: Int): McuMgrUploadResponse

Sends a chunk of a resource requested by the device.