コード例 #1
0
ファイル: BluetoothIO.cs プロジェクト: davidhedelin/p0
 public BluetoothIO(IAdapter adapter, SerialIOSettings settings)
 {
     Settings = settings;
     _adapter = adapter;
     _adapter.DeviceConnectionLost += AdapterOnDeviceConnectionLost;
     _adapter.DeviceDisconnected   += AdapterOnDeviceDisconnected;
     _adapter.DeviceDiscovered     += Adapter_DeviceDiscovered;
     _adapter.ScanTimeout           = Settings.ScanTimeout;
 }
コード例 #2
0
ファイル: BluetoothIO.cs プロジェクト: davidhedelin/p0
        public BluetoothIO(IBluetoothLE bluetoothLe, IBluetoothLogger logger, Platform platform)
        {
            _platform = platform;
            Settings  = new SerialIOSettings();
            bluetoothLe.StateChanged += BluetoothLeOnStateChanged;
            _logger = logger;

            _adapter = bluetoothLe.Adapter;
            _adapter.DeviceConnectionLost += AdapterOnDeviceConnectionLost;
            _adapter.DeviceDisconnected   += AdapterOnDeviceDisconnected;
            _adapter.DeviceDiscovered     += Adapter_DeviceDiscovered;
            _adapter.ScanTimeout           = Settings.ScanTimeout;
        }