Esempio n. 1
0
        private static void OnDiscoveredPeripheral(CBCentralManager central, CBPeripheral peripheral, NSDictionary advertisementData, NSNumber RSSI)
        {
            DiscoveredPeripheral?.Invoke(central, new CBDiscoveredPeripheralEventArgs(peripheral, advertisementData, RSSI));
            System.Diagnostics.Debug.WriteLine($"{peripheral.Identifier} {RSSI}");
            var e = new BluetoothAdvertisingEvent(peripheral, advertisementData, RSSI);

            AdvertisementReceived?.Invoke(central, e);
            _foundDevices.Add(peripheral);
        }
Esempio n. 2
0
 internal static void OnAdvertisementReceived(BluetoothAdvertisingEvent advertisingEvent)
 {
     AdvertisementReceived?.Invoke(null, advertisingEvent);
 }
Esempio n. 3
0
        private void OnAdvertisementReceived(BluetoothLEAdvertisementWatcher sender, BluetoothLEAdvertisementReceivedEventArgs args)
        {
            var converter = new RegularBluetoothConverter();

            AdvertisementReceived?.Invoke(converter.ConvertFromBluetoothLeAdvertisementPackage(args));
        }
Esempio n. 4
0
 private static void Watcher_Received(BluetoothLEAdvertisementWatcher sender, BluetoothLEAdvertisementReceivedEventArgs args)
 {
     AdvertisementReceived?.Invoke(null, args);
 }