예제 #1
0
파일: BLEDevice.cs 프로젝트: poz1/Poz1.BLE
        public BLEDevice(CBPeripheral device, int RSSI)
        {
            deviceTaskCompletitionSource = new DeviceTaskCompletitionSource();
            _centralManager     = new CBCentralManager(_centralManagerDelegate = new CentralManagerDelegate(deviceTaskCompletitionSource), DispatchQueue.CurrentQueue);
            _peripheralDelegate = new PeripheralDelegate(deviceTaskCompletitionSource);
            _device             = device;

            Guid = Guid.Parse(_device.Identifier?.AsString());
            Name = _device.Name?.ToString();
            Rssi = RSSI;
        }
예제 #2
0
 public CentralManagerDelegate(DeviceTaskCompletitionSource centralManagerTaskCompletitionSource)
 {
     _centralManagerTaskCompletitionSource = centralManagerTaskCompletitionSource;
 }
예제 #3
0
        public PeripheralDelegate(DeviceTaskCompletitionSource deviceTaskCompletitionSource)
        {
            _deviceTaskCompletitionSource = deviceTaskCompletitionSource;

            servicesList = new List <IBLEService>();
        }