Lancaster University's fork of the mbed BLE API. Lives on github, https://github.com/lancaster-university/BLE_API
Dependents: microbit-dal microbit-dal microbit-ble-open microbit-dal ... more
Fork of BLE_API by
Diff: ble/GattAttribute.h
- Revision:
- 1131:73c11a85c6d6
- Parent:
- 1054:f59e5d9a992a
- Child:
- 1132:be7a1281777f
--- a/ble/GattAttribute.h Tue Jan 12 19:47:52 2016 +0000 +++ b/ble/GattAttribute.h Wed Apr 06 18:40:26 2016 +0100 @@ -37,8 +37,6 @@ * The length in bytes of this attribute's value. * @param[in] maxLen * The max length in bytes of this attribute's value. - * @param[in] hasVariableLen - * Whether the attribute's value length changes overtime. * * @section EXAMPLE * @@ -49,27 +47,25 @@ * * @endcode */ - GattAttribute(const UUID &uuid, uint8_t *valuePtr = NULL, uint16_t len = 0, uint16_t maxLen = 0, bool hasVariableLen = true) : - _uuid(uuid), _valuePtr(valuePtr), _lenMax(maxLen), _len(len), _hasVariableLen(hasVariableLen), _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 */ } public: - Handle_t getHandle(void) const {return _handle; } - const UUID &getUUID(void) const {return _uuid; } - uint16_t getLength(void) const {return _len; } - uint16_t getMaxLength(void) const {return _lenMax; } - uint16_t *getLengthPtr(void) {return &_len; } - void setHandle(Handle_t id) {_handle = id; } - uint8_t *getValuePtr(void) {return _valuePtr; } - bool hasVariableLength(void) const {return _hasVariableLen;} + Handle_t getHandle(void) const {return _handle; } + const UUID &getUUID(void) const {return _uuid; } + uint16_t getLength(void) const {return _len; } + uint16_t getMaxLength(void) const {return _lenMax; } + uint16_t *getLengthPtr(void) {return &_len; } + void setHandle(Handle_t id) {_handle = id; } + uint8_t *getValuePtr(void) {return _valuePtr; } private: - UUID _uuid; /* Characteristic UUID. */ + UUID _uuid; /* Characteristic UUID. */ uint8_t *_valuePtr; - uint16_t _lenMax; /* Maximum length of the value. */ - uint16_t _len; /* Current length of the value. */ - bool _hasVariableLen; + uint16_t _lenMax; /* Maximum length of the value. */ + uint16_t _len; /* Current length of the value. */ Handle_t _handle; private: