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: BLE_PowerBank_HeyFaradey
Fork of BLE_API by
Diff: ble/GattAttribute.h
- Revision:
- 1053:ec4a5b9b254e
- Parent:
- 1048:efb29faf12fc
- Child:
- 1054:f59e5d9a992a
diff -r b55e1ad3e1b3 -r ec4a5b9b254e ble/GattAttribute.h
--- a/ble/GattAttribute.h Mon Jan 11 08:51:31 2016 +0000
+++ b/ble/GattAttribute.h Mon Jan 11 08:51:32 2016 +0000
@@ -33,8 +33,8 @@
* The UUID to use for this attribute.
* @param[in] valuePtr
* The memory holding the initial value.
- * @param[in] initialLen
- * The min length in bytes of this attribute's value.
+ * @param[in] len
+ * The length in bytes of this attribute's value.
* @param[in] maxLen
* The max length in bytes of this attribute's value.
*
@@ -47,8 +47,8 @@
*
* @endcode
*/
- GattAttribute(const UUID &uuid, uint8_t *valuePtr = NULL, uint16_t initialLen = 0, uint16_t maxLen = 0) :
- _uuid(uuid), _valuePtr(valuePtr), _initialLen(initialLen), _lenMax(maxLen), _len(initialLen), _handle() {
+ GattAttribute(const UUID &uuid, uint8_t *valuePtr = NULL, uint16_t len = 0, uint16_t maxLen = 0) :
+ _uuid(uuid), _valuePtr(valuePtr), _lenMax(maxLen), _len(len), _handle() {
/* Empty */
}
@@ -56,7 +56,6 @@
Handle_t getHandle(void) const {return _handle; }
const UUID &getUUID(void) const {return _uuid; }
uint16_t getLength(void) const {return _len; }
- uint16_t getInitialLength(void) const {return _initialLen;}
uint16_t getMaxLength(void) const {return _lenMax; }
uint16_t *getLengthPtr(void) {return &_len; }
void setHandle(Handle_t id) {_handle = id; }
@@ -65,7 +64,6 @@
private:
UUID _uuid; /* Characteristic UUID. */
uint8_t *_valuePtr;
- uint16_t _initialLen; /* Initial length of the value. */
uint16_t _lenMax; /* Maximum length of the value. */
uint16_t _len; /* Current length of the value. */
Handle_t _handle;
