GattDeviceService.GetCharacteristics(Guid) 方法

定義

傳回由指定 UUID 識別並屬於這個 GattDeviceService 實例的特性向量。

重要

GetCharacteristics API 已被取代,未來版本的 Windows 可能無法使用。 請改用 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)

參數

characteristicUuid
Guid

Platform::Guid

winrt::guid

要擷取之特性的 UUID。

傳回

GattCharacteristic 物件的向量,其 UUID 符合特性Uuid。

屬性

Windows 需求

應用程式功能
bluetooth

備註

只有單一應用程式可以存取單一服務。 如果某個應用程式已註冊 GATT 通知觸發程式,此方法將會針對後續呼叫此 API 的所有其他應用程式擲回例外狀況。

適用於