Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MSDN Library
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

GattCharacteristic class

Represents a Characteristic of a GATT service.

Syntax


var gattCharacteristic = Windows.Devices.Bluetooth.GenericAttributeProfile.GattCharacteristic;

Members

The GattCharacteristic class has these types of members:

Events

The GattCharacteristic class has these events.

EventDescription
ValueChanged An App can register an event handler in order to receive events when notification or indications are received from a device, after setting the Client Characteristic Configuration Descriptor.

 

Methods

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

MethodDescription
ConvertShortIdToUuid Converts a Bluetooth SIG defined short Id to a full GATT UUID.
GetAllDescriptors Gets the collection of all descriptors belonging to this GattCharacteristic instance.
GetDescriptors Returns a vector of descriptors, that are identified by the specified UUID, and belong to this GattCharacteristic instance.
ReadClientCharacteristicConfigurationDescriptorAsync Reads the current value of the ClientCharacteristicConfigurationDescriptor.
ReadValueAsync Performs a Characteristic Value read from the value cache maintained by Windows.
ReadValueAsync(BluetoothCacheMode) Performs a Characteristic Value read either from the value cache maintained by Windows, or directly from the device.
WriteClientCharacteristicConfigurationDescriptorAsync Writes the ClientCharacteristicConfigurationDescriptor to the Bluetooth LE device, and if the value to be written represents an indication or a notification and a ValueChanged event handler is registered, enables receiving ValueChanged events from the device.
WriteValueAsync(IBuffer) Performs a Characteristic Value write to a Bluetooth LE device.
WriteValueAsync(IBuffer,GattWriteOption) Performs a Characteristic Value write to a Bluetooth LE device.

 

Properties

The GattCharacteristic class has these properties.

PropertyAccess typeDescription

AttributeHandle

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

CharacteristicProperties

Read-onlyGets the GATT characteristic properties, as defined by the GATT profile.

PresentationFormats

Read-onlyGets the list of presentation format descriptors associated with this GattCharacteristic, in the order specified by the Aggregate Format Descriptor.

ProtectionLevel

Read/writeGets or sets the desired GATT security options for over the air communication with the device.

Service

Read-onlyGets

UserDescription

Read-onlyGet the user friendly description for this GattCharacteristic, if the User Description Descriptor is present, otherwise this will be an empty string.

Uuid

Read-onlyGets the GATT Characteristic UUID for this GattCharacteristic.

 

Remarks

The GattCharacteristic object represents a GATT Characteristic of a particular service, and is obtained from the Characteristics property of the GattDeviceService object.

Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

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

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8.1 [Windows Store apps, desktop apps]

Minimum supported server

None supported

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

Attributes

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

See also

Object

 

 

Show:
© 2015 Microsoft