Scanning

An Enabled State indicating scanning is taking place

Types

Link copied to clipboard
data class DiscoveredDevice(val identifier: Identifier, val rssi: RSSI, val advertisementData: BaseAdvertisementData, val deviceCreator: () -> Device)

A class to add or update a Device using discoverDevices

Properties

Link copied to clipboard
abstract val deinitialize: suspend () -> ScanningState.Deinitialized

Transitions into a Deinitialized State

Link copied to clipboard

The Devices discovered

Link copied to clipboard
abstract val disable: suspend () -> ScanningState.NoBluetooth.Disabled

Transitions into a NoBluetooth.Disabled State

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
suspend fun ScanningState.Enabled.Scanning.discoverDevice(identifier: Identifier, rssi: RSSI, advertisementData: BaseAdvertisementData, deviceCreator: () -> Device): suspend () -> ScanningState.Enabled.Scanning

Transitions into a Scanning state where a Device is added or updated

Link copied to clipboard

Transitions into a Scanning state where a list of Device is added or updated

Link copied to clipboard
abstract fun pairedDevices(devices: Map<Identifier, () -> Device>, filter: Filter, removeForAllPairedFilters: Boolean): suspend () -> ScanningState.Enabled

Transitions into an Enabled state where a set of devices is paired

Link copied to clipboard
open fun <S : KalugaState> remain(): suspend () -> S
Link copied to clipboard
abstract suspend fun retrievePairedDevices(filter: Filter, removeForAllPairedFilters: Boolean, connectionSettings: ConnectionSettings?)

Starts to retrieve the list of paired Device

Link copied to clipboard
abstract fun stopScanning(cleanMode: BluetoothService.CleanMode = BluetoothService.CleanMode.REMOVE_ALL): suspend () -> ScanningState.Enabled.Idle

Transitions into an Idle State