Class DotNetCoreBluetoothRemoteDescriptor
- Namespace
- Bluetooth.Maui.Platforms.DotNetCore.Scanning
- Assembly
- Bluetooth.Maui.Platforms.DotNetCore.dll
Interface representing a Bluetooth descriptor, providing properties and methods for interacting with it. Descriptors provide additional information about a characteristic (e.g., Client Characteristic Configuration Descriptor).
public class DotNetCoreBluetoothRemoteDescriptor : BaseBluetoothRemoteDescriptor, IBluetoothRemoteDescriptor, INotifyPropertyChanged, IAsyncDisposable
- Inheritance
-
DotNetCoreBluetoothRemoteDescriptor
- Implements
- Inherited Members
Constructors
DotNetCoreBluetoothRemoteDescriptor(IBluetoothRemoteCharacteristic, Guid, IBluetoothNameProvider?, ILogger<IBluetoothRemoteDescriptor>?)
Initializes a new instance of the BaseBluetoothRemoteDescriptor class.
public DotNetCoreBluetoothRemoteDescriptor(IBluetoothRemoteCharacteristic parentCharacteristic, Guid id, IBluetoothNameProvider? nameProvider = null, ILogger<IBluetoothRemoteDescriptor>? logger = null)
Parameters
parentCharacteristicIBluetoothRemoteCharacteristicThe Bluetooth characteristic associated with this descriptor.
idGuidThe unique identifier (UUID) of the descriptor.
nameProviderIBluetoothNameProviderAn optional provider for descriptor names, used to resolve the name based on the ID.
loggerILogger<IBluetoothRemoteDescriptor>The logger instance to use for logging (optional).
Exceptions
- ArgumentNullException
Thrown when
parentCharacteristicis null.- PlatformNotSupportedException
Methods
NativeCanRead()
Platform-specific implementation to determine if the descriptor can be read.
protected override bool NativeCanRead()
Returns
Exceptions
NativeCanWrite()
Platform-specific implementation to determine if the descriptor can be written.
protected override bool NativeCanWrite()
Returns
Exceptions
NativeReadValueAsync()
Platform-specific implementation to read the descriptor's value.
protected override ValueTask NativeReadValueAsync()
Returns
Exceptions
NativeWriteValueAsync(ReadOnlyMemory<byte>)
Platform-specific implementation to write the descriptor's value.
protected override ValueTask NativeWriteValueAsync(ReadOnlyMemory<byte> value)
Parameters
valueReadOnlyMemory<byte>