mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2024-11-25 06:30:55 +01:00
Add method to get the callbacks from a characteristic.
This is useul to be able to unit/integration test the behavior of a characteristic.
This commit is contained in:
parent
946b971750
commit
9fa9531e50
2 changed files with 9 additions and 0 deletions
|
@ -444,6 +444,13 @@ void NimBLECharacteristic::setCallbacks(NimBLECharacteristicCallbacks* pCallback
|
||||||
}
|
}
|
||||||
} // setCallbacks
|
} // setCallbacks
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get the callback handlers for this characteristic.
|
||||||
|
*/
|
||||||
|
NimBLECharacteristicCallbacks* NimBLECharacteristic::getCallbacks() {
|
||||||
|
return m_pCallbacks;
|
||||||
|
} //getCallbacks
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set the value of the characteristic.
|
* @brief Set the value of the characteristic.
|
||||||
|
|
|
@ -65,6 +65,8 @@ public:
|
||||||
std::string toString();
|
std::string toString();
|
||||||
|
|
||||||
void setCallbacks(NimBLECharacteristicCallbacks* pCallbacks);
|
void setCallbacks(NimBLECharacteristicCallbacks* pCallbacks);
|
||||||
|
NimBLECharacteristicCallbacks*
|
||||||
|
getCallbacks();
|
||||||
|
|
||||||
void indicate();
|
void indicate();
|
||||||
void notify(bool is_notification = true);
|
void notify(bool is_notification = true);
|
||||||
|
|
Loading…
Reference in a new issue