Table of Contents

Class GattLocalCharacteristic

Namespace
nanoFramework.Device.Bluetooth.GenericAttributeProfile
Assembly
nanoFramework.Device.Bluetooth.dll

This class represents a local characteristic.

public class GattLocalCharacteristic
Inheritance
GattLocalCharacteristic
Inherited Members
Extension Methods

Properties

CharacteristicProperties

Gets the local characteristic properties.

public GattCharacteristicProperties CharacteristicProperties { get; }

Property Value

GattCharacteristicProperties

Descriptors

Gets a vector list of all the descriptors for this local characteristic.

public GattLocalDescriptor[] Descriptors { get; }

Property Value

GattLocalDescriptor[]

PresentationFormats

Gets the presentation formats for this local characteristic.

public GattPresentationFormat[] PresentationFormats { get; }

Property Value

GattPresentationFormat[]

ReadProtectionLevel

Gets the read protection level of this local characteristic.

public GattProtectionLevel ReadProtectionLevel { get; }

Property Value

GattProtectionLevel

StaticValue

Gets the static value for this local GATT characteristic.

public Buffer StaticValue { get; }

Property Value

Buffer

SubscribedClients

Gets an array of all clients that are subscribed to this local characteristic.

public GattSubscribedClient[] SubscribedClients { get; }

Property Value

GattSubscribedClient[]

UserDescription

Gets the user-friendly description for this local characteristic.

public string UserDescription { get; }

Property Value

string

Uuid

Gets the BluetoothSIG-defined UUID for this local characteristic.

public Guid Uuid { get; }

Property Value

Guid

WriteProtectionLevel

Gets the write protection level of this local characteristic.

public GattProtectionLevel WriteProtectionLevel { get; }

Property Value

GattProtectionLevel

Methods

CreateDescriptor(Guid, GattLocalDescriptorParameters)

Creates descriptor for this local characteristic.

public GattLocalDescriptorResult CreateDescriptor(Guid descriptorUuid, GattLocalDescriptorParameters parameters)

Parameters

descriptorUuid Guid

The descriptor UUID.

parameters GattLocalDescriptorParameters

The parameters for the descriptor.

Returns

GattLocalDescriptorResult

A GattLocalDescriptorResult object.

NotifyValue(Buffer)

Send and notifies all subscribed clients a GattSubscribedClient of a value.

public GattClientNotificationResult[] NotifyValue(Buffer value)

Parameters

value Buffer

The buffer that contains the value to send to the GattSubscribedClient.

Returns

GattClientNotificationResult[]

An array of all the GattClientNotificationResult for each subscribed client.

NotifyValue(Buffer, GattSubscribedClient)

Sends and notifies a GattSubscribedClient of a value.

public GattClientNotificationResult NotifyValue(Buffer value, GattSubscribedClient subscribedClient)

Parameters

value Buffer

The buffer that contains the value to send to the GattSubscribedClient

subscribedClient GattSubscribedClient

The subscribed client notify the value.

Returns

GattClientNotificationResult

Events

ReadRequested

An event that is triggered when a GATT client requests a read operation.

public event GattLocalCharacteristic.GattLocalCharacteristicReadEventHandler ReadRequested

Event Type

GattLocalCharacteristic.GattLocalCharacteristicReadEventHandler

SubscribedClientsChanged

An event that triggers when clients subscribed to this local characteristic changes.

public event GattLocalCharacteristic.GattLocalCharacteristicClientsChangedEventHandler SubscribedClientsChanged

Event Type

GattLocalCharacteristic.GattLocalCharacteristicClientsChangedEventHandler

WriteRequested

This is an event that is triggered when a write was requested.

public event GattLocalCharacteristic.GattLocalCharacteristicWriteEventHandler WriteRequested

Event Type

GattLocalCharacteristic.GattLocalCharacteristicWriteEventHandler