Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/xamarin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 蓝牙可更新特征属性_C#_Xamarin_Bluetooth_Bluetooth Lowenergy - Fatal编程技术网

C# 蓝牙可更新特征属性

C# 蓝牙可更新特征属性,c#,xamarin,bluetooth,bluetooth-lowenergy,C#,Xamarin,Bluetooth,Bluetooth Lowenergy,我正在构建一个Xamarin.Forms跨平台移动应用程序,该应用程序使用Bluetoth低能耗功能。我正在连接到一个基于mbed的实现 在Xamarin C#中,是什么触发了该特性。CanUpdateMonkey.Robotics中的属性 这是我的C#基于的一个标准示例: if (characteristic.CanUpdate) { characteristic.ValueUpdated += (s, e) => {

我正在构建一个
Xamarin.Forms
跨平台移动应用程序,该应用程序使用Bluetoth低能耗功能。我正在连接到一个基于
mbed
的实现

在Xamarin C#中,是什么触发了该特性。
CanUpdate
Monkey.Robotics中的属性

这是我的C#基于的一个标准示例:

if (characteristic.CanUpdate) {
                characteristic.ValueUpdated += (s, e) => {
                    Debug.WriteLine("characteristic.ValueUpdated");
                    Device.BeginInvokeOnMainThread( () => {
                        UpdateDisplay(characteristic);
                    });
                    IsBusy = false; // only spin until the first result is received
                };
                IsBusy = true;
                characteristic.StartUpdates();
            }
这一直在工作,但自从我改为我自己的自定义GATT服务,我连接到,CanUpdate属性总是假的。这个属性是什么?它是如何触发的?这将真正帮助我调试GATT服务代码

谢谢

是开源的,所以你可以自己查一下

CanUpdate的实现方式如下:

public bool CanUpdate {

  get {
    return (this.Properties & CharacteristicPropertyType.Notify) != 0;
  }
}