copyAndAddScanned

open override fun copyAndAddScanned(identifier: Identifier, createDevice: () -> Device): ScanningState.Devices

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

Return

the new instance of Devices where allDevices contains a Device for identifier and identifiersForCurrentScanFilter contains identifier

Parameters

identifier

the Identifier of the Device to add

createDevice

method for creating a Device for the identifier