forked from h2zero/esp-nimble-cpp
Add feature: remove service (#17)
* Get service handles on server start * remove service + indicate service changed * Reset gatt services when no connections active and services changed. * NimBLEServer::createService can now be used any time and will send service changed indication if server was already active. * Add ability to remove advertised serviceUUIDS * Adds addService() method to server to be allow user to re-add a service previously removed * Add destructior to NimBLEServer, NimBLEService and NimBLECharacteristic to release allocated resources.
This commit is contained in:
@ -43,6 +43,14 @@ as a type specified by the user.
|
||||
A new method `NimBLEServer::advertiseOnDisconnect(bool)` has been implemented to control this, true(default) = enabled.
|
||||
<br/>
|
||||
|
||||
`NimBLEServer::removeService` takes an additional parameter `bool deleteSvc` that if true will delete the service
|
||||
and all characteristics / descriptors belonging to it and invalidating any pointers to them.
|
||||
|
||||
If false the service is only removed from visibility by clients. The pointers to the service and
|
||||
it's characteristics / descriptors will remain valid and the service can be re-added in the future
|
||||
using `NimBLEServer::addService`.
|
||||
<br/>
|
||||
|
||||
# Client
|
||||
|
||||
NimBLERemoteCharacteristic::readValue(time_t\*, bool)
|
||||
|
Reference in New Issue
Block a user