Lightly modified version of the BLE stack, that doesn't bring up a DFUService by default... as we have our own.
Fork of BLE_API by
Diff: public/GattCharacteristic.h
- Revision:
- 115:47e4cdd7b0c5
- Parent:
- 114:f1ede142a78f
- Child:
- 118:620d28e7a1ba
diff -r f1ede142a78f -r 47e4cdd7b0c5 public/GattCharacteristic.h --- 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__