uploadResource

open fun uploadResource(sessionId: Int, data: @NotNull Array<Byte>, offset: Int, @NotNull callback: @NotNull McuMgrCallback<McuMgrUploadResponse>)

Command delivers a part of the requested resource to the device (asynchronous).

After sending a SUIT Envelope using upload, the device may request a resource to be delivered. To get the session ID and the resource ID, use poll.

Use uploadAsync to upload the whole file.

Parameters

sessionId

the non-zero session ID obtained using poll.

data

image data.

offset

the offset, from which the chunk will be sent.

callback

the asynchronous callback.


@NotNull
open fun uploadResource(sessionId: Int, data: @NotNull Array<Byte>, offset: Int): @NotNull McuMgrUploadResponse

Command delivers a part of the requested resource to the device (synchronous).

After sending a SUIT Envelope using upload, the device may request a resource to be delivered. To get the session ID and the resource ID, use poll.

Use uploadAsync to upload the whole envelope.

Return

The upload response.

Parameters

sessionId

the non-zero session ID obtained using poll.

data

image data.

offset

the offset, from which the chunk will be sent.