GattCharacteristic.ConvertShortIdToUuid(UInt16) 方法

定义

将蓝牙 SIG 定义的短 ID 转换为完整的 GATT UUID。

重要

ConvertShortIdToUuid API 已弃用,将来的 Windows 版本中可能不可用。 请改用 BluetoothUuidHelper.FromShortId

public:
 static Platform::Guid ConvertShortIdToUuid(unsigned short shortId);
 static winrt::guid ConvertShortIdToUuid(uint16_t const& shortId);
/// [Windows.Foundation.Metadata.Deprecated("Use BluetoothUuidHelper instead of ConvertShortIdToUuid.  For more information, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 262144, "Windows.Foundation.UniversalApiContract")]
 static winrt::guid ConvertShortIdToUuid(uint16_t const& shortId);
public static Guid ConvertShortIdToUuid(ushort shortId);
[Windows.Foundation.Metadata.Deprecated("Use BluetoothUuidHelper instead of ConvertShortIdToUuid.  For more information, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 262144, "Windows.Foundation.UniversalApiContract")]
public static Guid ConvertShortIdToUuid(ushort shortId);
function convertShortIdToUuid(shortId)
Public Shared Function ConvertShortIdToUuid (shortId As UShort) As Guid

参数

shortId
UInt16

unsigned short

uint16_t

16 位蓝牙 GATT 服务 UUID。

返回

Guid

Platform::Guid

winrt::guid

相应的 128 位 GATT 特征 UUID,用于唯一标识此特征。

属性

Windows 要求

应用功能
bluetooth

适用于