SUITManager

open class SUITManager : McuManager

The SUIT Manager provides API to access SUIT manifests on supported devices, as well as perform firmware update. Comparing to ImageManager it provides more granular control over the running firmware split into several domains.

Constructors

Link copied to clipboard
constructor(@NotNull transporter: @NotNull McuMgrTransport)
Construct a McuManager instance.

Functions

Link copied to clipboard
@NotNull
open fun beginDeferredInstall(): @NotNull McuMgrResponse
Begins the update process (synchronous).
open fun beginDeferredInstall(@NotNull callback: @NotNull McuMgrCallback<McuMgrResponse>)
Begins the update process (asynchronous).
Link copied to clipboard
open fun buildPacket(@NotNull scheme: @NotNull McuMgrScheme, op: Int, flags: Int, groupId: Int, sequenceNum: Int, commandId: Int, @Nullable payloadMap: @Nullable Map<String, Any>): @NotNull Array<Byte>
Build a Mcu Manager packet based on the transport scheme.
Link copied to clipboard
@NotNull
open fun cleanup(): @NotNull McuMgrResponse
Erases the SUIT candidate envelope and cache images stored on the device (synchronous).
open fun cleanup(@NotNull callback: @NotNull McuMgrCallback<McuMgrResponse>)
Erases the SUIT candidate envelope and cache images stored on the device (asynchronous).
Link copied to clipboard
@NotNull
open fun dateToString(@Nullable date: @Nullable Date, @Nullable timeZone: @Nullable TimeZone): @NotNull String
Format a Date and a TimeZone into a String which McuManager will accept.
Link copied to clipboard
open fun getGroupId(): Int
Get the group ID for this manager.
Link copied to clipboard
@NotNull
open fun getManifestState(role: Int): @NotNull McuMgrManifestStateResponse
Command allows to get information about the configuration of supported manifests and selected attributes of installed manifests of specified role (synchronous).
open fun getManifestState(role: Int, @NotNull callback: @NotNull McuMgrCallback<McuMgrManifestStateResponse>)
Command allows to get information about the configuration of supported manifests and selected attributes of installed manifests of specified role (asynchronous).
Link copied to clipboard
open fun getMtu(): Int
Returns the upload MTU.
Link copied to clipboard
@NotNull
open fun getScheme(): @NotNull McuMgrScheme
Get the transporter's scheme.
Link copied to clipboard
@NotNull
open fun getTransporter(): @NotNull McuMgrTransport
Get the transporter.
Link copied to clipboard
@NotNull
open fun listManifests(): @NotNull McuMgrResponse
open fun listManifests(@NotNull callback: @NotNull McuMgrCallback<McuMgrManifestListResponse>)
Command allows to get information about roles of manifests supported by the device.
Link copied to clipboard
@NotNull
open fun poll(): @NotNull McuMgrPollResponse
Poll for required image (synchronous).
open fun poll(@NotNull callback: @NotNull McuMgrCallback<McuMgrPollResponse>)
Poll for required image (asynchronous).
Link copied to clipboard
@NotNull
open fun <T : McuMgrResponse?> send(data: @NotNull Array<Byte>, @NotNull respType: @NotNull Class<T>): @NotNull T
@NotNull
open fun <T : McuMgrResponse?> send(data: @NotNull Array<Byte>, timeout: Long, @NotNull respType: @NotNull Class<T>): @NotNull T
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
open fun <T : McuMgrResponse?> send(op: Int, commandId: Int, @Nullable payloadMap: @Nullable Map<String, Any>, @NotNull respType: @NotNull Class<T>): @NotNull T
@NotNull
open fun <T : McuMgrResponse?> send(op: Int, commandId: Int, @Nullable payloadMap: @Nullable Map<String, Any>, timeout: Long, @NotNull respType: @NotNull Class<T>): @NotNull T
@NotNull
open fun <T : McuMgrResponse?> send(op: Int, flags: Int, sequenceNum: Int, commandId: Int, @NotNull respType: @NotNull Class<T>, @Nullable payloadMap: @Nullable Map<String, Any>): @NotNull T
@NotNull
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 T
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
open fun setUploadMtu(mtu: Int): Boolean
Sets the upload MTU.
Link copied to clipboard
@Nullable
open fun stringToDate(@Nullable dateString: @Nullable String): @Nullable Date
Parse a date string returned by a McuMgr response.
Link copied to clipboard
@NotNull
open fun upload(data: @NotNull Array<Byte>, offset: Int): @NotNull McuMgrUploadResponse
@NotNull
open fun upload(data: @NotNull Array<Byte>, offset: Int, deferInstall: Boolean): @NotNull McuMgrUploadResponse
Command delivers a part of SUIT envelope to the device (synchronous).
open fun upload(data: @NotNull Array<Byte>, offset: Int, @NotNull callback: @NotNull McuMgrCallback<McuMgrUploadResponse>)
open fun upload(data: @NotNull Array<Byte>, offset: Int, deferInstall: Boolean, @NotNull callback: @NotNull McuMgrCallback<McuMgrUploadResponse>)
Command delivers a part of SUIT envelope to the device (asynchronous).
Link copied to clipboard
@NotNull
open fun uploadCache(partition: Int, data: @NotNull Array<Byte>, offset: Int): @NotNull McuMgrUploadResponse
Command delivers a part of a raw cache image to the device (synchronous).
open fun uploadCache(partition: Int, data: @NotNull Array<Byte>, offset: Int, @NotNull callback: @NotNull McuMgrCallback<McuMgrUploadResponse>)
Command delivers a part of a raw cache image to the device (asynchronous).
Link copied to clipboard
@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).
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).