public Descriptor(BluetoothGattDescriptor nativeDescriptor, BluetoothGatt gatt, IGattCallback gattCallback) { _gattCallback = gattCallback; _gatt = gatt; _nativeDescriptor = nativeDescriptor; }
private void OnDescriptorWritten(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, GattStatus status) { if (status == GattStatus.Success && _onSubscribed != null) { _onSubscribed(true); } }
public override void OnDescriptorRead (BluetoothGatt gatt, BluetoothGattDescriptor descriptor, GattStatus status) { base.OnDescriptorRead (gatt, descriptor, status); Console.WriteLine ("OnDescriptorRead: " + descriptor.ToString()); }
public override void OnDescriptorRead(ABluetooth.BluetoothGatt gatt, ABluetooth.BluetoothGattDescriptor descriptor, ABluetooth.GattStatus status) { System.Diagnostics.Debug.WriteLine($"DescriptorRead {descriptor.Uuid} {status}"); _owner.DescriptorRead?.Invoke(_owner, new DescriptorEventArgs { Descriptor = descriptor, Status = status }); }
public override void OnDescriptorWrite(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, GattStatus status) { base.OnDescriptorWrite(gatt, descriptor, status); Console.WriteLine("GattCallBack: OnDescriptorWrite: " + descriptor.ToString()); this.DescriptorWrite(this, new CharacteristicReadEventArgs() { Characteristic = new Characteristic(descriptor.Characteristic, gatt, this) }); }
internal GattDescriptor(GattCharacteristic characteristic, ABluetooth.BluetoothGattDescriptor descriptor) : this(characteristic) { _descriptor = descriptor; }
public override void OnDescriptorRead(ABluetooth.BluetoothGatt gatt, ABluetooth.BluetoothGattDescriptor descriptor, ABluetooth.GattStatus status) { System.Diagnostics.Debug.WriteLine($"DescriptorRead {descriptor.Uuid} {status}"); _owner._descriptorReadHandle.Set(); }
public override void OnDescriptorWrite(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, GattStatus status) { var handler = DescriptorWritten; if (handler != null) handler(gatt, descriptor, status); }
public GattServerDescriptor(Guid uuid, GattPermissions permissions) { DroidDescriptor = new Android.Bluetooth.BluetoothGattDescriptor(uuid.ToJavaUuid(), permissions.ToDroidGattDescriptorPermission()); }
public Descriptor (BluetoothGattDescriptor nativeDescriptor) { this._nativeDescriptor = nativeDescriptor; }
public override void OnDescriptorRead(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, GattStatus status) { base.OnDescriptorRead(gatt, descriptor, status); Mvx.Trace("OnDescriptorRead: " + descriptor.ToString()); }
public override void OnDescriptorRead(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, GattStatus status) { base.OnDescriptorRead(gatt, descriptor, status); Trace.Message("OnDescriptorRead: {0}", descriptor.GetValue()?.ToHexString()); DescriptorValueRead?.Invoke(this, new DescriptorCallbackEventArgs(descriptor, GetExceptionFromGattStatus(status))); }
public DescriptorCallbackEventArgs(BluetoothGattDescriptor descriptor, Exception exception = null) { Descriptor = descriptor; Exception = exception; }