Server: Add onSubscribe() callback for characteristics. (#21)

Server: Add onSubscribe() callback for characteristics.

Adds a new method to NimBLECharacteristicCallbacks that gets called when a client
changes it's subscription status.

* Remove NimBLE2902 class.

As the NimBLE2902 class usefulness was only related to callback functions that were replaced
by the NimBLECharacteristicCallbacks:onSubscribe() method this removes the NimBLE2902 class and
moves all subscription handling to NimBLECharacteristic.

* Update documents and examples to reflect this change.

* Add getSubscribedCount() to get the number of subscribed clients.
This commit is contained in:
h2zero
2020-07-27 21:11:38 -06:00
committed by GitHub
parent fe4586a3ca
commit 4723b1cc53
9 changed files with 93 additions and 236 deletions
-1
View File
@@ -106,7 +106,6 @@ public:
};
#include "NimBLE2904.h"
#include "NimBLE2902.h"
#endif // #if defined(CONFIG_BT_NIMBLE_ROLE_PERIPHERAL)
#endif /* CONFIG_BT_ENABLED */