buildPacket
open fun buildPacket(@NotNull scheme: @NotNull McuMgrScheme, op: Int, flags: Int, groupId: Int, sequenceNum: Int, commandId: Int, @Nullable payloadMap: @Nullable Map<String, Any>): @NotNull Array<Byte>
Build a Mcu Manager packet based on the transport scheme.
Return
The packet data.
Parameters
scheme
the transport scheme.
flags
additional flags.
groupId
group ID of the command.
sequenceNum
sequence number.
commandId
ID of the command in the group.
payloadMap
map of payload key-value pairs.
Throws
if the payload map could not be serialized into CBOR. See cause.