閱讀英文

共用方式為


GattDeviceService.GetCharacteristics(Guid) 方法

定義

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

重要

GetCharacteristics API 已被取代,未來版本的 Windows 可能無法使用。 請改用 GetCharacteristicsForUuidAsync

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);

參數

characteristicUuid
Guid

要擷取之特性的 UUID。

傳回

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

屬性

Windows 需求

應用程式功能
bluetooth

備註

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

適用於

產品 版本
WinRT Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100