未验证 提交 0aafa05e 编写于 作者: X xBiohazardx 提交者: GitHub

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

上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册