DefaultDevices

data class DefaultDevices(val allDevices: Map<Identifier, ConnectableDevice>, val identifiersFoundForDeviceDiscoveryMode: Map<ScanningState.DeviceDiscoveryMode, Set<Identifier>>, val currentScanFilter: ScanningState.DeviceDiscoveryMode.Scanning) : ScanningState.Devices

Default implementation of ScanningState.Devices

Constructors

Link copied to clipboard
constructor(allDevices: Map<Identifier, ConnectableDevice>, identifiersFoundForDeviceDiscoveryMode: Map<ScanningState.DeviceDiscoveryMode, Set<Identifier>>, currentScanFilter: ScanningState.DeviceDiscoveryMode.Scanning)
constructor(filter: Filter)

Constructor

Properties

Link copied to clipboard

The map of ConnectableDevice found for given Identifier

Link copied to clipboard

Functions

Link copied to clipboard
open override fun copyAndAddScanned(identifier: Identifier, createDevice: () -> ConnectableDevice): ScanningState.Devices

Creates a new Devices instance that adds an Identifier to the currentScanFilter and creates the corresponding ConnectableDevice if not yet discovered

Link copied to clipboard
open override fun copyAndSetPaired(devices: Map<Identifier, () -> ConnectableDevice>, filter: Filter, removeForAllPairedFilters: Boolean): ScanningState.Devices

Creates a new Devices instance that sets the paired ConnectableDevice for a given Filter

Link copied to clipboard

Creates a new Devices instance that sets the currentScanFilter for a DeviceDiscoveryMode.Scanning with a given Filter