MeshLogRepository

Repository interface for managing and retrieving logs from the database.

This component provides access to the application's message log, telemetry history, and debug records. It supports reactive queries for packets, telemetry data, and node-specific logs.

This interface is shared across platforms via Kotlin Multiplatform (KMP).

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract suspend fun deleteAll()

Clears all logs from the database.

Link copied to clipboard
abstract suspend fun deleteLog(uuid: String)

Deletes a specific log entry by its uuid.

Link copied to clipboard
abstract suspend fun deleteLogs(nodeNum: Int, portNum: Int)

Deletes all logs associated with a specific nodeNum and portNum.

Link copied to clipboard
abstract suspend fun deleteLogsOlderThan(retentionDays: Int)

Prunes the log database based on the configured retentionDays.

Link copied to clipboard
abstract fun getAllLogs(maxItem: Int = DEFAULT_MAX_LOGS): ERROR CLASS: Symbol not found for Flow<kotlin/collections/List<ERROR CLASS: Symbol not found for MeshLog>>

Retrieves all MeshLogs in the database, up to maxItem.

Link copied to clipboard
abstract fun getAllLogsInReceiveOrder(maxItem: Int = DEFAULT_MAX_LOGS): ERROR CLASS: Symbol not found for Flow<kotlin/collections/List<ERROR CLASS: Symbol not found for MeshLog>>

Retrieves all MeshLogs in the database in the order they were received.

Link copied to clipboard
abstract fun getAllLogsUnbounded(): ERROR CLASS: Symbol not found for Flow<kotlin/collections/List<ERROR CLASS: Symbol not found for MeshLog>>

Retrieves all MeshLogs in the database without any limit.

Link copied to clipboard
abstract fun getLogsFrom(nodeNum: Int, portNum: Int): ERROR CLASS: Symbol not found for Flow<kotlin/collections/List<ERROR CLASS: Symbol not found for MeshLog>>

Retrieves all MeshLogs associated with a specific nodeNum and portNum.

Link copied to clipboard
abstract fun getMeshPacketsFrom(nodeNum: Int, portNum: Int = -1): ERROR CLASS: Symbol not found for Flow<kotlin/collections/List<ERROR CLASS: Symbol not found for MeshPacket>>

Retrieves all MeshLogs containing MeshPackets for a specific nodeNum.

Link copied to clipboard
abstract fun getMyNodeInfo(): ERROR CLASS: Symbol not found for Flow<ERROR CLASS: Symbol not found for MyNodeInfo?>

Returns the cached MyNodeInfo from the system logs.

Link copied to clipboard
abstract fun getRequestLogs(targetNodeNum: Int, portNum: ERROR CLASS: Symbol not found for PortNum): ERROR CLASS: Symbol not found for Flow<kotlin/collections/List<ERROR CLASS: Symbol not found for MeshLog>>

Retrieves all outgoing request logs for a specific targetNodeNum and portNum.

Link copied to clipboard
abstract fun getTelemetryFrom(nodeNum: Int): ERROR CLASS: Symbol not found for Flow<kotlin/collections/List<ERROR CLASS: Symbol not found for Telemetry>>

Retrieves telemetry history for a specific node, automatically handling local node redirection.

Link copied to clipboard
abstract suspend fun insert(log: ERROR CLASS: Symbol not found for MeshLog)

Persists a new log entry to the database.