ImageManager
Image command-group manager. This manager can read the image state of a device, test or confirm images, and perform image uploads to the spare image slot. Once initialized, an ImageManager can perform multiple image uploads, but can only handle performing one at a time.
It is important to note that image upload is only one step in a firmware upgrade. To perform a full firmware upgrade use FirmwareUpgradeManager.
See also
Types
Link copied to clipboard
Core Download Implementation
Link copied to clipboard
Image Upload Implementation
Link copied to clipboard
interface ImageUploadCallback
Callback for upload command.
Link copied to clipboard
Link copied to clipboard
Functions
Link copied to clipboard
Link copied to clipboard
Cancel an image upload.
Link copied to clipboard
Confirm an image on the device (synchronous).
open fun confirm(hash: @Nullable Array<Byte>, @NotNull callback: @NotNull McuMgrCallback<McuMgrImageStateResponse>)
Confirm an image on the device (asynchronous).
Link copied to clipboard
Continue a paused image upload.
Link copied to clipboard
@NotNull
Start core download.
Link copied to clipboard
Erase a core dump from the device (synchronous).
Erase a core dump from the device (asynchronous).
Link copied to clipboard
Core list (synchronous).
Core list (asynchronous).
Link copied to clipboard
Core load (synchronous).
Core load (asynchronous).
Link copied to clipboard
@NotNull
Format a Date and a TimeZone into a String which McuManager will accept.
Link copied to clipboard
Erase the secondary slot of the main image (synchronous).
Erase the given slot of the main image (synchronous).
Erase the secondary slot of the main image (asynchronous).
Erase the given slot of the main image (asynchronous).
Link copied to clipboard
Get the group ID for this manager.
Link copied to clipboard
Get the transporter's scheme.
Link copied to clipboard
Get the transporter.
Link copied to clipboard
Link copied to clipboard
@NotNull
@NotNull
Start image upload.
Link copied to clipboard
List the images on a device (synchronous).
List the images on a device (asynchronous).
Link copied to clipboard
Pause an in progress upload.
Link copied to clipboard
@NotNull
@NotNull
Send data synchronously using the transporter.
open fun <T : McuMgrResponse?> send(data: @NotNull Array<Byte>, @NotNull respType: @NotNull Class<T>, @NotNull callback: @NotNull McuMgrCallback<T>)
open fun <T : McuMgrResponse?> send(data: @NotNull Array<Byte>, timeout: Long, @NotNull respType: @NotNull Class<T>, @NotNull callback: @NotNull McuMgrCallback<T>)
Send data asynchronously using the transporter.
@NotNull
@NotNull
@NotNull
@NotNull
Send synchronous Mcu Manager command.
open fun <T : McuMgrResponse?> send(op: Int, commandId: Int, @Nullable payloadMap: @Nullable Map<String, Any>, @NotNull respType: @NotNull Class<T>, @NotNull callback: @NotNull McuMgrCallback<T>)
open fun <T : McuMgrResponse?> send(op: Int, commandId: Int, @Nullable payloadMap: @Nullable Map<String, Any>, timeout: Long, @NotNull respType: @NotNull Class<T>, @NotNull callback: @NotNull McuMgrCallback<T>)
open fun <T : McuMgrResponse?> send(op: Int, flags: Int, sequenceNum: Int, commandId: Int, @Nullable payloadMap: @Nullable Map<String, Any>, @NotNull respType: @NotNull Class<T>, @NotNull callback: @NotNull McuMgrCallback<T>)
open fun <T : McuMgrResponse?> send(op: Int, flags: Int, sequenceNum: Int, commandId: Int, @Nullable payloadMap: @Nullable Map<String, Any>, timeout: Long, @NotNull respType: @NotNull Class<T>, @NotNull callback: @NotNull McuMgrCallback<T>)
Send an asynchronous Mcu Manager command.
Link copied to clipboard
Sets the upload MTU.
Link copied to clipboard
Reads slot information (synchronous).
Reads slot information (asynchronous).
Link copied to clipboard
@NotNull
Start an download.
Link copied to clipboard
Start an upload.
Link copied to clipboard
Parse a date string returned by a McuMgr response.
Link copied to clipboard
Test an image on the device (synchronous).
open fun test(hash: @NotNull Array<Byte>, @NotNull callback: @NotNull McuMgrCallback<McuMgrImageStateResponse>)
Test an image on the device (asynchronous).
Link copied to clipboard
@NotNull
Send a packet of given data from the specified offset to the device (synchronous).
open fun upload(data: @NotNull Array<Byte>, @NotNull callback: @NotNull ImageManager.ImageUploadCallback): Boolean
Begin an image upload.
@NotNull
Send a packet of given data from the specified offset to the given core (image) on the device (synchronous).
open fun upload(data: @NotNull Array<Byte>, offset: Int, @NotNull callback: @NotNull McuMgrCallback<McuMgrImageUploadResponse>)
Send a packet of given data from the specified offset to the device (asynchronous).
open fun upload(data: @NotNull Array<Byte>, offset: Int, image: Int, @NotNull callback: @NotNull McuMgrCallback<McuMgrImageUploadResponse>)
Send a packet of given data from the specified offset to the given core (image) on the device (asynchronous).
Link copied to clipboard
fun ImageManager.windowUpload(data: ByteArray, image: Int, windowCapacity: Int, memoryAlignment: Int, callback: UploadCallback): TransferController