mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 12:35:28 +00:00
eg/perf:modify udp_perf and some mistakes
modify udp_perf to be similar with tcp_perf. change indentation and some mistakes of codes. edit README.
This commit is contained in:
@@ -24,12 +24,12 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/*AP info and tcp_sever info*/
|
||||
#define DEFAULTSSID CONFIG_TCP_PERF_WIFI_SSID
|
||||
#define DEFAULTPWD CONFIG_TCP_PERF_WIFI_PASSWORD
|
||||
#define DEFAULTPORT CONFIG_TCP_PERF_SEVER_PORT
|
||||
#define DEFAULTSEVERIP CONFIG_TCP_PERF_SERVER_IP
|
||||
#define DEFAULT_SSID CONFIG_TCP_PERF_WIFI_SSID
|
||||
#define DEFAULT_PWD CONFIG_TCP_PERF_WIFI_PASSWORD
|
||||
#define DEFAULT_PORT CONFIG_TCP_PERF_SEVER_PORT
|
||||
#define DEFAULT_SEVER_IP CONFIG_TCP_PERF_SERVER_IP
|
||||
#define DEFAULT_PKTSIZE CONFIG_TCP_PERF_PKT_SIZE
|
||||
#define MAXSTACONN 1 //how many sta can be connected(AP mode)
|
||||
#define MAX_STA_CONN 1 //how many sta can be connected(AP mode)
|
||||
/*test options*/
|
||||
#define ESP_WIFI_MODE_AP CONFIG_TCP_PERF_WIFI_MODE_AP //TRUE:AP FALSE:STA
|
||||
#define ESP_TCP_MODE_SEVER CONFIG_TCP_PERF_SEVER //TRUE:sever FALSE:client
|
||||
@@ -37,9 +37,20 @@ extern "C" {
|
||||
#define ESP_TCP_DELAY_INFO CONFIG_TCP_PERF_DELAY_DEBUG //TRUE:show delay time info
|
||||
|
||||
|
||||
#define PACK_BYTE_IS 97 //'a'
|
||||
#define TAG "tcp_perf:"
|
||||
|
||||
|
||||
extern int connectedflag;
|
||||
extern int totle_data;
|
||||
|
||||
#if ESP_TCP_PERF_TX && ESP_TCP_DELAY_INFO
|
||||
extern int totle_pack;
|
||||
extern int send_success;
|
||||
extern int send_fail;
|
||||
extern int delay_classify[5];
|
||||
#endif/*ESP_TCP_PERF_TX && ESP_TCP_DELAY_INFO*/
|
||||
|
||||
|
||||
//using esp as station
|
||||
void wifi_init_sta();
|
||||
@@ -67,5 +78,6 @@ void close_socket();
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif /*#ifndef __TCP_PERF_H__*/
|
||||
|
||||
|
Reference in New Issue
Block a user