Dela via


GattDeviceService.GetCharacteristics(Guid) Method

Definition

Returns a vector of characteristics, that are identified by the specified UUID and belong to this GattDeviceService instance.

Important

The GetCharacteristics API is deprecated, and it may not be available in future versions of Windows. Instead, use GetCharacteristicsForUuidAsync.

public:
 virtual IVectorView<GattCharacteristic ^> ^ GetCharacteristics(Platform::Guid characteristicUuid) = GetCharacteristics;
IVectorView<GattCharacteristic> GetCharacteristics(winrt::guid const& characteristicUuid);
/// [Windows.Foundation.Metadata.Deprecated("Use GetCharacteristicsForUuidAsync instead of GetCharacteristics.  For more information, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 262144, "Windows.Foundation.UniversalApiContract")]
IVectorView<GattCharacteristic> GetCharacteristics(winrt::guid const& characteristicUuid);
public IReadOnlyList<GattCharacteristic> GetCharacteristics(Guid characteristicUuid);
[Windows.Foundation.Metadata.Deprecated("Use GetCharacteristicsForUuidAsync instead of GetCharacteristics.  For more information, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 262144, "Windows.Foundation.UniversalApiContract")]
public IReadOnlyList<GattCharacteristic> GetCharacteristics(Guid characteristicUuid);
function getCharacteristics(characteristicUuid)
Public Function GetCharacteristics (characteristicUuid As Guid) As IReadOnlyList(Of GattCharacteristic)

Parameters

characteristicUuid
Guid

Platform::Guid

winrt::guid

The UUID for the characteristics to be retrieved.

Returns

A vector of GattCharacteristic objects whose UUIDs match characteristicUuid.

Attributes

Windows requirements

App capabilities
bluetooth

Remarks

Only a single app can access a single service. If one app has registered a GATT notification trigger, this method will throw an exception for all other apps that sub subsequently call this API.

Applies to