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.
Fork of BLE_API by
Diff: ble/GattCharacteristic.h
- Revision:
- 1017:ccb8c0646e55
- Parent:
- 1013:663fe7dada7d
- Child:
- 1019:575852ad31a2
diff -r 1a37289c954e -r ccb8c0646e55 ble/GattCharacteristic.h --- a/ble/GattCharacteristic.h Wed Dec 02 12:57:29 2015 +0000 +++ b/ble/GattCharacteristic.h Thu Dec 10 09:15:01 2015 +0000 @@ -307,12 +307,10 @@ * The memory holding the initial value. The value is copied * into the stack when the enclosing service is added, and * is thereafter maintained internally by the stack. - * @param[in] len - * The length in bytes of this characteristic's value. + * @param[in] initialLen + * The min 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 @@ -323,20 +321,19 @@ * @param[in] numDescriptors * The number of descriptors in the previous array. * - * @NOTE: If valuePtr == NULL, length == 0, and properties == READ + * @NOTE: If valuePtr == NULL, initialLength == 0, and properties == READ * for the value attribute of a characteristic, then that particular * characteristic may be considered optional and dropped while * instantiating the service with the underlying BLE stack. */ GattCharacteristic(const UUID &uuid, uint8_t *valuePtr = NULL, - uint16_t len = 0, + uint16_t initialLen = 0, uint16_t maxLen = 0, uint8_t props = BLE_GATT_CHAR_PROPERTIES_NONE, GattAttribute *descriptors[] = NULL, - unsigned numDescriptors = 0, - bool hasVariableLen = true) : - _valueAttribute(uuid, valuePtr, len, maxLen, hasVariableLen), + unsigned numDescriptors = 0) : + _valueAttribute(uuid, valuePtr, initialLen, maxLen), _properties(props), _requiredSecurity(SecurityManager::SECURITY_MODE_ENCRYPTION_OPEN_LINK), _descriptors(descriptors), @@ -469,7 +466,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, false) { + BLE_GATT_CHAR_PROPERTIES_READ | additionalProperties, descriptors, numDescriptors) { /* empty */ } }; @@ -525,7 +522,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, false) { + BLE_GATT_CHAR_PROPERTIES_READ | additionalProperties, descriptors, numDescriptors) { /* empty */ } };