Exemple #1
0
        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);
        }
Exemple #2
0
        private void InitializeCharacteristicNotifications()
        {
            AttributeValueEventHandler handler = this.HandleAttributeValue;

            Ble.Lib.BLEEventATTClientAttributeValue += handler;
        }