#ifndef MAIN_H #define MAIN_H #include /******************************************************* * Constants *******************************************************/ #define CONFIG_MESH_ROUTE_TABLE_SIZE 100 #define CONFIG_MESH_MAX_LAYER 6 #define CONFIG_MESH_CHANNEL 0 // change these static const uint8_t MESH_ID[6] = { 0x77, 0x77, 0x77, 0x77, 0x77, 0x76 }; //#define CONFIG_MESH_ROUTER_SSID "FBK_the_cutest_fox" //#define CONFIG_MESH_ROUTER_PASSWD "zsfv3210" #define CONFIG_MESH_ROUTER_SSID "testesp" #define CONFIG_MESH_ROUTER_PASSWD "RABCRABC" #define CONFIG_MESH_AP_AUTHMODE WIFI_AUTH_WPA2_PSK #define CONFIG_MESH_AP_PASSWD "RASRASRAS" #define CONFIG_MESH_AP_CONNECTIONS 6 // number of nodes #define CONFIG_MESH_NON_MESH_AP_CONNECTIONS 0 // number of non-node devices #define CONFIG_TCP_ROOT 0 #define CONFIG_TCP_SERVER_IP "172.16.0.1" //#define CONFIG_TCP_SERVER_IP "10.189.34.172" #define CONFIG_TCP_SERVER_PORT "3030" #define CONFIG_TCP_RXBUFFER_SIZE 4096 // tcp raw data max size #define CONFIG_IMAGE_BUF_SLICE_SIZE 2048 // map["data"] max size #define CONFIG_IMAGE_BUF_SIZE 5624 /******************************************************* * Function Declarations *******************************************************/ #ifdef __cplusplus extern "C" { #endif typedef struct request_t { // command : update_image, push_image, ping char *command; // arguments for update_image uint64_t index; char *data; size_t data_len; } request_t; #if CONFIG_TCP_ROOT == 1 int tcp_server_callback(const char *TAG, int sock); #else int tcp_client_callback(request_t *req); #endif request_t *client_parse_data(char *buf, size_t len); #ifdef __cplusplus } #endif #endif