#include "tcp_handler.h"
#include "udp_handler.h"
#include "websocket_handler.h"
#include "utils.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_system.h"
#include "freertos/queue.h"
Go to the source code of this file.
|
#define | MESSAGE_QUEUE_SIZE CONFIG_MESSAGE_QUEUE_SIZE |
|
#define | BUFFER_SIZE CONFIG_BUFFER_SIZE |
|
#define | wifi_log_e(TAG, fmt, ...) generate_log_message(ESP_LOG_ERROR, TAG, __LINE__, __func__, fmt, __VA_ARGS__); |
|
#define | wifi_log_w(TAG, fmt, ...) generate_log_message(ESP_LOG_WARN, TAG, __LINE__, __func__, fmt, __VA_ARGS__); |
|
#define | wifi_log_i(TAG, fmt, ...) generate_log_message(ESP_LOG_INFO, TAG, __LINE__, __func__, fmt, __VA_ARGS__); |
|
#define | wifi_log_d(TAG, fmt, ...) generate_log_message(ESP_LOG_DEBUG, TAG, __LINE__, __func__, fmt, __VA_ARGS__); |
|
#define | wifi_log_v(TAG, fmt, ...) generate_log_message(ESP_LOG_VERBOSE, TAG, __LINE__, __func__, fmt, __VA_ARGS__); |
|
◆ BUFFER_SIZE
#define BUFFER_SIZE CONFIG_BUFFER_SIZE |
◆ MESSAGE_QUEUE_SIZE
#define MESSAGE_QUEUE_SIZE CONFIG_MESSAGE_QUEUE_SIZE |
◆ wifi_log_d
#define wifi_log_d |
( |
|
TAG, |
|
|
|
fmt, |
|
|
|
... |
|
) |
| generate_log_message(ESP_LOG_DEBUG, TAG, __LINE__, __func__, fmt, __VA_ARGS__); |
◆ wifi_log_e
#define wifi_log_e |
( |
|
TAG, |
|
|
|
fmt, |
|
|
|
... |
|
) |
| generate_log_message(ESP_LOG_ERROR, TAG, __LINE__, __func__, fmt, __VA_ARGS__); |
◆ wifi_log_i
#define wifi_log_i |
( |
|
TAG, |
|
|
|
fmt, |
|
|
|
... |
|
) |
| generate_log_message(ESP_LOG_INFO, TAG, __LINE__, __func__, fmt, __VA_ARGS__); |
◆ wifi_log_v
#define wifi_log_v |
( |
|
TAG, |
|
|
|
fmt, |
|
|
|
... |
|
) |
| generate_log_message(ESP_LOG_VERBOSE, TAG, __LINE__, __func__, fmt, __VA_ARGS__); |
◆ wifi_log_w
#define wifi_log_w |
( |
|
TAG, |
|
|
|
fmt, |
|
|
|
... |
|
) |
| generate_log_message(ESP_LOG_WARN, TAG, __LINE__, __func__, fmt, __VA_ARGS__); |
◆ generate_log_message()
void generate_log_message |
( |
esp_log_level_t |
level, |
|
|
const char * |
TAG, |
|
|
int |
line, |
|
|
const char * |
func, |
|
|
const char * |
fmt, |
|
|
|
... |
|
) |
| |
generates log message, of the format generated by ESP_LOG function
- Parameters
-
level | set ESP LOG level {E, W, I, D, V} |
TAG | Tag for the log message |
line | line |
func | func |
fmt | fmt |
◆ init_queue()
esp_err_t init_queue |
( |
void |
| ) |
|
Initialises message queue.
- Returns
- esp_err_t ESP_OK - if queue init sucessfully, ESP_FAIL - if queue init failed
◆ init_wifi()
Initialises and connects to wifi.
◆ receive_from_queue()
char* receive_from_queue |
( |
void |
| ) |
|
Receive data from queue. Timeout is set to portMAX_DELAY, which is around 50 days (confirm from esp32 specs)
- Returns
- char* - returns log message received from the queue, returns NULL if error
◆ send_to_queue()
esp_err_t send_to_queue |
( |
char * |
log_message | ) |
|
Sends log message to message queue.
- Parameters
-
log_message | log message to be sent to the queue |
- Returns
- esp_err_t ESP_OK - if queue init sucessfully, ESP_FAIL - if queue init failed
◆ start_wifi_logger()
void start_wifi_logger |
( |
void |
| ) |
|
wrapper function to start wifi logger
◆ system_log_message_route()
int system_log_message_route |
( |
const char * |
fmt, |
|
|
va_list |
tag |
|
) |
| |
route log messages generated by ESP_LOGX to the wifi logger
- Parameters
-
fmt | logger string format |
tag | arguments |
- Returns
- int return value of vprintf
◆ wifi_logger()
◆ wifi_logger_queue
QueueHandle_t wifi_logger_queue |