コード例 #1
0
 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);
 }
コード例 #3
0
 private void OnManufacturerNameStringCharacteristicRead(object sender, ICharacteristicReadRequest e)
 {
     e.RespondWithValue(Encoding.UTF8.GetBytes("XJ Studio"));
 }
コード例 #4
0
 private void GattServerCharacteristic_OnRead(object sender, ICharacteristicReadRequest e)
 {
     e.RespondWithValue(AngularVelocityInBytes);
 }
コード例 #5
0
 private void GattServerCharacteristic_OnRead(object sender, ICharacteristicReadRequest e)
 {
     e.RespondWithValue(TranspondCharacteristicWrapper.Value);
 }
コード例 #6
0
 private void _OnCharacteristicRead(object sender, ICharacteristicReadRequest e)
 {
     GattRequestViewModels.Add(new GattRequestViewModel(e));
 }
コード例 #7
0
        private void _OnRead(object sender, ICharacteristicReadRequest e)
        {
            var device = e.SourceDevice;

            e.RespondWithValue(GattServerCharacteristic.Value);
        }
コード例 #8
0
        private void GattServerCharacteristic_OnRead(object sender, ICharacteristicReadRequest e)
        {
            var bytes = BitConverter.GetBytes(RfcommServerServiceWrapper.BluetoothManager.MacAddress);

            e.RespondWithValue(bytes);
        }
コード例 #9
0
 private void GattServerCharacteristic_OnRead(object sender, ICharacteristicReadRequest e)
 {
     e.RespondWithValue(Encoding.UTF8.GetBytes(RfcommServerServiceWrapper.BluetoothManager.Name));
 }