MockDevice

class MockDevice(val identifier: Identifier = randomIdentifier(), val info: MutableStateFlow<MockDeviceInfo> = MutableStateFlow(MockDeviceInfo()), connectionSettings: ConnectionSettings = ConnectionSettings(), coroutineContext: CoroutineContext, setupMocks: Boolean = true) : Device

Constructors

Link copied to clipboard
constructor(identifier: Identifier = randomIdentifier(), info: MutableStateFlow<MockDeviceInfo> = MutableStateFlow(MockDeviceInfo()), connectionSettings: ConnectionSettings = ConnectionSettings(), coroutineContext: CoroutineContext, setupMocks: Boolean = true)

Properties

Link copied to clipboard
open override val identifier: Identifier
Link copied to clipboard
open override val info: MutableStateFlow<MockDeviceInfo>
Link copied to clipboard
open override val state: Flow<DeviceState>

Functions

Link copied to clipboard
fun addAction(action: DeviceAction)
Link copied to clipboard
open override fun advertisementDataDidUpdate(advertisementData: BaseAdvertisementData)
Link copied to clipboard
Link copied to clipboard
open suspend fun connect(reconnectionSettings: ConnectionSettings.ReconnectionSettings?): Boolean
Link copied to clipboard
open suspend fun disconnect()
Link copied to clipboard
Link copied to clipboard
open override fun handleConnected()
Link copied to clipboard
Link copied to clipboard
open override fun handleDisconnected()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun rssiDidUpdate(rssi: RSSI)