forked from h2zero/esp-nimble-cpp
Breaking: Use std::vector instead of std::map in client classes (#46)
* Exchange map for vector, saving 1,076 bytes of program memory and 5,024 bytes of heap for a small device (LYWSD03MMC) * Removing m_characteristicMapByHandle (using the handles form m_characteristicVector instead) saving in total (compared to the current master) 1,508 bytes of program memory and 6,500 bytes of heap for a small device (LYWSD03MMC) * Change NimBLEScan container from std::map to std::vector * Add function to get advertised device by address * Update documentation
This commit is contained in:
1 parent
fc1022a46d
commit
6f4ee4b498
10 files changed
+169
-142
No files matched your search
@@ -1,7 +1,14 @@
|
||||
# *** UPDATE ***
|
||||
Client long read/write characteristics/descriptors now working.
|
||||
We are now nearing 100% replacement of the original cpp_utils BLE library :smile:
|
||||
**Breaking change:** Client and scan now use `std::vector` instead of `std::map` for storing the remote attribute database.
|
||||
|
||||
This change will affect your application code if you use `NimBLEClient::getServices()` or `NimBLERemoteService::getCharacteristics()`
|
||||
in your application as they now return a pointer to `std::vector` of the respective attributes.
|
||||
|
||||
In addition `NimBLERemoteService::getCharacteristicsByHandle()` has been removed as it is no longer maintained in the library.
|
||||
|
||||
These changes were necessary due to the amount of resources required to use `std::map`, it was not justifed by any benfit it provided.
|
||||
|
||||
It is expected that there will be minimal impact on most applications, if you need help adjusting your code please create an issue.
|
||||
|
||||
# esp-nimble-cpp
|
||||
NimBLE CPP library for use with ESP32 that attempts to maintain compatibility with the @nkolban cpp_uitls API.
|
||||
|
||||
Reference in new issue
Block a user