diff --git a/src/NimBLECharacteristic.cpp b/src/NimBLECharacteristic.cpp index 23ca8ba..992e3e5 100644 --- a/src/NimBLECharacteristic.cpp +++ b/src/NimBLECharacteristic.cpp @@ -444,6 +444,13 @@ void NimBLECharacteristic::setCallbacks(NimBLECharacteristicCallbacks* pCallback } } // setCallbacks +/** + * @brief Get the callback handlers for this characteristic. + */ +NimBLECharacteristicCallbacks* NimBLECharacteristic::getCallbacks() { + return m_pCallbacks; +} //getCallbacks + /** * @brief Set the value of the characteristic. diff --git a/src/NimBLECharacteristic.h b/src/NimBLECharacteristic.h index 22670df..aee21b0 100644 --- a/src/NimBLECharacteristic.h +++ b/src/NimBLECharacteristic.h @@ -65,6 +65,8 @@ public: std::string toString(); void setCallbacks(NimBLECharacteristicCallbacks* pCallbacks); + NimBLECharacteristicCallbacks* + getCallbacks(); void indicate(); void notify(bool is_notification = true);