Beispiel #1
0
        private void OnClientCharReadResult(CSR_BLE_CHAR_READ_RESULT readResult)
        {
            if (readResult.result == 0)
            {
                _readBytes = new byte[readResult.charValueSize];
                Marshal.Copy(readResult.charValue, _readBytes, 0, readResult.charValueSize);

                _readEvent.Set();
                Debug("[CSRMSG]:OnClientCharReadResult Success " + _readBytes.Length);
            }
            else
            {
                Error("[CSRMSG]:OnClientCharReadResult Fail!");
            }
        }
Beispiel #2
0
        private void OnCharReadResult(CSR_BLE_CHAR_READ_RESULT readResult)
        {
            if (readResult.result == 0)
            {
                _readBytes = new byte[readResult.charValueSize];
                Marshal.Copy(readResult.charValue, _readBytes, 0, readResult.charValueSize);

                if (_curServiceUuid == 0xf000)
                {
                }
                else
                {
                    _readEvent.Set();
                }

                Debug("[BleMsg]:uEnergy Host read the data length" + _readBytes.Length);
            }
            else
            {
                Error("[BleMsg]:uEnergy Host fails to read the data.\n");
            }
        }