Espex.BluetoothProxy.Descriptor (espex v0.3.0)

Copy Markdown View Source

A GATT descriptor inside a Espex.BluetoothProxy.Characteristic.

Built by Espex.BluetoothProxy adapters and passed inside service trees during Espex.BluetoothProxy.gatt_get_services/1 streaming. Espex converts to the wire BluetoothGATTDescriptor at the send boundary.

UUID encoding

See Espex.BluetoothProxy.encode_uuid/1 for the rules — the :uuid field accepts either a 16-byte binary (full 128-bit) or a small non-negative integer (Bluetooth SIG short UUID).

Summary

Functions

Build a descriptor from keyword options.

Convert to the wire Proto.BluetoothGATTDescriptor.

Types

t()

@type t() :: %Espex.BluetoothProxy.Descriptor{
  handle: non_neg_integer(),
  uuid: Espex.BluetoothProxy.uuid()
}

Functions

new(opts)

@spec new(keyword()) :: t()

Build a descriptor from keyword options.

to_proto(descriptor)

@spec to_proto(t()) :: Espex.Proto.BluetoothGATTDescriptor.t()

Convert to the wire Proto.BluetoothGATTDescriptor.