summaryrefslogtreecommitdiff
path: root/ESP32_BLE_Arduino/src/BLEUUID.h
diff options
context:
space:
mode:
authorkolban <kolban1@kolban.com>2017-09-10 13:36:10 -0500
committerkolban <kolban1@kolban.com>2017-09-10 13:36:10 -0500
commit5e5b5b78f0aeca611edb52ff4e885334b6fe46a9 (patch)
tree8d207806891e66ee6ea292d82eb7f120e2138418 /ESP32_BLE_Arduino/src/BLEUUID.h
downloadthermostat-5e5b5b78f0aeca611edb52ff4e885334b6fe46a9.tar.gz
thermostat-5e5b5b78f0aeca611edb52ff4e885334b6fe46a9.tar.bz2
thermostat-5e5b5b78f0aeca611edb52ff4e885334b6fe46a9.zip
0.1.0 release
Diffstat (limited to 'ESP32_BLE_Arduino/src/BLEUUID.h')
-rw-r--r--ESP32_BLE_Arduino/src/BLEUUID.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/ESP32_BLE_Arduino/src/BLEUUID.h b/ESP32_BLE_Arduino/src/BLEUUID.h
new file mode 100644
index 0000000..c364796
--- /dev/null
+++ b/ESP32_BLE_Arduino/src/BLEUUID.h
@@ -0,0 +1,37 @@
+/*
+ * BLEUUID.h
+ *
+ * Created on: Jun 21, 2017
+ * Author: kolban
+ */
+
+#ifndef COMPONENTS_CPP_UTILS_BLEUUID_H_
+#define COMPONENTS_CPP_UTILS_BLEUUID_H_
+#include "sdkconfig.h"
+#if defined(CONFIG_BT_ENABLED)
+#include <esp_gatt_defs.h>
+#include <string>
+
+/**
+ * @brief A model of a %BLE UUID.
+ */
+class BLEUUID {
+public:
+ BLEUUID(std::string uuid);
+ BLEUUID(uint16_t uuid);
+ BLEUUID(uint32_t uuid);
+ BLEUUID(esp_bt_uuid_t uuid);
+ BLEUUID(uint8_t* pData, size_t size, bool msbFirst);
+ BLEUUID(esp_gatt_srvc_id_t srcvId);
+ BLEUUID();
+ bool equals(BLEUUID uuid);
+ esp_bt_uuid_t* getNative();
+ BLEUUID to128();
+ std::string toString();
+
+private:
+ esp_bt_uuid_t m_uuid;
+ bool m_valueSet;
+}; // BLEUUID
+#endif /* CONFIG_BT_ENABLED */
+#endif /* COMPONENTS_CPP_UTILS_BLEUUID_H_ */