LinkEnvironmentObserver
class LinkEnvironmentObserver(bluetoothRepository: BluetoothRepository, networkRepository: NetworkRepository, serialDevicePresence: SerialDevicePresence, radioOperationLock: RadioOperationLock, processLifecycle: Lifecycle)(source)
Watches what ends a client's reconnect wait and what takes the port, and reports both to the link supervisor.
Constructors
Link copied to clipboard
constructor(bluetoothRepository: BluetoothRepository, networkRepository: NetworkRepository, serialDevicePresence: SerialDevicePresence, radioOperationLock: RadioOperationLock, processLifecycle: Lifecycle)
Functions
Link copied to clipboard
fun start(selectedAddress: Flow<String?>, onRecovered: () -> Unit, onTransportSuppressed: suspend (Boolean) -> Unit)
Starts once. onRecovered runs when Bluetooth, the network or the selected USB device comes back; onTransportSuppressed runs with true when a firmware-maintenance operation takes the port and false when it ends.