コード例 #1
0
ファイル: BleReadAttribute.cs プロジェクト: tyounsi/monomyo
        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);
        }
コード例 #2
0
ファイル: BleConnector.cs プロジェクト: tyounsi/monomyo
        private void InitializeCharacteristicNotifications()
        {
            AttributeValueEventHandler handler = this.HandleAttributeValue;

            Ble.Lib.BLEEventATTClientAttributeValue += handler;
        }