Microchip® Advanced Software Framework

wilc/iperf_wilc1000_wilc3000_example/iperf.c File Reference
#include "asf.h"
#include "FreeRTOS.h"
#include "osprintf.h"
#include "lwip/ip.h"
#include "lwip/api.h"
#include "lwip/tcpip.h"
#include "lwip/dns.h"
#include "os/include/net_init.h"
#include "os/include/m2m_wifi_ex.h"
#include "driver/include/m2m_wifi.h"
#include "tinyservices.h"
#include <string.h>
#include <stdio.h>
#include <iperf.h>
#include <wchar.h>
#include "utf8/utf8.h"

Data Structures

struct  iperf_state
 

Macros

#define BUFSIZE   IPERF_WIFI_TCP_BUFFER_SIZE
 
#define IPERF_PORT   5001
 

Enumerations

enum  iperf_status {
  E_WAITING = 0,
  E_CONNECTED,
  E_CLOSED,
  E_WAITING = 0,
  E_CONNECTED,
  E_CLOSED
}
 

Functions

static sint32 check_digit (char c)
 
void iperf_tcp_client_task (void *v)
 
static void iperf_tcp_recv (struct netconn *conn)
 
static void iperf_tcp_send (ip_addr_t *local_ip, ip_addr_t *remote_ip, u16_t port)
 
void iperf_tcp_task (void *v)
 TCP task function. More...
 
static void iperf_udp_recv (struct netconn *conn)
 
static void iperf_udp_send (struct netconn *conn)
 
void iperf_udp_task (void *v)
 UDP task function. More...
 
void SetServerIpAddr (char *addr, uint32 *u32RemoteIPAddress)
 
static void wifi_cb (uint8 msg_type, void *msg)
 Callback to get the Wi-Fi status update. More...
 

Variables

uint8_t buffer [BUFSIZE]
 
static xSemaphoreHandle firmware_start_sem = NULL
 Firmware start event. More...
 
static volatile bool gbConnectedWifi = false
 Wi-Fi status variable. More...
 
tstrM2mWifiWepParams gstrSTAWepParam = WEP_CONN_PARAM
 
struct iperf_state iperf
 
uint32_t sta_connected = 0
 Number of STA connected. More...
 
struct iperf_stats stats
 
static uint32_t test_time
 
static uint32_t test_tx
 
static ip_addr_t udp_client_ip
 
static uint32_t udp_client_port
 
unsigned int * utf8_STA_mode_PSK = NULL
 
unsigned int * utf8_STA_mode_SSID = NULL
 

#define IPERF_PORT   5001

Enumerator
E_WAITING 
E_CONNECTED 
E_CLOSED 
E_WAITING 
E_CONNECTED 
E_CLOSED 

static sint32 check_digit ( char  c)
static

Referenced by SetServerIpAddr().

static void iperf_tcp_send ( ip_addr_t local_ip,
ip_addr_t remote_ip,
u16_t  port 
)
static
void iperf_udp_task ( void *  v)

UDP task function.

References ERR_OK, IPERF_PORT, iperf_udp_recv(), iperf_udp_send(), NULL, osprintf(), stats, and vTaskDelay().

Referenced by main().

void SetServerIpAddr ( char *  addr,
uint32 u32RemoteIPAddress 
)

References check_digit(), M2M_PRINT, and NULL.

Referenced by iperf_tcp_client_task().

uint8_t buffer[BUFSIZE]
xSemaphoreHandle firmware_start_sem = NULL
static

Firmware start event.

volatile bool gbConnectedWifi = false
static

Wi-Fi status variable.

struct iperf_state iperf
uint32_t sta_connected = 0

Number of STA connected.

Referenced by wifi_cb().

struct iperf_stats stats
uint32_t test_time
static

Referenced by iperf_udp_recv(), and iperf_udp_send().

uint32_t test_tx
static

Referenced by iperf_udp_recv(), and iperf_udp_send().

ip_addr_t udp_client_ip
static

Referenced by iperf_udp_recv(), and iperf_udp_send().

uint32_t udp_client_port
static

Referenced by iperf_udp_recv().

unsigned int * utf8_STA_mode_PSK = NULL
unsigned int* utf8_STA_mode_SSID = NULL