ServiceRepository
Interface for managing background service state, connection status, and mesh events.
This repository acts as the primary data bridge between the long-running mesh service and the UI/Feature layers. It maintains reactive flows for connection status, error messages, and incoming mesh traffic.
Connection state contract: connectionState is the canonical, app-level connection state that all UI, feature modules, and ViewModels should observe. It incorporates handshake progress, light-sleep policy, and transport reconciliation — unlike RadioInterfaceService.connectionState, which only reflects the raw hardware link status. The MeshConnectionManager is the sole writer of this state; it bridges RadioInterfaceService.connectionState changes into app-level transitions via setConnectionState.
See also
Properties
Reactive flow of high-level client notifications.
Convenience view of monotonic departures and completed handshakes. Use connectionLifecycle when the counters must be correlated with a specific state, because independent StateFlow collections can observe different versions.
Atomically correlated canonical state and lifecycle evidence.
Reactive flow of connection progress messages.
Canonical app-level connection state.
Reactive flow of human-readable error messages.
Reactive flow of the current lockdown authentication state.
Reactive flow of the most recent lockdown session token info.
Flow of all raw MeshPacket objects received from the mesh.
Reactive flow of the most recent neighbor info response (formatted string).
True once the passphrase was accepted for the current BLE connection.
Reactive flow of the most recent traceroute result.
Functions
Clears the current client notification.
Clears the current error message.
Resets lockdown state to LockdownState.None.
Clears the current neighbor info response.
Clears the current traceroute response.
Emits a mesh packet into the flow.
Sets the current client notification.
Sets the connection progress message.
Updates the canonical app-level connection state.
Sets an error message to be displayed.
Updates the lockdown state.
Sets the lockdown token info from a successful UNLOCKED status.
Sets the neighbor info response.
Updates the session authorization flag.
Sets the traceroute response.