Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
8 changes: 8 additions & 0 deletions src/BLECharacteristic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,14 @@ uint8_t* BLECharacteristic::getData() {
return m_value.getData();
} // getData

/**
* @brief Retrieve the current length of the raw data of the characteristic.
* @return The length of the current characteristic data in bytes.
*/
uint8_t* BLECharacteristic::getLength() {
return m_value.getLength();
} // getLength


/**
* Handle a GATT server event.
Expand Down
1 change: 1 addition & 0 deletions 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();
size_t getLength();

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