MeshEvent

sealed interface MeshEvent(source)

Side-channel event from the SDK engine.

These are non-packet events: queue status updates, errors, key-verification prompts, etc. Emitted via RadioClient.events alongside RadioClient.packets and RadioClient.nodes.

Since

0.1.0

Inheritors

Types

Link copied to clipboard
data class DeviceRebooted(val reason: String = "device reported reboot") : MeshEvent

Device reported FromRadio.rebooted = true — the radio restarted mid-session (crash, intentional reboot via admin, firmware update, or brownout). The engine treats this as a forced disconnect: pending sends fail, handshake state resets, and ConnectionState transitions to Disconnected. Higher-level reconnect policy (if any) then restarts the session from scratch.

Link copied to clipboard
data class IdentityRebound(val previousNodeNum: NodeId, val newNodeNum: NodeId, val reason: String = "device factory reset or identity change") : MeshEvent

The connected device reported a different NodeNum than the one previously persisted for this transport identity (e.g. factory reset, radio swap, or hostname re-pointed at a different physical radio).

Link copied to clipboard

Key verification prompt (e.g., "confirm the radio's public key").

Link copied to clipboard
data class Notification(val notification: ClientNotification) : MeshEvent

Device emitted a notification.

Link copied to clipboard
data class PacketsDropped(val flow: DroppedFlow, val count: Int) : MeshEvent

A flow dropped messages due to subscriber backpressure.

Link copied to clipboard
data class ProtocolWarning(val message: String, val details: Map<String, Any?> = emptyMap()) : MeshEvent

Protocol-level warning (malformed data, unexpected state, etc.).

Link copied to clipboard
data class QueueStatusChanged(val status: QueueStatus) : MeshEvent

Device's transmit queue status changed.

Link copied to clipboard
sealed interface SecurityWarning : MeshEvent

Security-relevant warning from the device, surfaced as typed sub-variants so that hosts can react without string-parsing. These arrive from org.meshtastic.proto.ClientNotification but the engine also still re-emits the raw Notification for callers that want the underlying wire payload.

Link copied to clipboard
data class StorageDegraded(val reason: String) : MeshEvent

Storage backend reported a persistent I/O failure (disk full, permission denied, locked database, etc.) and the engine has dropped into degraded mode. Subsequent storage writes are skipped for the remainder of the session; in-memory state continues to flow on RadioClient.packets, RadioClient.nodes, and RadioClient.events so the user-visible session is preserved, but nothing is written to disk until the next RadioClient.connect.

Link copied to clipboard

A transport-level error occurred.