summaryrefslogtreecommitdiff
path: root/src/GeneralUtils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/GeneralUtils.h')
-rw-r--r--src/GeneralUtils.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/GeneralUtils.h b/src/GeneralUtils.h
new file mode 100644
index 0000000..152abca
--- /dev/null
+++ b/src/GeneralUtils.h
@@ -0,0 +1,28 @@
+/*
+ * GeneralUtils.h
+ *
+ * Created on: May 20, 2017
+ * Author: kolban
+ */
+
+#ifndef COMPONENTS_CPP_UTILS_GENERALUTILS_H_
+#define COMPONENTS_CPP_UTILS_GENERALUTILS_H_
+#include <stdint.h>
+#include <string>
+#include <esp_err.h>
+
+/**
+ * @brief General utilities.
+ */
+class GeneralUtils {
+public:
+ GeneralUtils();
+ virtual ~GeneralUtils();
+ static void hexDump(uint8_t *pData, uint32_t length);
+ static std::string ipToString(uint8_t *ip);
+ static bool base64Encode(const std::string &in, std::string *out);
+ static bool base64Decode(const std::string &in, std::string *out);
+ static const char *errorToString(esp_err_t errCode);
+};
+
+#endif /* COMPONENTS_CPP_UTILS_GENERALUTILS_H_ */