Class GattLocalCharacteristic
- 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
Descriptors
Gets a vector list of all the descriptors for this local characteristic.
public GattLocalDescriptor[] Descriptors { get; }
Property Value
PresentationFormats
Gets the presentation formats for this local characteristic.
public GattPresentationFormat[] PresentationFormats { get; }
Property Value
ReadProtectionLevel
Gets the read protection level of this local characteristic.
public GattProtectionLevel ReadProtectionLevel { get; }
Property Value
StaticValue
Gets the static value for this local GATT characteristic.
public Buffer StaticValue { get; }
Property Value
SubscribedClients
Gets an array of all clients that are subscribed to this local characteristic.
public GattSubscribedClient[] SubscribedClients { get; }
Property Value
UserDescription
Gets the user-friendly description for this local characteristic.
public string UserDescription { get; }
Property Value
Uuid
Gets the BluetoothSIG-defined UUID for this local characteristic.
public Guid Uuid { get; }
Property Value
WriteProtectionLevel
Gets the write protection level of this local characteristic.
public GattProtectionLevel WriteProtectionLevel { get; }
Property Value
Methods
CreateDescriptor(Guid, GattLocalDescriptorParameters)
Creates descriptor for this local characteristic.
public GattLocalDescriptorResult CreateDescriptor(Guid descriptorUuid, GattLocalDescriptorParameters parameters)
Parameters
descriptorUuid
GuidThe descriptor UUID.
parameters
GattLocalDescriptorParametersThe 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
BufferThe 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
BufferThe buffer that contains the value to send to the GattSubscribedClient
subscribedClient
GattSubscribedClientThe subscribed client notify the value.
Returns
Events
ReadRequested
An event that is triggered when a GATT client requests a read operation.
public event GattLocalCharacteristic.GattLocalCharacteristicReadEventHandler ReadRequested
Event Type
SubscribedClientsChanged
An event that triggers when clients subscribed to this local characteristic changes.
public event GattLocalCharacteristic.GattLocalCharacteristicClientsChangedEventHandler SubscribedClientsChanged
Event Type
WriteRequested
This is an event that is triggered when a write was requested.
public event GattLocalCharacteristic.GattLocalCharacteristicWriteEventHandler WriteRequested