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/UUID.h
- Revision:
- 303:a0d78cb2e9ef
- Parent:
- 302:8f4348c2b6b5
- Child:
- 332:1dc2f80b4710
diff -r 8f4348c2b6b5 -r a0d78cb2e9ef public/UUID.h
--- a/public/UUID.h Mon Mar 02 11:50:48 2015 +0000
+++ b/public/UUID.h Mon Mar 02 11:50:48 2015 +0000
@@ -25,7 +25,7 @@
class UUID {
public:
- enum {
+ enum UUID_Type_t {
UUID_TYPE_SHORT = 0, // Short BLE UUID
UUID_TYPE_LONG = 1 // Full 128-bit UUID
};
@@ -35,10 +35,13 @@
UUID(ShortUUIDBytes_t);
public:
- uint8_t shortOrLong(void) const {return type; }
+ UUID_Type_t shortOrLong(void) const {return type; }
const uint8_t *getBaseUUID(void) const {
- if (type == UUID_TYPE_SHORT) { return (const uint8_t*)&shortUUID; }
- else { return baseUUID; }
+ if (type == UUID_TYPE_SHORT) {
+ return (const uint8_t*)&shortUUID;
+ } else {
+ return baseUUID;
+ }
}
ShortUUIDBytes_t getShortUUID(void) const {return shortUUID;}
uint8_t getLen(void) const {
@@ -48,7 +51,7 @@
bool operator== (const UUID&) const;
private:
- uint8_t type; // UUID_TYPE_SHORT or UUID_TYPE_LONG
+ UUID_Type_t type; // UUID_TYPE_SHORT or UUID_TYPE_LONG
LongUUIDBytes_t baseUUID; /* the base of the long UUID (if
* used). Note: bytes 12 and 13 (counting from LSB)
* are zeroed out to allow comparison with other long
