Constructors

Link copied to clipboard
constructor()

Properties

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 rc: Int
The raw return code found in most McuMgr response payloads.

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.