FakeBleService
Properties
Link copied to clipboard
Characteristic-specific observe failures that occur before BleService.observe's onSubscription callback.
Link copied to clipboard
When non-null, observe returns a flow that immediately throws. Reset to null when observe() is called (before flow collection).
Link copied to clipboard
Characteristic-specific observe failures that occur when the returned flow is collected.
Link copied to clipboard
Characteristics whose 2-arg observe never invokes onSubscription. Notifications can still be emitted.
Link copied to clipboard
When non-null, read throws this exception instead of returning data. Reset to null before throwing (in the same call).
Link copied to clipboard
When non-null, write throws this exception on every call until explicitly cleared.
Link copied to clipboard
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun observe(characteristic: BleCharacteristic, onSubscription: suspend () -> Unit): Flow<ByteArray>
Overrides the 2-arg observe to prevent false subscriptionReady when testing pre-readiness failures.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open suspend override fun write(characteristic: BleCharacteristic, data: ByteArray, writeType: BleWriteType)