コード例 #1
0
 public Descriptor(CBDescriptor nativeDescriptor, CBPeripheral parentDevice, ICharacteristic characteristic, CBCentralManager centralManager)
     : base(characteristic)
 {
     _parentDevice     = parentDevice;
     _nativeDescriptor = nativeDescriptor;
     _centralManager   = centralManager;
 }
        public Descriptor(CBDescriptor nativeDescriptor, CBPeripheral parentDevice, Characteristic characteristic, IBleCentralManagerDelegate bleCentralManagerDelegate) : this(characteristic)
        {
            NativeDescriptor = nativeDescriptor;

            _parentDevice = parentDevice;
            _bleCentralManagerDelegate = bleCentralManagerDelegate;
        }
コード例 #3
0
 private Descriptor ConvertDescriptor(CBDescriptor nativeDescriptor)
 {
     return(new Descriptor
     {
         Id = BluetoothConverter.ConvertBluetoothLeUuid(nativeDescriptor.UUID.Uuid),
         NativeDescriptor = nativeDescriptor
     });
 }
コード例 #4
0
        internal BLEDescriptor(BLECBPeripheralWrapper peripheral, CBDescriptor descriptor)
        {
            _peripheralReference = new WeakReference(peripheral);
            _descriptor          = descriptor;

            PeripheralWrapper.UpdatedValue         += OnUpdatedValue;
            PeripheralWrapper.WroteDescriptorValue += OnWroteDescriptorValue;
        }
コード例 #5
0
 internal GattDescriptor(
     CBPeripheral peripheral,
     PeripheralDelegate @delegate,
     GattCharacteristic characteristic,
     CBDescriptor descriptor)
 {
     this.peripheral = peripheral;
     this.@delegate  = @delegate;
     Characteristic  = characteristic;
     this.descriptor = descriptor;
 }
コード例 #6
0
        bool Equals(CBDescriptor descriptor)
        {
            if (!this.native.UUID.Equals(descriptor.UUID))
            {
                return(false);
            }

            if (!this.NativeCharacteristic.UUID.Equals(descriptor.Characteristic.UUID))
            {
                return(false);
            }

            if (!this.NativeService.UUID.Equals(descriptor.Characteristic.Service.UUID))
            {
                return(false);
            }

            if (!this.Peripheral.Identifier.Equals(descriptor.Characteristic.Service.Peripheral.Identifier))
            {
                return(false);
            }

            return(true);
        }
コード例 #7
0
 public Descriptor(CBDescriptor nativeDescriptor, CBPeripheral parentDevice)
 {
     _parentDevice = parentDevice;
     _nativeDescriptor = nativeDescriptor;
 }
コード例 #8
0
 public override void UpdatedValue(CBPeripheral peripheral, CBDescriptor descriptor, NSError error)
 {
     Console.WriteLine ("Value of characteristic " + descriptor.Characteristic + " is " + descriptor.Value);
 }
コード例 #9
0
 public GattDescriptor(GattCharacteristic characteristic, CBDescriptor native) : base(characteristic, native.UUID.ToGuid())
 {
     this.characteristicObj = characteristic;
     this.native            = native;
 }
コード例 #10
0
 internal GattDescriptor(GattCharacteristic characteristic, CBDescriptor descriptor) : this(characteristic)
 {
     _descriptor = descriptor;
 }
コード例 #11
0
 public Descriptor(CBDescriptor nativeDescriptor)
 {
     this._nativeDescriptor = nativeDescriptor;
 }
コード例 #12
0
 public Descriptor(CBDescriptor nativeDescriptor)
 {
     _nativeDescriptor = nativeDescriptor;
 }
コード例 #13
0
ファイル: Descriptor.cs プロジェクト: yelkrebb/Core.BLE.iOS
		public Descriptor (CBDescriptor nativeDescriptor)
		{
			this._nativeDescriptor = nativeDescriptor;
		}
コード例 #14
0
 public Descriptor(CBDescriptor nativeDescriptor)
 {
     _nativeDescriptor = nativeDescriptor;
 }
コード例 #15
0
 private GattDescriptor(CBDescriptor descriptor)
 {
     _descriptor = descriptor;
 }
コード例 #16
0
 public Descriptor(CBDescriptor nativeDescriptor, CBPeripheral parentDevice)
 {
     _parentDevice     = parentDevice;
     _nativeDescriptor = nativeDescriptor;
 }
コード例 #17
0
 public override void UpdatedValue(CBPeripheral peripheral, CBDescriptor descriptor, NSError error)
 {
     base.UpdatedValue(peripheral, descriptor, error);
 }
コード例 #18
0
 public Descriptor(CBDescriptor nativeDescriptor, CBPeripheral parentDevice, ICharacteristic characteristic) : base(characteristic)
 {
     _parentDevice     = parentDevice;
     _nativeDescriptor = nativeDescriptor;
 }
コード例 #19
0
 public static byte[] ToByteArray(this CBDescriptor native) => (native.Value as NSData)?.ToArray();
コード例 #20
0
 public override void UpdatedValue(CBPeripheral peripheral, CBDescriptor descriptor, NSError error)
 {
     Console.WriteLine("Value of characteristic " + descriptor.Characteristic + " is " + descriptor.Value);
 }