exec

open fun exec(@NotNull cmd: @NotNull String, @Nullable argv: Array<@Nullable String>, @NotNull callback: @NotNull McuMgrCallback<McuMgrExecResponse>)

The command allows to execute command line in a similar way to typing it into a shell, but both a request and a response are transported with use of SMP (asynchronous).

Parameters

cmd

the command to be executed.

argv

an array consisting arguments of the command.

callback

the asynchronous callback.


open fun exec(@NotNull cmd: @NotNull String, @Nullable argv: Array<@Nullable String>, timeout: Long, @NotNull callback: @NotNull McuMgrCallback<McuMgrExecResponse>)

The command allows to execute command line in a similar way to typing it into a shell, but both a request and a response are transported with use of SMP (asynchronous).

Parameters

cmd

the command to be executed.

argv

an array consisting arguments of the command.

timeout

the operation timeout in milliseconds.

callback

the asynchronous callback.


@NotNull
open fun exec(@NotNull cmd: @NotNull String, @Nullable argv: Array<@Nullable String>): @NotNull McuMgrExecResponse
@NotNull
open fun exec(@NotNull cmd: @NotNull String, @Nullable argv: Array<@Nullable String>, timeout: Long): @NotNull McuMgrExecResponse

The command allows to execute command line in a similar way to typing it into a shell, but both a request and a response are transported with use of SMP (synchronous).

Return

The response.

Parameters

cmd

the command to be executed.

argv

an array consisting arguments of the command.

Throws