private void GattServerCharacteristic_OnRead(object sender, ICharacteristicReadRequest e) { if (RfcommAddressDict.ContainsKey(e.SourceDevice)) { e.RespondWithValue(BitConverter.GetBytes(RfcommAddressDict[e.SourceDevice])); } else { e.RespondWithProtocolError(GattErrorCode.Failure); } }
private void _OnRead(object sender, ICharacteristicReadRequest e) { e.RespondWithValue(null); }
private void OnManufacturerNameStringCharacteristicRead(object sender, ICharacteristicReadRequest e) { e.RespondWithValue(Encoding.UTF8.GetBytes("XJ Studio")); }
private void GattServerCharacteristic_OnRead(object sender, ICharacteristicReadRequest e) { e.RespondWithValue(AngularVelocityInBytes); }
private void GattServerCharacteristic_OnRead(object sender, ICharacteristicReadRequest e) { e.RespondWithValue(TranspondCharacteristicWrapper.Value); }
private void _OnCharacteristicRead(object sender, ICharacteristicReadRequest e) { GattRequestViewModels.Add(new GattRequestViewModel(e)); }
private void _OnRead(object sender, ICharacteristicReadRequest e) { var device = e.SourceDevice; e.RespondWithValue(GattServerCharacteristic.Value); }
private void GattServerCharacteristic_OnRead(object sender, ICharacteristicReadRequest e) { var bytes = BitConverter.GetBytes(RfcommServerServiceWrapper.BluetoothManager.MacAddress); e.RespondWithValue(bytes); }
private void GattServerCharacteristic_OnRead(object sender, ICharacteristicReadRequest e) { e.RespondWithValue(Encoding.UTF8.GetBytes(RfcommServerServiceWrapper.BluetoothManager.Name)); }