Bluetooth GATT operations used by the API, must be implemented by the target platform.
More...
Bluetooth GATT operations used by the API, must be implemented by the target platform.
Before interacting with any of the characteristics, users must first call DiscoverServicesAsync
◆ DisconnectAsync()
Task MbientLab.MetaWear.Impl.Platform.IBluetoothLeGatt.DisconnectAsync |
( |
| ) |
|
Closes the Bluetooth LE connection
- Returns
- Null when connection is lost
◆ DiscoverServicesAsync()
Task MbientLab.MetaWear.Impl.Platform.IBluetoothLeGatt.DiscoverServicesAsync |
( |
| ) |
|
Discover GATT services and characteristics avaiable on the remote device
- Returns
- Null when discovery is completed
◆ EnableNotificationsAsync()
Task MbientLab.MetaWear.Impl.Platform.IBluetoothLeGatt.EnableNotificationsAsync |
( |
Tuple< Guid, Guid > |
gattChar, |
|
|
Action< byte[]> |
handler |
|
) |
| |
Enable notifications for the characteristic
- Parameters
-
gattChar | Characteristic to enable notifications for |
handler | Listener for handling characteristic notifications |
- Returns
- Null when the task is completed
◆ ReadCharacteristicAsync()
Task<byte[]> MbientLab.MetaWear.Impl.Platform.IBluetoothLeGatt.ReadCharacteristicAsync |
( |
Tuple< Guid, Guid > |
gattChar | ) |
|
Reads the requested characteristic's value
- Parameters
-
gattChar | Characteristic to read |
- Returns
- Characteristic's value
◆ ServiceExistsAsync()
Task<bool> MbientLab.MetaWear.Impl.Platform.IBluetoothLeGatt.ServiceExistsAsync |
( |
Guid |
serviceGuid | ) |
|
Checks if a GATT service exists
- Parameters
-
serviceGuid | UUID identifying the service to lookup |
- Returns
- True if service exists, false if not
◆ WriteCharacteristicAsync()
Task MbientLab.MetaWear.Impl.Platform.IBluetoothLeGatt.WriteCharacteristicAsync |
( |
Tuple< Guid, Guid > |
gattChar, |
|
|
GattCharWriteType |
writeType, |
|
|
byte [] |
value |
|
) |
| |
Writes a GATT characteristic and its value to the remote device
- Parameters
-
gattChar | GATT characteristic to write |
writeType | Type of GATT write to use |
value | Value to be written |
- Returns
- Null when the task is completed
◆ BluetoothAddress
ulong MbientLab.MetaWear.Impl.Platform.IBluetoothLeGatt.BluetoothAddress |
|
get |
Device's mac address, as an unsigned long
◆ OnDisconnect
Action MbientLab.MetaWear.Impl.Platform.IBluetoothLeGatt.OnDisconnect |
|
getset |
Handler to process disconnect events
The documentation for this interface was generated from the following file:
- MetaWear/Impl/Platform/IBluetoothLeGatt.cs