Bagikan melalui


BluetoothLEAdvertisementWatcher Kelas

Definisi

Objek untuk menerima iklan Bluetooth Low Energy (LE).

public ref class BluetoothLEAdvertisementWatcher sealed
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.Activatable(Windows.Devices.Bluetooth.Advertisement.IBluetoothLEAdvertisementWatcherFactory, 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 BluetoothLEAdvertisementWatcher 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(Windows.Devices.Bluetooth.Advertisement.IBluetoothLEAdvertisementWatcherFactory, 65536, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class BluetoothLEAdvertisementWatcher final
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Devices.Bluetooth.Advertisement.IBluetoothLEAdvertisementWatcherFactory), 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 BluetoothLEAdvertisementWatcher
[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(typeof(Windows.Devices.Bluetooth.Advertisement.IBluetoothLEAdvertisementWatcherFactory), 65536, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class BluetoothLEAdvertisementWatcher
function BluetoothLEAdvertisementWatcher(advertisementFilter)
Public NotInheritable Class BluetoothLEAdvertisementWatcher
Warisan
Object Platform::Object IInspectable BluetoothLEAdvertisementWatcher
Atribut

Persyaratan Windows

Rangkaian perangkat
Windows 10 (diperkenalkan dalam 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (diperkenalkan dalam v1.0)
Kemampuan aplikasi
bluetooth

Keterangan

Riwayat versi

Versi Windows Versi SDK Nilai ditambahkan
2004 19041 AllowExtendedAdvertisements

Konstruktor

BluetoothLEAdvertisementWatcher()

Membuat objek BluetoothLEAdvertisementWatcher baru.

BluetoothLEAdvertisementWatcher(BluetoothLEAdvertisementFilter)

Membuat objek BluetoothLEAdvertisementWatcher baru dengan filter iklan untuk menginisialisasi pengamat.

Properti

AdvertisementFilter

Mendapatkan atau mengatur objek BluetoothLEAdvertisementFilter yang digunakan untuk konfigurasi pemfilteran iklan BLUETOOTH LE yang menggunakan pemfilteran berbasis bagian payload.

AllowExtendedAdvertisements

Memungkinkan penerimaan iklan menggunakan format Extended Advertising. Default ke False.

MaxOutOfRangeTimeout

Mendapatkan batas waktu maksimum di luar rentang.

MaxSamplingInterval

Mendapatkan interval pengambilan sampel maksimum.

MinOutOfRangeTimeout

Mendapatkan batas waktu minimum di luar rentang.

MinSamplingInterval

Mendapatkan interval pengambilan sampel minimum.

ScanningMode

Mendapatkan atau mengatur mode pemindaian LE Bluetooth.

ScanParameters

Objek untuk menerima iklan Bluetooth Low Energy (LE).

SignalStrengthFilter

Mendapatkan atau mengatur objek BluetoothSignalStrengthFilter yang digunakan untuk konfigurasi pemfilteran iklan Bluetooth LE yang menggunakan pemfilteran berbasis kekuatan sinyal.

Status

Mendapatkan status BluetoothLEAdvertisementWatcher saat ini.

UseCodedPhy

Objek untuk menerima iklan Bluetooth Low Energy (LE).

UseHardwareFilter

Objek untuk menerima iklan Bluetooth Low Energy (LE).

UseUncoded1MPhy

Objek untuk menerima iklan Bluetooth Low Energy (LE).

Metode

Start()

Mulai BluetoothLEAdvertisementWatcher untuk memindai iklan Bluetooth LE.

Stop()

Hentikan BluetoothLEAdvertisementWatcher dan nonaktifkan pemindaian untuk iklan Bluetooth LE.

Acara

Received

Pemberitahuan untuk peristiwa iklan Le Bluetooth baru diterima.

Stopped

Pemberitahuan ke aplikasi bahwa pemindaian LE Bluetooth untuk iklan telah dibatalkan atau dibatalkan baik oleh aplikasi atau karena kesalahan.

Berlaku untuk

Lihat juga