DefaultManagerKtx

class DefaultManagerKtx(val manager: DefaultManager)

A manager of the OS (default) group of Mcu Manager, with suspending methods. It wraps DefaultManager.

Every method suspends until the response is received, and throws a McuMgrException if the request fails, or a McuMgrErrorException if the device responds with an error, that is with a non-zero return code. Cancelling the calling coroutine stops waiting for the response, but does not cancel the request, which has already been sent.

Use the manager to set a logger, the upload MTU, etc.

Constructors

Link copied to clipboard
constructor(manager: DefaultManager)
constructor(transport: McuMgrTransport)

Creates the manager using the given transport.

Properties

Link copied to clipboard

The manager of the Mcu Manager library, which sends the requests.

Functions

Link copied to clipboard
suspend fun appInfo(format: String? = null): McuMgrAppInfoResponse

Reads the application info.

Link copied to clipboard

Reads the bootloader info.

Link copied to clipboard

Enables or disables the console echo on the device.

Link copied to clipboard
suspend fun echo(echo: String?): McuMgrEchoResponse

Sends an echo request. The device responds with the same string.

Link copied to clipboard

Reads the statistics of the memory pools of the device.

Link copied to clipboard

Reads the parameters of Mcu Manager on the device, such as the buffer size and count.

Link copied to clipboard

Reads the date and time on the device.

Link copied to clipboard
suspend fun reset(): McuMgrOsResponse

Resets the device.

suspend fun reset(bootMode: Int, force: Boolean): McuMgrOsResponse

Resets the device in the given boot mode.

Link copied to clipboard

Reads the statistics of the tasks (threads) running on the device.

Link copied to clipboard
suspend fun writeDateTime(date: Date? = null, timeZone: TimeZone? = null): McuMgrOsResponse

Sets the date and time on the device.