GattCharacteristic.ProtectionLevel 属性

定义

获取或设置与设备的无线通信所需的 GATT 安全选项。

在配对过程中,Windows 将与设备协商可能的最大安全性,并且指定较低的安全级别不会降低现有安全级别。

public:
 property GattProtectionLevel ProtectionLevel { GattProtectionLevel get(); void set(GattProtectionLevel value); };
GattProtectionLevel ProtectionLevel();

void ProtectionLevel(GattProtectionLevel value);
public GattProtectionLevel ProtectionLevel { get; set; }
var gattProtectionLevel = gattCharacteristic.protectionLevel;
gattCharacteristic.protectionLevel = gattProtectionLevel;
Public Property ProtectionLevel As GattProtectionLevel

属性值

与设备进行空中通信所需的 GATT 安全选项。

Windows 要求

应用功能
bluetooth

适用于