BTScanModel

class BTScanModel @Inject constructor(application: Application, serviceRepository: ServiceRepository, bluetoothRepository: BluetoothRepository, usbRepository: UsbRepository, usbManagerLazy: Lazy<UsbManager>, networkRepository: NetworkRepository, radioInterfaceService: RadioInterfaceService, recentAddressesDataSource: RecentAddressesDataSource) : ViewModel(source)

Constructors

Link copied to clipboard
@Inject
constructor(application: Application, serviceRepository: ServiceRepository, bluetoothRepository: BluetoothRepository, usbRepository: UsbRepository, usbManagerLazy: Lazy<UsbManager>, networkRepository: NetworkRepository, radioInterfaceService: RadioInterfaceService, recentAddressesDataSource: RecentAddressesDataSource)

Properties

Link copied to clipboard

A combined list of bonded and scanned BLE devices for the UI.

Link copied to clipboard

UI StateFlow for discovered TCP devices.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

UI StateFlow for recently connected TCP devices that are not currently discovered.

Link copied to clipboard
val selectedAddressFlow: StateFlow<String?>
Link copied to clipboard
val selectedNotNullFlow: StateFlow<String>
Link copied to clipboard
val showMockInterface: StateFlow<Boolean>
Link copied to clipboard
val spinner: StateFlow<Boolean>
Link copied to clipboard

Functions

Link copied to clipboard
fun addRecentAddress(address: String, name: String)
Link copied to clipboard
Link copied to clipboard

Called by the GUI when a new device has been selected by the user.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun setErrorText(text: String)
Link copied to clipboard
fun startScan()
Link copied to clipboard
fun stopScan()