esp-nimble-cpp
1.3.2
|
A model of a BLE descriptor. More...
Inherited by NimBLE2904.
Public Member Functions | |
NimBLEDescriptor (const char *uuid, uint16_t properties, uint16_t max_len, NimBLECharacteristic *pCharacteristic=nullptr) | |
NimBLEDescriptor constructor. | |
NimBLEDescriptor (NimBLEUUID uuid, uint16_t properties, uint16_t max_len, NimBLECharacteristic *pCharacteristic=nullptr) | |
NimBLEDescriptor constructor. | |
~NimBLEDescriptor () | |
NimBLEDescriptor destructor. | |
uint16_t | getHandle () |
Get the BLE handle for this descriptor. More... | |
NimBLEUUID | getUUID () |
Get the UUID of the descriptor. | |
std::string | toString () |
Return a string representation of the descriptor. More... | |
void | setCallbacks (NimBLEDescriptorCallbacks *pCallbacks) |
Set the callback handlers for this descriptor. More... | |
size_t | getLength () |
Get the length of the value of this descriptor. More... | |
uint8_t * | getValue () |
Get the value of this descriptor. More... | |
std::string | getStringValue () |
Get the value of this descriptor as a string. More... | |
void | setValue (const uint8_t *data, size_t size) |
Set the value of the descriptor. More... | |
void | setValue (const std::string &value) |
Set the value of the descriptor. More... | |
NimBLECharacteristic * | getCharacteristic () |
Get the characteristic this descriptor belongs to. More... | |
template<typename T > | |
void | setValue (const T &s) |
Convenience template to set the descriptor value to <type>val. More... | |
A model of a BLE descriptor.
NimBLECharacteristic * NimBLEDescriptor::getCharacteristic | ( | ) |
Get the characteristic this descriptor belongs to.
uint16_t NimBLEDescriptor::getHandle | ( | ) |
Get the BLE handle for this descriptor.
size_t NimBLEDescriptor::getLength | ( | ) |
Get the length of the value of this descriptor.
std::string NimBLEDescriptor::getStringValue | ( | ) |
Get the value of this descriptor as a string.
uint8_t * NimBLEDescriptor::getValue | ( | ) |
Get the value of this descriptor.
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. |
void NimBLEDescriptor::setValue | ( | const std::string & | value | ) |
Set the value of the descriptor.
[in] | value | The value of the descriptor in string form. |
|
inline |
Convenience template to set the descriptor value to <type>val.
[in] | s | The value to set. |
void NimBLEDescriptor::setValue | ( | const uint8_t * | data, |
size_t | length | ||
) |
Set the value of the descriptor.
[in] | data | The data to set for the descriptor. |
[in] | length | The length of the data in bytes. |
std::string NimBLEDescriptor::toString | ( | ) |
Return a string representation of the descriptor.