NimBLE-Arduino
NimBLE-Arduino copied to clipboard
[BREAKING] Refactor attributes
Refactor attributes to reduce code duplication and improve maintainability.
- Add attribute base classes to provide common code.
- Add const where possible to functions and parameters.
-
NimBLECharacteristic::notifyno longer takes abool is_notificationparameter, insteadindicate()should be called to send indications. -
NimBLECharacteristic::indicatenow takes the same parameters asnotify. -
NimBLECharacteristicCallbacksandNimBLEDescriptorCallbacksmethods now takeconst NimBLEConnInfo&instead of non-const. -
NimBLECharacteristic::onNotifycallback removed as unnecessary, the library does not call notify without app input. - Add NimBLEUUID constructor that takes a reference to
ble_uuid_any_t. -
NimBLERemoteService::getCharacteristicsnow returns aconst std::vector<NimBLERemoteCharacteristic*>&instead of non-conststd::vector<NimBLERemoteCharacteristic*>* -
NimBLERemoteService::getValuenow returnsNimBLEAttValueinstead ofstd::string -
NimBLEService::getCharacteristicsnow returns aconst std::vector<NimBLECharacteristic*>&instead of a copy of std::vector<NimBLECharacteristic *>.