copyAndSetPaired

open override fun copyAndSetPaired(devices: Map<Identifier, () -> Device>, filter: Filter, removeForAllPairedFilters: Boolean): ScanningState.Devices

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

Return

the new instance of Devices where allDevices contains a Device for all Identifier in devices and identifiersFoundForDeviceDiscoveryMode will contains all Identifier in devices for a DeviceDiscoveryMode.Paired with filter

Parameters

devices

map of all the Identifier paired and a method for creating the corresponding Device

filter

a Filter applied for acquiring the scanned devices

removeForAllPairedFilters

if true the list of paired devices for all filters will be emptied