McuMgrBootloaderInfoResponse

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open var activeB0Slot: Int
The id of the active B0 slot.
Link copied to clipboard
open var bootloader: String
Link copied to clipboard
Since version 2 of the SMP protocol, a more detailed return code is returned in the response.
Link copied to clipboard
open var mode: Int
Text response including requested parameters.
Link copied to clipboard
MCUboot is in DirectXIP without revert mode.
Link copied to clipboard
MCUboot is in DirectXIP with revert mode.
Link copied to clipboard
MCUboot is in Firmware Loader mode.
Link copied to clipboard
MCUboot is in overwrite (upgrade-only) mode.
Link copied to clipboard
MCUboot is in RAM loader mode.
Link copied to clipboard
MCUboot is in single application mode.
Link copied to clipboard
MCUboot is in swap using scratch partition mode.
Link copied to clipboard
MCUboot is in swap without scratch mode.
Link copied to clipboard
val MODE_UNKNOWN: Int = -1
Unknown mode of MCUboot.
Link copied to clipboard
The "no-downgrade" is a flag, indicating that mode has downgrade prevention enabled; downgrade prevention means that if uploaded image has lower version than running, it will not be taken for execution by MCUboot.
Link copied to clipboard
open var rc: Int
The raw return code found in most McuMgr response payloads.
Link copied to clipboard
val UNKNOWN_SLOT: Int = -1
The active slot number is unknown.

Functions

Link copied to clipboard
@NotNull
open fun <T : McuMgrResponse?> buildCoapResponse(@NotNull scheme: @NotNull McuMgrScheme, bytes: @NotNull Array<Byte>, header: @NotNull Array<Byte>, payload: @NotNull Array<Byte>, codeClass: Int, codeDetail: Int, type: Class<T>): @NotNull T
Build a CoAP McuMgrResponse.
Link copied to clipboard
@NotNull
open fun <T : McuMgrResponse?> buildResponse(@NotNull scheme: @NotNull McuMgrScheme, bytes: @NotNull Array<Byte>, @NotNull type: @NotNull Class<T>): @NotNull T
Build a McuMgrResponse.
Link copied to clipboard
open fun getBytes(): Array<Byte>
Get the response bytes.
Link copied to clipboard
open fun getCoapCode(): Int
If this response is from a CoAP transport scheme, get the CoAP response code.
Link copied to clipboard
open fun getExpectedLength(@NotNull scheme: @NotNull McuMgrScheme, bytes: @NotNull Array<Byte>): Int
This method parses the given bytes and reads the LENGTH field from the header.
Link copied to clipboard
Return the Group return code as Group - Return Code pair.
Link copied to clipboard
@Nullable
open fun getHeader(): @Nullable McuMgrHeader
Get the McuMgrHeader for this response.
Link copied to clipboard
@Nullable
open fun getOsReturnCode(): @Nullable DefaultManager.ReturnCode
Link copied to clipboard
open fun getPayload(): @Nullable Array<Byte>
Get the response payload bytes.
Link copied to clipboard
Get the return code as an enum.
Link copied to clipboard
Return the Mcu Manager return code as an int.
Link copied to clipboard
Get the scheme used to initialize this response object.
Link copied to clipboard
open fun isSuccess(): Boolean
Returns true if the response payload contains a return code of 0 or no return code.
Link copied to clipboard
@NotNull
open fun toString(): @NotNull String
Return the string representation of the response payload.