共用方式為


GattCharacteristicNotificationTrigger 類別

定義

表示當收到藍牙 LE GATT 特性的傳入變更通知時,啟動背景工作的觸發程式。

public ref class GattCharacteristicNotificationTrigger sealed
/// [Windows.Foundation.Metadata.Activatable(Windows.ApplicationModel.Background.IGattCharacteristicNotificationTriggerFactory, 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 GattCharacteristicNotificationTrigger 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.ApplicationModel.Background.IGattCharacteristicNotificationTriggerFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class GattCharacteristicNotificationTrigger 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.ApplicationModel.Background.IGattCharacteristicNotificationTriggerFactory, 65536, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.Activatable(Windows.ApplicationModel.Background.IGattCharacteristicNotificationTriggerFactory2, 262144, "Windows.Foundation.UniversalApiContract")]
class GattCharacteristicNotificationTrigger final
[Windows.Foundation.Metadata.Activatable(typeof(Windows.ApplicationModel.Background.IGattCharacteristicNotificationTriggerFactory), 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 GattCharacteristicNotificationTrigger
[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.ApplicationModel.Background.IGattCharacteristicNotificationTriggerFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class GattCharacteristicNotificationTrigger
[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.ApplicationModel.Background.IGattCharacteristicNotificationTriggerFactory), 65536, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.ApplicationModel.Background.IGattCharacteristicNotificationTriggerFactory2), 262144, "Windows.Foundation.UniversalApiContract")]
public sealed class GattCharacteristicNotificationTrigger
function GattCharacteristicNotificationTrigger(characteristic)
function GattCharacteristicNotificationTrigger(characteristic, eventTriggeringMode)
Public NotInheritable Class GattCharacteristicNotificationTrigger
繼承
Object Platform::Object IInspectable GattCharacteristicNotificationTrigger
屬性
實作

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

備註

版本歷程記錄

Windows 版本 SDK 版本 已新增值
1703 15063 GattCharacteristicNotificationTrigger (GattCharacteristic,BluetoothEventTriggeringMode)
1703 15063 EventTriggeringMode

建構函式

GattCharacteristicNotificationTrigger(GattCharacteristic)

初始化 GattCharacteristicNotificationTrigger 類別的新實例。

GattCharacteristicNotificationTrigger(GattCharacteristic, BluetoothEventTriggeringMode)

使用指定的特性和觸發模式,初始化 GattCharacteristicNotificationTrigger 類別的新實例。

屬性

Characteristic

取得需要值變更通知的 GATT 特性。

EventTriggeringMode

取得觸發程式的模式。 模式會指定何時啟動觸發程式。

適用於

另請參閱