diff options
author | Sven Gothel <[email protected]> | 2020-07-25 07:45:50 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-07-25 07:45:50 +0200 |
commit | 28ee10141fbd4874f8f78c0c699d5e62635f77f6 (patch) | |
tree | 757a93a731daef7abf8c6247125422d712c0a109 /api/direct_bt/GATTHandler.hpp | |
parent | 537b779c122605865f541a89a45b8d205dad5fb8 (diff) |
GATTCharacteristic: Add enableNotificationOrIndication(..)..; DIRECTBT_CHARACTERISTIC_VALUE_CACHE_NOTIFICATION_COMPATv2.1.15
GATTCharacteristic (Java/C++): Add enableNotificationOrIndication(..) and use it as default for BLE active addCharacteristicListener(..).
It is recommended to utilize notification over indication, as its link-layer handshake
and higher potential bandwidth may deliver material higher performance.
+++
Add setting BluetoothFactory.DIRECTBT_CHARACTERISTIC_VALUE_CACHE_NOTIFICATION_COMPAT
(and also document DEBUG and VERBOSE).
DIRECTBT_CHARACTERISTIC_VALUE_CACHE_NOTIFICATION_COMPAT
Have direct_bt provide compatibility to TinyB's BluetoothGattCharacteristic
API: BluetoothGattCharacteristic#getValue() value cache and
BluetoothGattCharacteristic#enableValueNotifications(BluetoothNotification) value notification.
DBTGattCharacteristic benefits from _disabled_ compatibility (and DEBUG)
performance wise, as no listener nor cache needs to be added in this case!
Diffstat (limited to 'api/direct_bt/GATTHandler.hpp')
-rw-r--r-- | api/direct_bt/GATTHandler.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/api/direct_bt/GATTHandler.hpp b/api/direct_bt/GATTHandler.hpp index 40162184..3f671fe8 100644 --- a/api/direct_bt/GATTHandler.hpp +++ b/api/direct_bt/GATTHandler.hpp @@ -313,6 +313,10 @@ namespace direct_bt { * Method enables notification and/or indication for the corresponding characteristic at BLE level. * </p> * <p> + * It is recommended to utilize notification over indication, as its link-layer handshake + * and higher potential bandwidth may deliver material higher performance. + * </p> + * <p> * Throws an IllegalArgumentException if the given GATTDescriptor is not a ClientCharacteristicConfiguration. * </p> */ |