MockBluetoothGattDescriptor

data class MockBluetoothGattDescriptor(val uuid: UUID, val permissions: Int, val characteristic: IBluetoothGattCharacteristic, var value: DataByteArray = DataByteArray()) : IBluetoothGattDescriptor

Mock variant of the descriptor. It's special feature is that it is independent from Android dependencies and can be used for unit testing.

Circular dependency between characteristic and descriptor results in custom equals, hashCode and toString implementations.

Constructors

Link copied to clipboard
constructor(uuid: UUID, permissions: Int, characteristic: IBluetoothGattCharacteristic, value: DataByteArray = DataByteArray())

Properties

Link copied to clipboard

Parent characteristic of this descriptor. There is a circular dependency between a characteristic and a descriptor which makes usage of an underline data classes tricky.

Link copied to clipboard
open override val permissions: Int

Not parsed permissions of a descriptor as Int.

Link copied to clipboard
open override val uuid: UUID

UUID of a descriptor.

Link copied to clipboard
open override var value: DataByteArray

ByteArray value of this descriptor.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String