Package-level declarations

Types

Link copied to clipboard
class AndroidScannerViewModel(serviceRepository: ServiceRepository, radioController: RadioController, radioInterfaceService: RadioInterfaceService, radioPrefs: RadioPrefs, recentAddressesDataSource: RecentAddressesDataSource, getDiscoveredDevicesUseCase: GetDiscoveredDevicesUseCase, networkRepository: NetworkRepository, dispatchers: CoroutineDispatchers, bluetoothRepository: BluetoothRepository, usbRepository: UsbRepository, uiPrefs: UiPrefs, firmwareRecoveryDataSource: FirmwareRecoveryDataSource, bleScanner: BleScanner? = null) : ScannerViewModel
Link copied to clipboard
class JvmScannerViewModel(serviceRepository: ServiceRepository, radioController: RadioController, radioInterfaceService: RadioInterfaceService, radioPrefs: RadioPrefs, recentAddressesDataSource: RecentAddressesDataSource, getDiscoveredDevicesUseCase: GetDiscoveredDevicesUseCase, networkRepository: NetworkRepository, dispatchers: CoroutineDispatchers, uiPrefs: UiPrefs, firmwareRecoveryDataSource: FirmwareRecoveryDataSource, bleScanner: BleScanner? = null) : ScannerViewModel

Desktop/JVM ScannerViewModel registration.

Link copied to clipboard

Starts, switches and stops the Live Update from the Connections screen.

Link copied to clipboard
open class ScannerViewModel(serviceRepository: ServiceRepository, radioController: RadioController, radioInterfaceService: RadioInterfaceService, radioPrefs: RadioPrefs, recentAddressesDataSource: RecentAddressesDataSource, getDiscoveredDevicesUseCase: GetDiscoveredDevicesUseCase, networkRepository: NetworkRepository, dispatchers: CoroutineDispatchers, uiPrefs: UiPrefs, firmwareRecoveryDataSource: FirmwareRecoveryDataSource, bleScanner: BleScanner? = null, val bluetoothSupported: Boolean = true, val usbSupported: Boolean = true) : ViewModel

Platform-neutral ViewModel that drives the Connections screen: device discovery (BLE/USB/TCP), scan state, current selection, and connection-progress chatter.

Properties

Link copied to clipboard

One-char prefix marking a BLE device's fullAddress. See DeviceListEntry.Ble.

Link copied to clipboard

Sentinel value for "no device selected" that mirrors the one-char prefix used by every real org.meshtastic.feature.connections.model.DeviceListEntry's fullAddress. Persisted by radioInterfaceService so the UI layer can distinguish "user explicitly disconnected" from "first launch".

Link copied to clipboard

One-char prefix marking a TCP/Network device's fullAddress. See DeviceListEntry.Tcp.

Functions

Link copied to clipboard
fun blePairingPinFor(address: String?, pin: String?): String?

The pairing PIN a link supplies for address, or null when it is missing, is not six digits from 100000 to 999999 (the range firmware draws passkeys from; a leading zero can never match its numeric PIN), or address is not a BLE device, so the link falls back to pairing by hand.

Link copied to clipboard
fun filterLiveUpdateCandidates(candidates: List<Node>, query: String): List<Node>

candidates whose long name, display name, short name or node id contains query, ignoring case.

Link copied to clipboard
fun isLinkableAddress(address: String, virtualAllowed: Boolean = true): Boolean

Whether a deep link's address names a transport this app knows, in a form it can connect to. A link that fails this opens the Connections screen without asking to connect. Demo addresses link only while virtualAllowed, so a link cannot drop a real radio for a demo transport that would then refuse to start.

Link copied to clipboard
fun liveUpdateCandidates(nodes: Collection<Node>, ourNodeNum: Int?): List<Node>

Every node but our own and ignored ones: favorites first, then the most recently heard.