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 selected radio's SDK ConnectionState, which all UI, feature modules, and ViewModels observe. RadioInterfaceService derives it from the SDK client's state, showing ConnectionState.Connected only once the app holds the session's config and nodes.
Properties
Reactive flow of high-level client notifications.
The selected radio's connection state, as its SDK client reports it: ConnectionState.Connecting and ConnectionState.Configuring while a session comes up, ConnectionState.Connected once the app has installed the session's snapshot, ConnectionState.Reconnecting and ConnectionState.DeviceSleeping while the client retries, ConnectionState.Failed once it stops, and ConnectionState.Disconnecting then ConnectionState.Disconnected when the user disconnects.
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).
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.
Publishes the connection state. Only the radio service writes it.
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.
Sets the traceroute response.