LogManager

open class LogManager : McuManager

Log command group manager.

Constructors

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

Types

Link copied to clipboard
open class State
Used to track of the state of a log and hold the collected entries.

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 clear(): @NotNull McuMgrResponse
Clear the logs on a device (synchronous).
open fun clear(@NotNull callback: @NotNull McuMgrCallback<McuMgrResponse>)
Clear the logs on a device (asynchronous).
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 getAll(): @NotNull Map<String, LogManager.State>
Get all log entries from all logs on the device (synchronous).
Link copied to clipboard
@NotNull
open fun getAllFromState(@NotNull state: @NotNull LogManager.State): @NotNull LogManager.State
Get logs from a state (synchronous).
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 levelList(): @NotNull McuMgrLevelListResponse
List the log levels on a device (synchronous).
open fun levelList(@NotNull callback: @NotNull McuMgrCallback<McuMgrLevelListResponse>)
List the log levels on a device (asynchronous).
Link copied to clipboard
@NotNull
open fun logsList(): @NotNull McuMgrLogListResponse
List the log names on a device (synchronous).
open fun logsList(@NotNull callback: @NotNull McuMgrCallback<McuMgrLogListResponse>)
List the log names on a device (asynchronous).
Link copied to clipboard
@NotNull
open fun moduleList(): @NotNull McuMgrModuleListResponse
List the log modules on a device (synchronous).
open fun moduleList(@NotNull callback: @NotNull McuMgrCallback<McuMgrModuleListResponse>)
List the log modules on a device (asynchronous).
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
@NotNull
open fun show(@Nullable logName: @Nullable String, @Nullable minIndex: @Nullable Long, @Nullable minTimestamp: @Nullable Date): @NotNull McuMgrLogResponse
Show logs from a device (synchronous).
open fun show(@Nullable logName: @Nullable String, @Nullable minIndex: @Nullable Long, @Nullable minTimestamp: @Nullable Date, @NotNull callback: @NotNull McuMgrCallback<McuMgrLogResponse>)
Show logs from a device (asynchronous).
Link copied to clipboard
@Nullable
open fun showNext(@NotNull state: @NotNull LogManager.State): @Nullable McuMgrLogResponse
Get the next set of logs from a log state and return the response (synchronous).
Link copied to clipboard
@Nullable
open fun stringToDate(@Nullable dateString: @Nullable String): @Nullable Date
Parse a date string returned by a McuMgr response.