MQTT: Integrate esp-mqtt library into idf

added docs and tests for mqtt library, small fixes (removed warnings, option for custom outbox, websocket bug fixed for longer transports). refactored to use common tcp_transport component, support for CMake build system.
Closes #2108
This commit is contained in:
David Cermak
2018-07-24 16:59:03 +02:00
parent 17ac4bad73
commit 23345d2021
60 changed files with 1830 additions and 39 deletions

View File

@@ -16,6 +16,7 @@
#ifndef _HTTP_UTILS_H_
#define _HTTP_UTILS_H_
#include <sys/time.h>
#include "transport_utils.h"
/**
* @brief Assign new_str to *str pointer, and realloc *str if it not NULL
*
@@ -78,18 +79,8 @@ char *http_utils_join_string(const char *first_str, int len_first, const char *s
*/
int http_utils_str_starts_with(const char *str, const char *start);
/**
* @brief Convert milliseconds to timeval struct
*
* @param[in] timeout_ms The timeout milliseconds
* @param[out] tv Timeval struct
*/
void http_utils_ms_to_timeval(int timeout_ms, struct timeval *tv);
#define HTTP_MEM_CHECK(TAG, a, action) if (!(a)) { \
ESP_LOGE(TAG,"%s:%d (%s): %s", __FILE__, __LINE__, __FUNCTION__, "Memory exhausted"); \
action; \
}
#define HTTP_MEM_CHECK(TAG, a, action) TRANSPORT_MEM_CHECK(TAG, a, action)
#endif