MockBluetoothGattCharacteristic

Mock variant of the characteristic. 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 and hashCode implementations.

Constructors

Link copied to clipboard
constructor(uuid: UUID, permissions: Int, properties: Int, value: DataByteArray)

Properties

Link copied to clipboard

List of descriptors of this characteristic.

Link copied to clipboard
open override val instanceId: Int

Instance id of a characteristic.

Link copied to clipboard
open override val permissions: Int

Not parsed permissions of a characteristic as Int.

Link copied to clipboard
open override val properties: Int

Not parsed properties of a characteristic as Int.

Link copied to clipboard
open override val uuid: UUID

UUID of a characteristic.

Link copied to clipboard
open override var value: DataByteArray

ByteArray value of this characteristic.

Link copied to clipboard
open override var writeType: Int

Not parsed write type of a characteristic.

Functions

Link copied to clipboard

Adds descriptor to this characteristic. It can't be passed in the constructor, because an instance of a characteristics needs to be passed to descriptor.

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