MockServerAPI

class MockServerAPI(mockEngine: MockEngine, serverDevice: MockServerDevice, bufferSize: Int) : GattServerAPI

A class for communication with MockEngine. It allows for sending responses to connected client devices.

Parameters

bufferSize

A buffer size for events.

Constructors

Link copied to clipboard
constructor(mockEngine: MockEngine, serverDevice: MockServerDevice, bufferSize: Int)

Properties

Link copied to clipboard
open override val event: SharedFlow<ServerGattEvent>

Functions

Link copied to clipboard
open override fun cancelConnection(device: ClientDevice)
Link copied to clipboard
open override fun close()
Link copied to clipboard
open override fun connect(device: ClientDevice, autoConnect: Boolean)
Link copied to clipboard
open override fun notifyCharacteristicChanged(device: ClientDevice, characteristic: IBluetoothGattCharacteristic, confirm: Boolean, value: DataByteArray)
Link copied to clipboard
open override fun onEvent(event: ServerGattEvent)
Link copied to clipboard
open override fun readPhy(device: ClientDevice)
Link copied to clipboard
open override fun requestPhy(device: ClientDevice, txPhy: BleGattPhy, rxPhy: BleGattPhy, phyOption: PhyOption)
Link copied to clipboard
open override fun sendResponse(device: ClientDevice, requestId: Int, status: Int, offset: Int, value: DataByteArray?)