BleMockGatt

class BleMockGatt(mockEngine: MockEngine, serverDevice: MockServerDevice, clientDevice: ClientDevice, val autoConnect: Boolean, val closeOnDisconnect: Boolean, bufferSize: Int, mutexWrapper: MutexWrapper) : GattClientAPI

A class for communication with MockEngine. It allows for connecting to mock servers registered locally on a device.

Constructors

Link copied to clipboard
constructor(mockEngine: MockEngine, serverDevice: MockServerDevice, clientDevice: ClientDevice, autoConnect: Boolean, closeOnDisconnect: Boolean, bufferSize: Int, mutexWrapper: MutexWrapper)

Properties

Link copied to clipboard
open override val autoConnect: Boolean

Boolean value passed during connection.

Link copied to clipboard
open override val closeOnDisconnect: Boolean
Link copied to clipboard
open override val device: ServerDevice
Link copied to clipboard
open override val event: SharedFlow<ClientGattEvent>

Functions

Link copied to clipboard
open override fun abortReliableWrite()
Link copied to clipboard
open override fun beginReliableWrite(): Boolean
Link copied to clipboard
open override fun clearServicesCache()
Link copied to clipboard
open override fun close()
Link copied to clipboard
open override fun disconnect()
Link copied to clipboard
open override fun discoverServices(): Boolean
Link copied to clipboard
Link copied to clipboard
open override fun executeReliableWrite(): Boolean
Link copied to clipboard
open override fun onEvent(event: ClientGattEvent)
Link copied to clipboard
open override fun readCharacteristic(characteristic: IBluetoothGattCharacteristic): Boolean
Link copied to clipboard
open override fun readDescriptor(descriptor: IBluetoothGattDescriptor): Boolean
Link copied to clipboard
open override fun readPhy()
Link copied to clipboard
open override fun readRemoteRssi(): Boolean
Link copied to clipboard
open override fun reconnect(): Boolean
Link copied to clipboard
Link copied to clipboard
open override fun requestMtu(@IntRange(from = 23, to = 517) mtu: Int): Boolean
Link copied to clipboard
open override fun setPreferredPhy(txPhy: BleGattPhy, rxPhy: BleGattPhy, phyOption: PhyOption)
Link copied to clipboard
open override fun writeCharacteristic(characteristic: IBluetoothGattCharacteristic, value: DataByteArray, writeType: BleWriteType): Boolean
Link copied to clipboard
open override fun writeDescriptor(descriptor: IBluetoothGattDescriptor, value: DataByteArray): Boolean