ESPectro32 Library
Library for using ESPectro32 board
 All Classes Functions Variables Enumerations Enumerator Pages
GeneralUtils.h
1 /*
2  * GeneralUtils.h
3  *
4  * Created on: May 20, 2017
5  * Author: kolban
6  */
7 
8 #ifndef COMPONENTS_CPP_UTILS_GENERALUTILS_H_
9 #define COMPONENTS_CPP_UTILS_GENERALUTILS_H_
10 #include <stdint.h>
11 #include <string>
12 #include <esp_err.h>
13 
17 class GeneralUtils {
18 public:
19  GeneralUtils();
20  virtual ~GeneralUtils();
21  static void hexDump(uint8_t *pData, uint32_t length);
22  static std::string ipToString(uint8_t *ip);
23  static bool base64Encode(const std::string &in, std::string *out);
24  static bool base64Decode(const std::string &in, std::string *out);
25  static const char *errorToString(esp_err_t errCode);
26 };
27 
28 #endif /* COMPONENTS_CPP_UTILS_GENERALUTILS_H_ */
General utilities.
Definition: GeneralUtils.h:17
static const char * errorToString(esp_err_t errCode)
Convert an ESP error code to a string.
Definition: GeneralUtils.cpp:316
static bool base64Encode(const std::string &in, std::string *out)
Encode a string into base 64.
Definition: GeneralUtils.cpp:65
static void hexDump(uint8_t *pData, uint32_t length)
Dump a representation of binary data to the console.
Definition: GeneralUtils.cpp:264
static bool base64Decode(const std::string &in, std::string *out)
Decode a chunk of data that is base64 encoded.
Definition: GeneralUtils.cpp:135
static std::string ipToString(uint8_t *ip)
Convert an IP address to string.
Definition: GeneralUtils.cpp:305