fka mod
Fork of BLE_API by
Diff: ble/GattCharacteristic.h
- Revision:
- 1054:f59e5d9a992a
- Parent:
- 1053:ec4a5b9b254e
- Child:
- 1131:692ddf04fc42
--- a/ble/GattCharacteristic.h Mon Jan 11 08:51:32 2016 +0000 +++ b/ble/GattCharacteristic.h Mon Jan 11 08:51:33 2016 +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 */ } };