Unverified Commit 0aafa05e authored by xBiohazardx's avatar xBiohazardx Committed by GitHub

Added function to retrieve the amount of data received from an BLECharacteristic (#5339)

parent 16f4b0f5
......@@ -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.
......
......@@ -62,6 +62,7 @@ public:
BLEUUID getUUID();
std::string getValue();
uint8_t* getData();
uint8_t getLength();
void indicate();
void notify(bool is_notification = true);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment