GattDeviceService.GetDeviceSelectorFromShortId(UInt16) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
从 16 位蓝牙 GATT 服务 UUID 创建合适的 AQS 筛选器字符串以用于 CreateWatcher 方法。
重要
GetDeviceSelectorFromShortId API 已弃用,将来的 Windows 版本中可能不可用。 请改用 GetDeviceSelectorFromUuid。
public:
static Platform::String ^ GetDeviceSelectorFromShortId(unsigned short serviceShortId);
static winrt::hstring GetDeviceSelectorFromShortId(uint16_t const& serviceShortId);
/// [Windows.Foundation.Metadata.Deprecated("Use GetDeviceSelectorFromUuid instead of GetDeviceSelectorFromShortId. For more information, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 262144, "Windows.Foundation.UniversalApiContract")]
static winrt::hstring GetDeviceSelectorFromShortId(uint16_t const& serviceShortId);
public static string GetDeviceSelectorFromShortId(ushort serviceShortId);
[Windows.Foundation.Metadata.Deprecated("Use GetDeviceSelectorFromUuid instead of GetDeviceSelectorFromShortId. For more information, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 262144, "Windows.Foundation.UniversalApiContract")]
public static string GetDeviceSelectorFromShortId(ushort serviceShortId);
function getDeviceSelectorFromShortId(serviceShortId)
Public Shared Function GetDeviceSelectorFromShortId (serviceShortId As UShort) As String
参数
- serviceShortId
-
UInt16
unsigned short
uint16_t
16 位蓝牙 GATT 服务 UUID。
返回
合适的 AQS 选择器字符串,可作为参数传递给 CreateWatcher 方法,以便检索 GATT 服务实例路径
- 属性
Windows 要求
应用功能 |
bluetooth
|