Class BluetoothGattService

    Definition

    Namespace:
    Tizen.Network.Bluetooth
    Assembly:
    Tizen.Network.Bluetooth.dll

    The Bluetooth GATT service.

    public class BluetoothGattService
    Inheritance
    object
    BluetoothGattService

    Constructors

    View Source

    BluetoothGattService(string, BluetoothGattServiceType)

    The constructor.

    Declaration
    public 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

    View Source

    Uuid

    Specification name from the UUID.

    Declaration
    public string Uuid { get; }
    Property Value
    Type Description
    string

    Methods

    View Source

    AddCharacteristic(BluetoothGattCharacteristic)

    Adds a characteristic to this service.

    Declaration
    public 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.

    View Source

    AddService(BluetoothGattService)

    Includes a service to this service.

    Declaration
    public 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.

    View Source

    GetCharacteristic(string)

    Gets the characteristic with the given UUID that belongs to this service.

    Declaration
    public 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.

    View Source

    GetCharacteristics()

    Gets list of the characteristic that belongs to this service.

    Declaration
    public IEnumerable<BluetoothGattCharacteristic> GetCharacteristics()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T><BluetoothGattCharacteristic>

    The list of the characteristic that belongs to this service.

    View Source

    GetGattClient()

    Gets the client instance which the specified service belongs to.

    Declaration
    public BluetoothGattClient GetGattClient()
    Returns
    Type Description
    BluetoothGattClient

    The client instance which the specified service belongs to.

    View Source

    GetGattServer()

    Gets the server instance which the specified service belongs to.

    Declaration
    public BluetoothGattServer GetGattServer()
    Returns
    Type Description
    BluetoothGattServer

    The server instance which the specified service belongs to.

    View Source

    GetIncludeService(string)

    Gets the included service.

    Declaration
    public 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.

    View Source

    GetIncludeServices()

    Gets the included service list of this service.

    Declaration
    public IEnumerable<BluetoothGattService> GetIncludeServices()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T><BluetoothGattService>

    The included service list of this service.

    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX