MeshTalos-Client/main/main.h

52 lines
No EOL
1.4 KiB
C

#pragma once
#include <stdint.h>
/*******************************************************
* 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 "FastCyberRoom"
//#define CONFIG_MESH_ROUTER_PASSWD "dyes1107@"
#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 DEBUG 1
#define CONFIG_MESH_ROOT 1
#define CONFIG_IMAGE_BUF_SLICE_SIZE 950 // 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;
request_t *client_parse_data(char *buf, size_t len);
int mesh_client_callback(char *buf, size_t len);
#ifdef __cplusplus
}
#endif