MeterLogger
Data Structures | Macros | Typedefs | Enumerations | Functions
mesh.h File Reference
#include "ip_addr.h"
#include "user_interface.h"
#include "espconn.h"
Include dependency graph for mesh.h:

Go to the source code of this file.

Data Structures

struct  mesh_scan_para_type
 

Macros

#define ESP_MESH_GROUP_ID_LEN   (6)
 

Typedefs

typedef void(* espconn_mesh_callback) ()
 
typedef void(* espconn_mesh_scan_callback) (void *arg, int8_t status)
 

Enumerations

enum  mesh_type { MESH_CLOSE = 0, MESH_LOCAL, MESH_ONLINE, MESH_NONE = 0xFF }
 
enum  mesh_status {
  MESH_DISABLE = 0, MESH_WIFI_CONN, MESH_NET_CONN, MESH_LOCAL_AVAIL,
  MESH_ONLINE_AVAIL
}
 
enum  mesh_node_type { MESH_NODE_PARENT = 0, MESH_NODE_CHILD, MESH_NODE_ALL }
 

Functions

bool espconn_mesh_local_addr (struct ip_addr *ip)
 Check whether the IP address is mesh local IP address or not. More...
 
bool espconn_mesh_get_router (struct station_config *router)
 Get the information of router used by mesh network. More...
 
bool espconn_mesh_set_router (struct station_config *router)
 Set the information of router used by mesh network. More...
 
bool espconn_mesh_server_init (struct ip_addr *ip, uint16_t port)
 Set server setup by user. More...
 
bool espconn_mesh_get_node_info (enum mesh_node_type type, uint8_t **info, uint8_t *count)
 Get the information of mesh node. More...
 
bool espconn_mesh_encrypt_init (AUTH_MODE mode, uint8_t *passwd, uint8_t passwd_len)
 Set WiFi cryption algrithm and password for mesh node. More...
 
bool espconn_mesh_set_ssid_prefix (uint8_t *prefix, uint8_t prefix_len)
 Set prefix of SSID for mesh node. More...
 
bool espconn_mesh_set_max_hops (uint8_t max_hops)
 Set max hop for mesh network. More...
 
bool espconn_mesh_group_id_init (uint8_t *grp_id, uint16_t gid_len)
 Set group ID of mesh node. More...
 
bool espconn_mesh_set_dev_type (uint8_t dev_type)
 Set the curent device type. More...
 
uint8_t espconn_mesh_get_dev_type ()
 Get the curent device type. More...
 
int8_t espconn_mesh_connect (struct espconn *usr_esp)
 Try to establish mesh connection to server. More...
 
int8_t espconn_mesh_disconnect (struct espconn *usr_esp)
 Disconnect a mesh connection. More...
 
int8_t espconn_mesh_get_status ()
 Get current mesh status. More...
 
int8_t espconn_mesh_sent (struct espconn *usr_esp, uint8 *pdata, uint16 len)
 Send data through mesh network. More...
 
uint8_t espconn_mesh_get_max_hops ()
 Get max hop of mesh network. More...
 
void espconn_mesh_enable (espconn_mesh_callback enable_cb, enum mesh_type type)
 To enable mesh network. More...
 
void espconn_mesh_disable (espconn_mesh_callback disable_cb)
 To disable mesh network. More...
 
void espconn_mesh_print_ver ()
 To print version of mesh. More...
 
void espconn_mesh_scan (struct mesh_scan_para_type *para)
 To get AP around node. More...
 

Macro Definition Documentation

◆ ESP_MESH_GROUP_ID_LEN

#define ESP_MESH_GROUP_ID_LEN   (6)

Definition at line 34 of file mesh.h.

Typedef Documentation

◆ espconn_mesh_callback

typedef void(* espconn_mesh_callback) ()

Definition at line 36 of file mesh.h.

◆ espconn_mesh_scan_callback

typedef void(* espconn_mesh_scan_callback) (void *arg, int8_t status)

Definition at line 37 of file mesh.h.

Enumeration Type Documentation

◆ mesh_type

enum mesh_type
Enumerator
MESH_CLOSE 
MESH_LOCAL 
MESH_ONLINE 
MESH_NONE 

Definition at line 39 of file mesh.h.

39  {
40  MESH_CLOSE = 0,
41  MESH_LOCAL,
43  MESH_NONE = 0xFF
44 };
Definition: mesh.h:43