Skip to content

Commit 51c693c

Browse files
authored
Update NimBLECharacteristic.cpp
1 parent a1a6ee8 commit 51c693c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/NimBLECharacteristic.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,15 @@ uint8_t* NimBLECharacteristic::getData() {
198198
} // getData
199199

200200

201+
/**
202+
* @brief Retrieve the the current data length of the characteristic.
203+
* @return The length of the current characteristic data.
204+
*/
205+
size_t NimBLECharacteristic:: getDataLength() {
206+
return m_value.getLength();
207+
}
208+
209+
201210
int NimBLECharacteristic::handleGapEvent(uint16_t conn_handle, uint16_t attr_handle,
202211
struct ble_gatt_access_ctxt *ctxt,
203212
void *arg)
@@ -637,4 +646,4 @@ void NimBLECharacteristicCallbacks::onStatus(NimBLECharacteristic* pCharacterist
637646
NIMBLE_LOGD("NimBLECharacteristicCallbacks", "onStatus: default");
638647
} // onStatus
639648

640-
#endif /* CONFIG_BT_ENABLED */
649+
#endif /* CONFIG_BT_ENABLED */

0 commit comments

Comments
 (0)