public AttributeValueEventArgs Execute() { byte[] readAttr = Ble.Lib.BLECommandATTClientReadByHandle(this.Connection, this.AttributeHandle); AttributeValueEventHandler handler = this.VerifyAttribute; Ble.Lib.BLEEventATTClientAttributeValue += handler; Ble.SendCommand(this.Port, readAttr); this.WaitEvent(() => _attrValueResponse != null); Ble.Lib.BLEEventATTClientAttributeValue -= handler; return(_attrValueResponse); }
private void InitializeCharacteristicNotifications() { AttributeValueEventHandler handler = this.HandleAttributeValue; Ble.Lib.BLEEventATTClientAttributeValue += handler; }