GattServiceSpec

data class GattServiceSpec(val uuid: UUID, val version: Int = 1, val requiredCharacteristicUUIDs: Set<UUID> = emptySet(), val excludedCharacteristicUUIDs: Set<UUID> = emptySet())(source)

Specifies a single GATT service requirement within a GattSignature.

A service spec matches when:

  • The service UUID is present in the discovered GATT services.

  • All requiredCharacteristicUUIDs are present as characteristics of that service.

  • None of the excludedCharacteristicUUIDs are present as characteristics of that service.

Parameters

uuid

The service UUID that must be present.

requiredCharacteristicUUIDs

Characteristic UUIDs that must ALL be present in the service.

excludedCharacteristicUUIDs

Characteristic UUIDs that must NOT be present in the service.

Constructors

Link copied to clipboard
constructor(uuid: UUID, version: Int = 1, requiredCharacteristicUUIDs: Set<UUID> = emptySet(), excludedCharacteristicUUIDs: Set<UUID> = emptySet())

Properties

Link copied to clipboard
val uuid: UUID
Link copied to clipboard