SDK
23.9.2
For IoT System Software Development
|
Descriptor for Characteristic Presentation Format. More...
#include <BLE2904.hpp>
Public Member Functions | |
void | setDescription (uint16_t) |
Set the description. | |
void | setExponent (int8_t exponent) |
Set the exponent. | |
void | setFormat (uint8_t format) |
Set the format. | |
void | setNamespace (uint8_t namespace_value) |
Set the namespace. | |
void | setUnit (uint16_t unit) |
Set the units for this value. It should be one of the encoded values defined here: https://www.bluetooth.com/specifications/assigned-numbers/units. More... | |
Public Member Functions inherited from BLEDescriptor | |
BLEDescriptor (const char *uuid, uint16_t max_len=100) | |
BLEDescriptor constructor. | |
BLEDescriptor (BLEUUID uuid, uint16_t max_len=100) | |
BLEDescriptor constructor. | |
virtual | ~BLEDescriptor () |
BLEDescriptor destructor. | |
uint16_t | getHandle () |
Get the BLE handle for this descriptor. More... | |
size_t | getLength () |
Get the length of the value of this descriptor. More... | |
BLEUUID | getUUID () |
Get the UUID of the descriptor. | |
uint8_t * | getValue () |
Get the value of this descriptor. More... | |
void | handleGATTServerEvent (void *info) |
void | setAccessPermissions (ble_gatt_perm_t perm) |
void | setCallbacks (BLEDescriptorCallbacks *pCallbacks) |
Set the callback handlers for this descriptor. More... | |
void | setValue (uint8_t *data, size_t size) |
Set the value of the descriptor. More... | |
void | setValue (std::string value) |
Set the value of the descriptor. More... | |
std::string | toString () |
Return a string representation of the descriptor. More... | |
Descriptor for Characteristic Presentation Format.
This is a convenience descriptor for the Characteristic Presentation Format which has a UUID of 0x2904.
void BLE2904::setUnit | ( | uint16_t | unit | ) |
Set the units for this value. It should be one of the encoded values defined here: https://www.bluetooth.com/specifications/assigned-numbers/units.
[in] | unit | The type of units of this characteristic as defined by assigned numbers. |