GattDeviceService class

Applies to Windows and Windows Phone

Represents a GATT Primary Service on a Bluetooth device.

Syntax


var gattDeviceService = Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceService;

Attributes

[DualApiPartition()]
[MarshalingBehavior(Agile)]
[Version(0x06030000)]

Members

The GattDeviceService class has these types of members:

Methods

The GattDeviceService class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
Close [C++, JavaScript]Releases the resources associated with the GattDeviceService class. This allows other apps to access the resources of the GattDeviceService in question. A GattDeviceService object should not be used after Close is invoked, instead a new GattDeviceService object should be instantiated using the FromIdAsync method.
ConvertShortIdToUuid Converts a Bluetooth SIG defined short Id to a full GATT UUID.
Dispose [C#, VB]Performs tasks associated with freeing, releasing, or resetting unmanaged resources.
FromIdAsync Instantiates a new GattDeviceService from the device ID.
GetAllCharacteristics Gets the collection of all characteristics belonging to this GattDeviceService instance.
GetAllIncludedServices Gets the collection of all included services belonging to this GattDeviceService instance.
GetCharacteristics Returns a vector of characteristics, that are identified by the specified UUID and belong to this GattDeviceService instance.
GetDeviceSelectorFromShortId Creates a suitable AQS Filter string for use with the Windows Device Enumeration: findAllAsync API, from a 16-bit Bluetooth GATT Service UUID.
GetDeviceSelectorFromUuid Creates a suitable AQS Filter string for use with the Windows Device Enumeration: findAllAsync API, from a Bluetooth service UUID.
GetIncludedServices Returns a vector of included services, that are identified by the specified UUID and belong to this GattDeviceService instance.

 

Properties

The GattDeviceService class has these properties.

PropertyAccess typeDescription

AttributeHandle

Read-onlyGets the handle used to uniquely identify GATT-based service attributes as declared on the Bluetooth LE device.

Device

Read-onlyGets the BluetoothLEDevice object describing the device associated with the current GattDeviceService object.

DeviceId

Read-onlyGet the string that represents the GATT service instance path used to instantiate the GattDeviceService.

ParentServices

Read-onlyGets the read-only list of parent services for this service.

Uuid

Read-onlyThe GATT Service UUID associated with this GattDeviceService.

 

Remarks

The GattDeviceService class represents a GATT service on a Bluetooth LE device, it is instantiated by using a device service instance path, obtained by using the Windows Device Enumeration API.

Requirements

Minimum supported client

Windows 8.1 [Windows Store apps, desktop apps]

Minimum supported server

None supported [Windows Store apps, desktop apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Devices.Bluetooth.GenericAttributeProfile
Windows::Devices::Bluetooth::GenericAttributeProfile [C++]

Metadata

Windows.winmd

See also

Object
IClosable

 

 

Show:
© 2014 Microsoft