SettingsManager

Config command group manager.

Constructors

Link copied to clipboard
constructor(@NotNull transport: @NotNull McuMgrTransport)
Construct an config manager.

Types

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
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.
Link copied to clipboard
@NotNull
open fun commit(): @NotNull McuMgrResponse
Commit settings command allows committing all settings that have been set but not yet applied on a device (synchronous).
open fun commit(@NotNull callback: @NotNull McuMgrCallback<McuMgrResponse>)
Commit settings command allows committing all settings that have been set but not yet applied on a device.
Link copied to clipboard
@NotNull
open fun dateToString(@Nullable date: @Nullable Date, @Nullable timeZone: @Nullable TimeZone): @NotNull String
Format a Date and a TimeZone into a String which McuManager will accept.
Link copied to clipboard
@NotNull
open fun delete(@NotNull name: @NotNull String): @NotNull McuMgrResponse
Delete setting command allows deleting a setting on a device (synchronous).
open fun delete(@NotNull name: @NotNull String, @NotNull callback: @NotNull McuMgrCallback<McuMgrResponse>)
Delete setting command allows deleting a setting on a device.
Link copied to clipboard
open fun getGroupId(): Int
Get the group ID for this manager.
Link copied to clipboard
open fun getMtu(): Int
Returns the upload MTU.
Link copied to clipboard
@NotNull
open fun getScheme(): @NotNull McuMgrScheme
Get the transporter's scheme.
Link copied to clipboard
@NotNull
open fun getTransporter(): @NotNull McuMgrTransport
Get the transporter.
Link copied to clipboard
@NotNull
open fun load(): @NotNull McuMgrResponse
Load settings command allows loading all serialized items from persistent storage on a device (synchronous).
open fun load(@NotNull callback: @NotNull McuMgrCallback<McuMgrResponse>)
Load settings command allows loading all serialized items from persistent storage on a device.
Link copied to clipboard
@NotNull
open fun read(@NotNull name: @NotNull String): @NotNull McuMgrSettingsReadResponse
@NotNull
open fun read(@NotNull name: @NotNull String, @Nullable maxSize: @Nullable Integer): @NotNull McuMgrSettingsReadResponse
Read a config variable (synchronous).
open fun read(@NotNull name: @NotNull String, @NotNull callback: @NotNull McuMgrCallback<McuMgrSettingsReadResponse>)
open fun read(@NotNull name: @NotNull String, @Nullable maxSize: @Nullable Integer, @NotNull callback: @NotNull McuMgrCallback<McuMgrSettingsReadResponse>)
Read a config variable (asynchronous).
Link copied to clipboard
@NotNull
open fun save(): @NotNull McuMgrResponse
Save settings command allows saving all serialized items to persistent storage on a device (synchronous).
open fun save(@NotNull callback: @NotNull McuMgrCallback<McuMgrResponse>)
Save settings command allows saving all serialized items to persistent storage on a device.
Link copied to clipboard
@NotNull
open fun <T : McuMgrResponse?> send(data: @NotNull Array<Byte>, @NotNull respType: @NotNull Class<T>): @NotNull T
@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.
open fun <T : McuMgrResponse?> send(data: @NotNull Array<Byte>, @NotNull respType: @NotNull Class<T>, @NotNull callback: @NotNull McuMgrCallback<T>)
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.
@NotNull
open fun <T : McuMgrResponse?> send(op: Int, commandId: Int, @Nullable payloadMap: @Nullable Map<String, Any>, @NotNull respType: @NotNull Class<T>): @NotNull T
@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
@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
@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.
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>)
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>)
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>)
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.
Link copied to clipboard
open fun setUploadMtu(mtu: Int): Boolean
Sets the upload MTU.
Link copied to clipboard
@Nullable
open fun stringToDate(@Nullable dateString: @Nullable String): @Nullable Date
Parse a date string returned by a McuMgr response.
Link copied to clipboard
@NotNull
open fun write(@Nullable name: @Nullable String, value: @NotNull Array<Byte>): @NotNull McuMgrResponse
Write a value to a config variable (synchronous).
open fun write(@NotNull name: @NotNull String, value: @NotNull Array<Byte>, @NotNull callback: @NotNull McuMgrCallback<McuMgrResponse>)
Write a value to a config variable (asynchronous).