send

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>)

Send an asynchronous Mcu Manager command.

Additionally builds the Mcu Manager header and formats the packet based on scheme before sending it to the transporter.

Parameters

op

the operation (OP_READ, OP_WRITE).

commandId

the ID of the command.

timeout

timeout for the request, by default DEFAULT_TIMEOUT ms.

payloadMap

the map of values to send along. This argument can be null if the header is the only required field.

respType

the response type.

callback

the response callback.

<T>

the response type.


@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

Send synchronous Mcu Manager command.

Additionally builds the Mcu Manager header and formats the packet based on scheme before sending it to the transporter.

Return

The McuMgrResponse or null if an error occurred.

Parameters

op

the operation (OP_READ, OP_WRITE).

commandId

the ID of the command.

timeout

timeout for the request, by default DEFAULT_TIMEOUT ms.

payloadMap

the map of values to send along. This argument can be null if the header is the only required field.

respType

the response type.

<T>

the response type.

Throws

on transport error. See exception cause for more info.


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.

Additionally builds the Mcu Manager header and formats the packet based on scheme before sending it to the transporter.

Parameters

op

the operation (OP_READ, OP_WRITE)

flags

additional flags.

sequenceNum

sequence number.

commandId

ID of the command in the group.

payloadMap

map of command's key-value pairs to construct a CBOR payload.

timeout

timeout for the request, by default DEFAULT_TIMEOUT ms.

respType

the response type.

callback

asynchronous callback.

<T>

the response type.


@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.

Additionally builds the Mcu Manager header and formats the packet based on scheme before sending it to the transporter.

Return

The Mcu Manager response.

Parameters

op

the operation (OP_READ, OP_WRITE).

flags

additional flags.

sequenceNum

sequence number.

commandId

ID of the command in the group.

payloadMap

map of payload key-value pairs.

timeout

timeout for the request, by default DEFAULT_TIMEOUT ms.

respType

the response type.

<T>

the response type.

Throws

on transport error. See exception cause for more info.


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.

Parameters

data

the data to send.

timeout

timeout for the request.

respType

the response type.

callback

the response callback.

<T>

the response type.


@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.

Return

The Mcu Manager response.

Parameters

data

the data to send.

timeout

timeout for the request.

respType

the response type.

<T>

the response type.

Throws

when an error occurs while sending the data.


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>)

Deprecated

Use send instead.

Send an asynchronous Mcu Manager command.

Additionally builds the Mcu Manager header and formats the packet based on scheme before sending it to the transporter.

Parameters

op

the operation (OP_READ, OP_WRITE).

commandId

the ID of the command.

payloadMap

the map of values to send along. This argument can be null if the header is the only required field.

respType

the response type.

callback

the response callback.

<T>

the response type.


@NotNull
open fun <T : McuMgrResponse?> send(op: Int, commandId: Int, @Nullable payloadMap: @Nullable Map<String, Any>, @NotNull respType: @NotNull Class<T>): @NotNull T

Deprecated

Use send instead.

Send synchronous Mcu Manager command.

Additionally builds the Mcu Manager header and formats the packet based on scheme before sending it to the transporter.

Return

The McuMgrResponse or null if an error occurred.

Parameters

op

the operation (OP_READ, OP_WRITE).

commandId

the ID of the command.

payloadMap

the map of values to send along. This argument can be null if the header is the only required field.

respType

the response type.

<T>

the response type.

Throws

on transport error. See exception cause for more info.


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>)

Deprecated

Use send instead.

Send an asynchronous Mcu Manager command.

Additionally builds the Mcu Manager header and formats the packet based on scheme before sending it to the transporter.

Parameters

op

the operation (OP_READ, OP_WRITE)

flags

additional flags.

sequenceNum

sequence number.

commandId

ID of the command in the group.

payloadMap

map of command's key-value pairs to construct a CBOR payload.

respType

the response type.

callback

asynchronous callback.

<T>

the response type.


@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

Deprecated

Use send instead.

Send synchronous Mcu Manager command.

Additionally builds the Mcu Manager header and formats the packet based on scheme before sending it to the transporter.

Return

The Mcu Manager response.

Parameters

op

the operation (OP_READ, OP_WRITE).

flags

additional flags.

sequenceNum

sequence number.

commandId

ID of the command in the group.

respType

the response type.

payloadMap

map of payload key-value pairs.

<T>

the response type.

Throws

on transport error. See exception cause for more info.


open fun <T : McuMgrResponse?> send(data: @NotNull Array<Byte>, @NotNull respType: @NotNull Class<T>, @NotNull callback: @NotNull McuMgrCallback<T>)

Deprecated

Use send instead.

Send data asynchronously using the transporter.

Parameters

data

the data to send.

respType

the response type.

callback

the response callback.

<T>

the response type.


@NotNull
open fun <T : McuMgrResponse?> send(data: @NotNull Array<Byte>, @NotNull respType: @NotNull Class<T>): @NotNull T

Deprecated

Use send instead.

Send data synchronously using the transporter.

Return

The Mcu Manager response.

Parameters

data

the data to send.

respType

the response type.

<T>

the response type.

Throws

when an error occurs while sending the data.