C# Class Plugin.BLE.iOS.Adapter

Inheritance: Plugin.BLE.Abstractions.AdapterBase
Mostra file Open project: xabre/xamarin-bluetooth-le Class Usage Examples

Public Methods

Method Description
Adapter ( CBCentralManager centralManager ) : System
ConnectToKnownDeviceAsync ( System.Guid deviceGuid, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Connects to known device async. https://developer.apple.com/library/ios/documentation/NetworkingInternetWeb/Conceptual/CoreBluetooth_concepts/BestPracticesForInteractingWithARemotePeripheralDevice/BestPracticesForInteractingWithARemotePeripheralDevice.html

GetSystemConnectedOrPairedDevices ( System.Guid services = null ) : List
ParseAdvertismentData ( NSDictionary advertisementData ) : List

Protected Methods

Method Description
ConnectToDeviceNativeAsync ( IDevice device, bool autoconnect, CancellationToken cancellationToken ) : Task
DisconnectDeviceNative ( IDevice device ) : void
StartScanningForDevicesNativeAsync ( System.Guid serviceUuids, bool allowDuplicatesKey, CancellationToken scanCancellationToken ) : Task
StopScanNative ( ) : void

Private Methods

Method Description
ContainsDevice ( IEnumerable list, CBPeripheral device ) : bool
ParseDeviceGuid ( CBPeripheral peripherial ) : System.Guid
WaitForState ( CBCentralManagerState state, CancellationToken cancellationToken, bool configureAwait = false ) : Task

Method Details

Adapter() public method

public Adapter ( CBCentralManager centralManager ) : System
centralManager CBCentralManager
return System

ConnectToDeviceNativeAsync() protected method

protected ConnectToDeviceNativeAsync ( IDevice device, bool autoconnect, CancellationToken cancellationToken ) : Task
device IDevice
autoconnect bool
cancellationToken System.Threading.CancellationToken
return Task

ConnectToKnownDeviceAsync() public method

Connects to known device async. https://developer.apple.com/library/ios/documentation/NetworkingInternetWeb/Conceptual/CoreBluetooth_concepts/BestPracticesForInteractingWithARemotePeripheralDevice/BestPracticesForInteractingWithARemotePeripheralDevice.html
public ConnectToKnownDeviceAsync ( System.Guid deviceGuid, CancellationToken cancellationToken = default(CancellationToken) ) : Task
deviceGuid System.Guid Device GUID.
cancellationToken System.Threading.CancellationToken
return Task

DisconnectDeviceNative() protected method

protected DisconnectDeviceNative ( IDevice device ) : void
device IDevice
return void

GetSystemConnectedOrPairedDevices() public method

public GetSystemConnectedOrPairedDevices ( System.Guid services = null ) : List
services System.Guid
return List

ParseAdvertismentData() public static method

public static ParseAdvertismentData ( NSDictionary advertisementData ) : List
advertisementData NSDictionary
return List

StartScanningForDevicesNativeAsync() protected method

protected StartScanningForDevicesNativeAsync ( System.Guid serviceUuids, bool allowDuplicatesKey, CancellationToken scanCancellationToken ) : Task
serviceUuids System.Guid
allowDuplicatesKey bool
scanCancellationToken System.Threading.CancellationToken
return Task

StopScanNative() protected method

protected StopScanNative ( ) : void
return void