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
Diff: public/ServiceDiscovery.h
- Revision:
- 440:21c83c010895
- Parent:
- 439:c57413bf88a9
- Child:
- 455:b117ff978aec
--- a/public/ServiceDiscovery.h Fri Jun 19 15:51:55 2015 +0100 +++ b/public/ServiceDiscovery.h Fri Jun 19 15:51:55 2015 +0100 @@ -63,7 +63,8 @@ /**@brief Structure for holding information about the service and the characteristics found during * the discovery process. */ - struct DiscoveredCharacteristic { + class DiscoveredCharacteristic { + public: struct Properties_t { static const uint8_t BROADCAST_PROPERTY_MASK = 0x01; static const uint8_t READ_PROPERTY_MASK = 0x02; @@ -104,6 +105,28 @@ valueHandle = valueHandleIn; } + public: + const ShortUUIDBytes_t& getShortUUID(void) const { + return uuid; + } + + const Properties_t& getProperties(void) const { + return props; + } + + const GattAttribute::Handle_t& getDeclHandle(void) const { + return declHandle; + } + const GattAttribute::Handle_t& getValueHandle(void) const { + return valueHandle; + } + + public: + DiscoveredCharacteristic() : uuid(0), props(), declHandle(GattAttribute::INVALID_HANDLE), valueHandle(GattAttribute::INVALID_HANDLE) { + /* empty */ + } + + private: ShortUUIDBytes_t uuid; Properties_t props; GattAttribute::Handle_t declHandle;