Exemple #1
0
 public DeviceContext(CentralContext adapterContext,
                      IPeripheral peripheral,
                      BluetoothLEDevice native)
 {
     this.syncLock         = new object();
     this.connSubject      = new Subject <ConnectionState>();
     this.adapterContext   = adapterContext;
     this.subscribers      = new List <GattCharacteristic>();
     this.Peripheral       = peripheral;
     this.NativeDevice     = native;
     this.bluetoothAddress = native.BluetoothAddress;
 }
Exemple #2
0
 public CentralManager(CentralContext context)
 {
     this.scanSubject = new Subject <bool>();
     this.context     = context;
 }
Exemple #3
0
 public Peripheral(CentralContext context, CBPeripheral native) : base(native.Name, native.Identifier.ToGuid())
 {
     this.context = context;
     this.Native  = native;
 }
Exemple #4
0
 public CentralManager(CentralContext context)
 {
     this.context = context;
 }
Exemple #5
0
 public Peripheral(CentralContext centralContext, BluetoothDevice native)
     : base(native.Name, ToDeviceId(native.Address))
 {
     this.connSubject = new Subject <ConnectionState>();
     this.context     = new DeviceContext(centralContext, native);
 }
Exemple #6
0
 public Peripheral(CentralContext adapterContext, BluetoothLEDevice native)
 {
     this.context = new DeviceContext(adapterContext, this, native);
     this.Name    = native.Name;
     this.Uuid    = native.GetDeviceId();
 }