Пример #1
0
 public BLE(IBluetoothPacketProvider provider)
 {
     if (provider != null)
     {
         manager              = new BeaconManager(provider);
         manager.BeaconAdded += (s, b) => BeaconAdded.Invoke(s, b);
         provider.AdvertisementPacketReceived += (s, e) => AdvertisementPacketReceived.Invoke(s, e);
     }
 }
Пример #2
0
 private void ScanCallback_OnAdvertisementPacketReceived(object sender, BLEAdvertisementPacketArgs e)
 {
     AdvertisementPacketReceived?.Invoke(this, e);
 }
 private void WatcherOnReceived(BluetoothLEAdvertisementWatcher sender, BluetoothLEAdvertisementReceivedEventArgs eventArgs)
 {
     AdvertisementPacketReceived?.Invoke(this, new BLEAdvertisementPacketArgs(eventArgs.ToUniversalBLEPacket()));
 }