@@ -297,7 +297,7 @@ class GattCharacteristic : public GattAttribute
297
297
uint16_t gatt_nsdesc; /* *< Namespace description from Bluetooth Assigned Numbers, normally '0', see @ref BLE_GATT_CPF_NAMESPACES. */
298
298
} presentation_format_t ;
299
299
300
- /* *
300
+ /* *
301
301
* @brief Creates a new GattCharacteristic using the specified 16-bit
302
302
* UUID, value length, and properties
303
303
*
@@ -313,31 +313,28 @@ class GattCharacteristic : public GattAttribute
313
313
* The max length in bytes of this characteristic's value
314
314
* @param[in] props
315
315
* The 8-bit bit field containing the characteristic's properties
316
- *
317
- * @section EXAMPLE
318
- *
319
- * @code
320
- *
321
- * // UUID = 0x2A19, Min length 2, Max len = 2, Properties = write
322
- * GattCharacteristic c = GattCharacteristic( 0x2A19, 2, 2, BLE_GATT_CHAR_PROPERTIES_WRITE );
323
- *
324
- * @endcode
316
+ * @param[in] descriptors
317
+ * A pointer to an array of descriptors to be included within this characteristic
318
+ * @param[in] numDescriptors
319
+ * The number of descriptors
325
320
*/
326
321
/* *************************************************************************/
327
322
GattCharacteristic (const UUID &uuid, uint8_t *valuePtr = NULL , uint16_t initialLen = 0 , uint16_t maxLen = 0 ,
328
- uint8_t props = BLE_GATT_CHAR_PROPERTIES_NONE) :
329
- GattAttribute (uuid, valuePtr, initialLen, maxLen), _properties(props) {
330
- /* empty */
323
+ uint8_t props = BLE_GATT_CHAR_PROPERTIES_NONE,
324
+ GattAttribute *descriptors[] = NULL , unsigned numDescriptors = 0 ) :
325
+ GattAttribute (uuid, valuePtr, initialLen, maxLen), _properties(props), _descriptors(descriptors), _descriptorCount(numDescriptors) {
326
+
331
327
}
332
328
333
329
public:
334
330
uint8_t getProperties (void ) const {
335
331
return _properties;
336
332
}
337
333
338
-
339
334
private:
340
335
uint8_t _properties;
336
+ GattAttribute ** _descriptors;
337
+ uint8_t _descriptorCount;
341
338
};
342
339
343
340
#endif // ifndef __GATT_CHARACTERISTIC_H__
0 commit comments