Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions libraries/BLE/src/BLECharacteristic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,13 @@ uint8_t* BLECharacteristic::getData() {
return m_value.getData();
} // getData

/**
* @brief Retrieve the current length of the data of the characteristic.
* @return Amount of databytes of the characteristic.
*/
uint8_t BLECharacteristic::getLength() {
return m_value.getLength();
} // getLength

/**
* Handle a GATT server event.
Expand Down
1 change: 1 addition & 0 deletions libraries/BLE/src/BLECharacteristic.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class BLECharacteristic {
BLEUUID getUUID();
std::string getValue();
uint8_t* getData();
uint8_t getLength();

void indicate();
void notify(bool is_notification = true);
Expand Down