esp-nimble-cpp 2.0.2
|
A model of a BLE descriptor. More...
#include <NimBLEDescriptor.h>
Inherits NimBLELocalValueAttribute.
Inherited by NimBLE2904.
Public Member Functions | |
NimBLEDescriptor (const char *uuid, uint16_t properties, uint16_t maxLen, NimBLECharacteristic *pCharacteristic=nullptr) | |
Construct a descriptor. | |
NimBLEDescriptor (const NimBLEUUID &uuid, uint16_t properties, uint16_t maxLen, NimBLECharacteristic *pCharacteristic=nullptr) | |
Construct a descriptor. | |
std::string | toString () const |
Return a string representation of the descriptor. | |
void | setCallbacks (NimBLEDescriptorCallbacks *pCallbacks) |
Set the callback handlers for this descriptor. | |
NimBLECharacteristic * | getCharacteristic () const |
Get the characteristic this descriptor belongs to. | |
A model of a BLE descriptor.
NimBLEDescriptor::NimBLEDescriptor | ( | const char * | uuid, |
uint16_t | properties, | ||
uint16_t | max_len, | ||
NimBLECharacteristic * | pCharacteristic = nullptr |
||
) |
Construct a descriptor.
[in] | uuid | - UUID (const char*) for the descriptor. |
[in] | properties | - Properties for the descriptor. |
[in] | max_len | - The maximum length in bytes that the descriptor value can hold. (Default: 512 bytes for esp32, 20 for all others). |
[in] | pCharacteristic | - pointer to the characteristic instance this descriptor belongs to. |
NimBLEDescriptor::NimBLEDescriptor | ( | const NimBLEUUID & | uuid, |
uint16_t | properties, | ||
uint16_t | max_len, | ||
NimBLECharacteristic * | pCharacteristic = nullptr |
||
) |
Construct a descriptor.
[in] | uuid | - UUID (const char*) for the descriptor. |
[in] | properties | - Properties for the descriptor. |
[in] | max_len | - The maximum length in bytes that the descriptor value can hold. (Default: 512 bytes for esp32, 20 for all others). |
[in] | pCharacteristic | - pointer to the characteristic instance this descriptor belongs to. |
NimBLECharacteristic * NimBLEDescriptor::getCharacteristic | ( | ) | const |
Get the characteristic this descriptor belongs to.
void NimBLEDescriptor::setCallbacks | ( | NimBLEDescriptorCallbacks * | pCallbacks | ) |
Set the callback handlers for this descriptor.
[in] | pCallbacks | An instance of a callback structure used to define any callbacks for the descriptor. |
std::string NimBLEDescriptor::toString | ( | ) | const |
Return a string representation of the descriptor.