Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: microbit-dal microbit-dal microbit-ble-open microbit-dal ... more
Fork of BLE_API by
Diff: ble/GattCharacteristic.h
- Revision:
- 1132:be7a1281777f
- Parent:
- 1131:73c11a85c6d6
--- a/ble/GattCharacteristic.h Wed Apr 06 18:40:26 2016 +0100
+++ b/ble/GattCharacteristic.h Wed Apr 06 18:40:27 2016 +0100
@@ -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 */
}
};
