High level Bluetooth Low Energy API and radio abstraction layer
Fork of BLE_API by
Revision 115:47e4cdd7b0c5, committed 2014-08-29
- Comitter:
- carlescufi
- Date:
- Fri Aug 29 10:41:06 2014 +0200
- Parent:
- 114:f1ede142a78f
- Child:
- 116:ca826083980e
- Commit message:
- Move value attribute as member of the char class
Changed in this revision
public/GattCharacteristic.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/public/GattCharacteristic.h Thu Aug 28 15:50:29 2014 +0200 +++ b/public/GattCharacteristic.h Fri Aug 29 10:41:06 2014 +0200 @@ -27,7 +27,7 @@ \brief GATT characteristic */ /**************************************************************************/ -class GattCharacteristic : public GattAttribute +class GattCharacteristic { public: enum { @@ -322,11 +322,14 @@ GattCharacteristic(const UUID &uuid, uint8_t *valuePtr = NULL, uint16_t initialLen = 0, uint16_t maxLen = 0, uint8_t props = BLE_GATT_CHAR_PROPERTIES_NONE, GattAttribute *descriptors[] = NULL, unsigned numDescriptors = 0) : - GattAttribute(uuid, valuePtr, initialLen, maxLen), _properties(props), _descriptors(descriptors), _descriptorCount(numDescriptors) { + _valueAttribute(uuid, valuePtr, initialLen, maxLen), _properties(props), _descriptors(descriptors), _descriptorCount(numDescriptors) { } public: + GattAttribute& getValueAttribute() { + return _valueAttribute; + } uint8_t getProperties(void) const { return _properties; } @@ -342,9 +345,10 @@ } private: - uint8_t _properties; - GattAttribute ** _descriptors; - uint8_t _descriptorCount; + GattAttribute _valueAttribute; + uint8_t _properties; + GattAttribute ** _descriptors; + uint8_t _descriptorCount; }; #endif // ifndef __GATT_CHARACTERISTIC_H__