27
27
\brief GATT characteristic
28
28
*/
29
29
/* *************************************************************************/
30
- class GattCharacteristic : public GattAttribute
30
+ class GattCharacteristic
31
31
{
32
32
public:
33
33
enum {
@@ -322,11 +322,14 @@ class GattCharacteristic : public GattAttribute
322
322
GattCharacteristic (const UUID &uuid, uint8_t *valuePtr = NULL , uint16_t initialLen = 0 , uint16_t maxLen = 0 ,
323
323
uint8_t props = BLE_GATT_CHAR_PROPERTIES_NONE,
324
324
GattAttribute *descriptors[] = NULL , unsigned numDescriptors = 0 ) :
325
- GattAttribute (uuid, valuePtr, initialLen, maxLen), _properties(props), _descriptors(descriptors), _descriptorCount(numDescriptors) {
325
+ _valueAttribute (uuid, valuePtr, initialLen, maxLen), _properties(props), _descriptors(descriptors), _descriptorCount(numDescriptors) {
326
326
327
327
}
328
328
329
329
public:
330
+ GattAttribute& getValueAttribute () {
331
+ return _valueAttribute;
332
+ }
330
333
uint8_t getProperties (void ) const {
331
334
return _properties;
332
335
}
@@ -342,9 +345,10 @@ class GattCharacteristic : public GattAttribute
342
345
}
343
346
344
347
private:
345
- uint8_t _properties;
346
- GattAttribute ** _descriptors;
347
- uint8_t _descriptorCount;
348
+ GattAttribute _valueAttribute;
349
+ uint8_t _properties;
350
+ GattAttribute ** _descriptors;
351
+ uint8_t _descriptorCount;
348
352
};
349
353
350
354
#endif // ifndef __GATT_CHARACTERISTIC_H__
0 commit comments