Share via


BluetoothLEAdvertisement 类

定义

蓝牙 LE 播发有效负载的表示形式。

public ref class BluetoothLEAdvertisement sealed
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class BluetoothLEAdvertisement final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class BluetoothLEAdvertisement final
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class BluetoothLEAdvertisement
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class BluetoothLEAdvertisement
function BluetoothLEAdvertisement()
Public NotInheritable Class BluetoothLEAdvertisement
继承
Object Platform::Object IInspectable BluetoothLEAdvertisement
属性

Windows 要求

设备系列
Windows 10 (在 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)
应用功能
bluetooth

注解

此类用于表示系统接收的播发、要筛选的播发模式或需要发布的播发有效负载。 如果系统生成它来表示收到的播发,则会自动填充某些属性。

有关其用法的详细信息,请参阅用于接收广告的 BluetoothLEAdvertisementWatcher 类和用于发送广告的 BluetoothLEAdvertisementPublisher 类。

构造函数

BluetoothLEAdvertisement()

创建新的 BluetoothLEAdvertisement 对象。

属性

DataSections

获取原始数据节的列表。

Flags

蓝牙 LE 广告标志。

LocalName

播发中包含的本地名称。

ManufacturerData

获取 BluetoothLEAdvertisement 中特定于制造商的数据部分的列表。

ServiceUuids

获取 bluetoothLEAdvertisement 中) 128 位 GUID 格式 (服务 UUID 的列表。

方法

GetManufacturerDataByCompanyId(UInt16)

返回 BluetoothLEAdvertisement 有效负载中与指定公司 ID 匹配的所有制造商数据部分的列表。

GetSectionsByType(Byte)

返回与 BluetoothLEAdvertisement 中给定播发部分类型匹配的广告数据部分的列表。

适用于

另请参阅