MockDescriptor
class MockDescriptor(descriptorWrapper: RemoteDescriptorWrapper, emitNewAction: (DeviceConnectionManager.Event.AddAction) -> Unit) : RemoteDescriptor
Mock implementation of RemoteDescriptor
Constructors
Link copied to clipboard
constructor(descriptorWrapper: RemoteDescriptorWrapper, emitNewAction: (DeviceConnectionManager.Event.AddAction) -> Unit)
Functions
Link copied to clipboard
suspend fun <T> read(deserializationStrategy: DeserializationStrategy<T>, bluetoothFormat: BluetoothFormat): T
Link copied to clipboard
suspend fun <T> readOrNull(deserializationStrategy: DeserializationStrategy<T>, bluetoothFormat: BluetoothFormat): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> startWrite(bluetoothFormat: BluetoothFormat, newValue: T): DeviceAction.Write.Descriptor
fun <T> startWrite(serializationStrategy: SerializationStrategy<T>, bluetoothFormat: BluetoothFormat, newValue: T): DeviceAction.Write.Descriptor
Link copied to clipboard
inline suspend fun <T> write(bluetoothFormat: BluetoothFormat, newValue: T): GattResponse.WriteResponse
suspend fun <T> write(serializationStrategy: SerializationStrategy<T>, bluetoothFormat: BluetoothFormat, newValue: T): GattResponse.WriteResponse