GattDeviceService.GetCharacteristics(Guid) 方法
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
傳回由指定 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。
- 屬性
應用程式功能 |
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 |