Interface IBluetoothCharacteristicAccessor
- Namespace
- Bluetooth.Abstractions.Scanning.Profiles
- Assembly
- Bluetooth.Abstractions.Scanning.dll
Defines base behavior for resolving a specific remote Bluetooth characteristic on a device.
public interface IBluetoothCharacteristicAccessor
Properties
CharacteristicId
Gets the UUID of the target characteristic.
Guid CharacteristicId { get; }
Property Value
CharacteristicName
Gets the known characteristic name, if available.
string CharacteristicName { get; }
Property Value
ServiceId
Gets the UUID of the service that owns the target characteristic.
Guid ServiceId { get; }
Property Value
ServiceName
Gets the known service name, if available.
string ServiceName { get; }
Property Value
Methods
ResolveCharacteristicAsync(IBluetoothRemoteDevice, TimeSpan?, CancellationToken)
Resolves the remote characteristic on the specified device.
ValueTask<IBluetoothRemoteCharacteristic> ResolveCharacteristicAsync(IBluetoothRemoteDevice device, TimeSpan? timeout = null, CancellationToken cancellationToken = default)
Parameters
deviceIBluetoothRemoteDeviceThe connected remote device that owns the characteristic.
timeoutTimeSpan?Optional timeout for exploration operations.
cancellationTokenCancellationTokenToken used to cancel the operation.
Returns
- ValueTask<IBluetoothRemoteCharacteristic>
The resolved remote characteristic.
Exceptions
- ArgumentNullException
Thrown when
deviceis null.- CharacteristicAccessorResolutionException
Thrown when the service or characteristic cannot be resolved.