just a fork

Fork of BLE_API by Bluetooth Low Energy

Revision:
1020:c8664d12bf10
Parent:
1019:575852ad31a2
Child:
1028:9dc2ab644517
--- a/ble/GattCharacteristic.h	Thu Dec 10 09:15:01 2015 +0000
+++ b/ble/GattCharacteristic.h	Thu Dec 10 09:15:02 2015 +0000
@@ -311,6 +311,8 @@
      *              The length in bytes of this characteristic's value.
      *  @param[in]  maxLen
      *              The max length in bytes of this characteristic's value.
+     *  @param[in]  hasVariableLen
+     *              Whether the attribute's value length changes over time.
      *  @param[in]  props
      *              The 8-bit field containing the characteristic's properties.
      *  @param[in]  descriptors
@@ -332,8 +334,9 @@
                        uint16_t       maxLen         = 0,
                        uint8_t        props          = BLE_GATT_CHAR_PROPERTIES_NONE,
                        GattAttribute *descriptors[]  = NULL,
-                       unsigned       numDescriptors = 0) :
-        _valueAttribute(uuid, valuePtr, len, maxLen),
+                       unsigned       numDescriptors = 0,
+                       bool           hasVariableLen = true) :
+        _valueAttribute(uuid, valuePtr, len, maxLen, hasVariableLen),
         _properties(props),
         _requiredSecurity(SecurityManager::SECURITY_MODE_ENCRYPTION_OPEN_LINK),
         _descriptors(descriptors),
@@ -466,7 +469,7 @@
                                   GattAttribute *descriptors[]        = NULL,
                                   unsigned       numDescriptors       = 0) :
         GattCharacteristic(uuid, reinterpret_cast<uint8_t *>(valuePtr), sizeof(T), sizeof(T),
-                           BLE_GATT_CHAR_PROPERTIES_READ | additionalProperties, descriptors, numDescriptors) {
+                           BLE_GATT_CHAR_PROPERTIES_READ | additionalProperties, descriptors, numDescriptors, false) {
         /* empty */
     }
 };
@@ -522,7 +525,7 @@
                                                      GattAttribute *descriptors[]        = NULL,
                                                      unsigned       numDescriptors       = 0) :
         GattCharacteristic(uuid, reinterpret_cast<uint8_t *>(valuePtr), sizeof(T) * NUM_ELEMENTS, sizeof(T) * NUM_ELEMENTS,
-                           BLE_GATT_CHAR_PROPERTIES_READ | additionalProperties, descriptors, numDescriptors) {
+                           BLE_GATT_CHAR_PROPERTIES_READ | additionalProperties, descriptors, numDescriptors, false) {
         /* empty */
     }
 };