Class BluetoothGattService
Definition
- Assembly:
- Tizen.Network.Bluetooth.dll
The Bluetooth GATT service.
C#Copypublic class BluetoothGattService
- Inheritance
-
objectBluetoothGattService
Constructors
Declaration
C#Copypublic BluetoothGattService(string uuid, BluetoothGattServiceType type)
Parameters
| Type | Name | Description |
|---|---|---|
| string | uuid | The UUID of the service. |
| BluetoothGattServiceType | type | The type of service. |
Exceptions
| Type | Condition |
|---|---|
| System.InvalidOperationException | Thrown when the create GATT service procedure fails. |
Properties
Declaration
C#Copypublic string Uuid { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
Declaration
C#Copypublic void AddCharacteristic(BluetoothGattCharacteristic characteristic)
Parameters
| Type | Name | Description |
|---|---|---|
| BluetoothGattCharacteristic | characteristic | The characteristic to be added. |
Exceptions
| Type | Condition |
|---|---|
| System.InvalidOperationException | Thrown when the add GATT characteristic procedure fails. |
Declaration
C#Copypublic void AddService(BluetoothGattService service)
Parameters
| Type | Name | Description |
|---|---|---|
| BluetoothGattService | service | The service to be included. |
Exceptions
| Type | Condition |
|---|---|
| System.InvalidOperationException | Thrown when the add GATT service procedure fails. |
GetCharacteristic(string)
Gets the characteristic with the given UUID that belongs to this service.
Declaration
C#Copypublic BluetoothGattCharacteristic GetCharacteristic(string uuid)
Parameters
| Type | Name | Description |
|---|---|---|
| string | uuid | The UUID for the characteristic to get. |
Returns
| Type | Description |
|---|---|
| BluetoothGattCharacteristic | The characteristic with a given UUID if it exists, null otherwise. |
Declaration
C#Copypublic IEnumerable<BluetoothGattCharacteristic> GetCharacteristics()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><BluetoothGattCharacteristic> | The list of the characteristic that belongs to this service. |
Declaration
C#Copypublic BluetoothGattClient GetGattClient()
Returns
| Type | Description |
|---|---|
| BluetoothGattClient | The client instance which the specified service belongs to. |
Declaration
C#Copypublic BluetoothGattServer GetGattServer()
Returns
| Type | Description |
|---|---|
| BluetoothGattServer | The server instance which the specified service belongs to. |
Declaration
C#Copypublic BluetoothGattService GetIncludeService(string uuid)
Parameters
| Type | Name | Description |
|---|---|---|
| string | uuid | The UUID for the service to get. |
Returns
| Type | Description |
|---|---|
| BluetoothGattService | The service with a given UUID if it exists, null otherwise. |
Declaration
C#Copypublic IEnumerable<BluetoothGattService> GetIncludeServices()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><BluetoothGattService> | The included service list of this service. |