Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of BLE_API by
GattCharacteristic.h@2:ffc5216bd2cc, 2013-12-10 (annotated)
- Committer:
- ktownsend
- Date:
- Tue Dec 10 07:32:12 2013 +0000
- Revision:
- 2:ffc5216bd2cc
- Child:
- 4:50a31ff5f974
UART Tests
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| ktownsend | 2:ffc5216bd2cc | 1 | #ifndef __GATT_CHARACTERISTIC_H__ |
| ktownsend | 2:ffc5216bd2cc | 2 | #define __GATT_CHARACTERISTIC_H__ |
| ktownsend | 2:ffc5216bd2cc | 3 | |
| ktownsend | 2:ffc5216bd2cc | 4 | #include "blecommon.h" |
| ktownsend | 2:ffc5216bd2cc | 5 | #include "uuid.h" |
| ktownsend | 2:ffc5216bd2cc | 6 | |
| ktownsend | 2:ffc5216bd2cc | 7 | class GattCharacteristic |
| ktownsend | 2:ffc5216bd2cc | 8 | { |
| ktownsend | 2:ffc5216bd2cc | 9 | private: |
| ktownsend | 2:ffc5216bd2cc | 10 | |
| ktownsend | 2:ffc5216bd2cc | 11 | public: |
| ktownsend | 2:ffc5216bd2cc | 12 | GattCharacteristic(uint16_t uuid, uint16_t minLen, uint16_t maxLen, uint8_t properties); |
| ktownsend | 2:ffc5216bd2cc | 13 | virtual ~GattCharacteristic(void); |
| ktownsend | 2:ffc5216bd2cc | 14 | |
| ktownsend | 2:ffc5216bd2cc | 15 | uint16_t uuid; /* Characteristic UUID */ |
| ktownsend | 2:ffc5216bd2cc | 16 | uint16_t lenMin; /* Minimum length of the value */ |
| ktownsend | 2:ffc5216bd2cc | 17 | uint16_t lenMax; /* Maximum length of the value */ |
| ktownsend | 2:ffc5216bd2cc | 18 | uint8_t index; |
| ktownsend | 2:ffc5216bd2cc | 19 | |
| ktownsend | 2:ffc5216bd2cc | 20 | struct Properties |
| ktownsend | 2:ffc5216bd2cc | 21 | { |
| ktownsend | 2:ffc5216bd2cc | 22 | /* Standard properties */ |
| ktownsend | 2:ffc5216bd2cc | 23 | uint8_t broadcast :1; /**< Broadcasting of value permitted. */ |
| ktownsend | 2:ffc5216bd2cc | 24 | uint8_t read :1; /**< Reading value permitted. */ |
| ktownsend | 2:ffc5216bd2cc | 25 | uint8_t write_wo_resp :1; /**< Writing value with Write Command permitted. */ |
| ktownsend | 2:ffc5216bd2cc | 26 | uint8_t write :1; /**< Writing value with Write Request permitted. */ |
| ktownsend | 2:ffc5216bd2cc | 27 | uint8_t notify :1; /**< Notications of value permitted. */ // https://developer.bluetooth.org/gatt/descriptors/Pages/DescriptorViewer.aspx?u=org.bluetooth.descriptor.gatt.client_characteristic_configuration.xml |
| ktownsend | 2:ffc5216bd2cc | 28 | uint8_t indicate :1; /**< Indications of value permitted. */ // https://developer.bluetooth.org/gatt/descriptors/Pages/DescriptorViewer.aspx?u=org.bluetooth.descriptor.gatt.client_characteristic_configuration.xml |
| ktownsend | 2:ffc5216bd2cc | 29 | uint8_t auth_signed_wr :1; /**< Writing value with Signed Write Command permitted. */ |
| ktownsend | 2:ffc5216bd2cc | 30 | } properties; |
| ktownsend | 2:ffc5216bd2cc | 31 | }; |
| ktownsend | 2:ffc5216bd2cc | 32 | |
| ktownsend | 2:ffc5216bd2cc | 33 | #endif |
