Table of Contents

Interface IBluetoothLocalDescriptor

Namespace
Bluetooth.Abstractions.Broadcasting
Assembly
Bluetooth.Abstractions.Broadcasting.dll

Represents a descriptor in the context of Bluetooth broadcasting. Descriptors provide additional information about a characteristic.

public interface IBluetoothLocalDescriptor : INotifyPropertyChanged, IAsyncDisposable
Inherited Members

Properties

Characteristic

Gets the Bluetooth characteristic hosting this descriptor.

IBluetoothLocalCharacteristic Characteristic { get; }

Property Value

IBluetoothLocalCharacteristic

Id

Gets the unique identifier of the descriptor. This is typically a UUID that distinguishes this descriptor from others in the Bluetooth broadcasting context.

Guid Id { get; }

Property Value

Guid

Name

Gets the name of the descriptor.

string Name { get; }

Property Value

string

Value

Gets the value of the descriptor as a read-only memory segment. Useful for asynchronous operations.

ReadOnlyMemory<byte> Value { get; }

Property Value

ReadOnlyMemory<byte>

ValueSpan

Gets the value of the descriptor as a read-only span. Useful for high-performance scenarios.

ReadOnlySpan<byte> ValueSpan { get; }

Property Value

ReadOnlySpan<byte>

Methods

UpdateValueAsync(ReadOnlyMemory<byte>, TimeSpan?, CancellationToken)

Updates the value of a hosted descriptor.

ValueTask UpdateValueAsync(ReadOnlyMemory<byte> value, TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

value ReadOnlyMemory<byte>

The new value.

timeout TimeSpan?

The timeout for this operation

cancellationToken CancellationToken

A cancellation token to cancel this operation.

Returns

ValueTask

A task that represents the asynchronous operation.

Events

ReadRequested

Event raised when a client device requests to read this descriptor.

event EventHandler<DescriptorReadRequestEventArgs>? ReadRequested

Event Type

EventHandler<DescriptorReadRequestEventArgs>

WriteRequested

Event raised when a client device requests to write to this descriptor.

event EventHandler<DescriptorWriteRequestEventArgs>? WriteRequested

Event Type

EventHandler<DescriptorWriteRequestEventArgs>