|
MeterLogger
|
Go to the source code of this file.
Data Structures | |
| struct | _esp_tcp |
| struct | _esp_udp |
| struct | _remot_info |
| struct | espconn |
| struct | espconn_packet |
| struct | _espconn_buf |
| struct | _comon_pkt |
| struct | _espconn_msg |
| struct | mdns_info |
Macros | |
| #define | espconn_printf(fmt, args...) |
| #define | ESPCONN_OK 0 /* No error, everything OK. */ |
| #define | ESPCONN_MEM -1 /* Out of memory error. */ |
| #define | ESPCONN_TIMEOUT -3 /* Timeout. */ |
| #define | ESPCONN_RTE -4 /* Routing problem. */ |
| #define | ESPCONN_INPROGRESS -5 /* Operation in progress */ |
| #define | ESPCONN_MAXNUM -7 /* Total number exceeds the set maximum*/ |
| #define | ESPCONN_ABRT -8 /* Connection aborted. */ |
| #define | ESPCONN_RST -9 /* Connection reset. */ |
| #define | ESPCONN_CLSD -10 /* Connection closed. */ |
| #define | ESPCONN_CONN -11 /* Not connected. */ |
| #define | ESPCONN_ARG -12 /* Illegal argument. */ |
| #define | ESPCONN_IF -14 /* Low_level error */ |
| #define | ESPCONN_ISCONN -15 /* Already connected. */ |
| #define | ESPCONN_HANDSHAKE -28 /* ssl handshake failed */ |
| #define | ESPCONN_RESP_TIMEOUT -29 /* ssl handshake no response*/ |
| #define | ESPCONN_PROTO_MSG -61 /* ssl application invalid */ |
| #define | ESPCONN_SSL 0x01 |
| #define | ESPCONN_NORM 0x00 |
| #define | ESPCONN_STA 0x01 |
| #define | ESPCONN_AP 0x02 |
| #define | ESPCONN_AP_STA 0x03 |
| #define | STA_NETIF 0x00 |
| #define | AP_NETIF 0x01 |
| #define | _MDNS_INFO |
| #define | linkMax 15 |
| #define | espconn_delay_disabled(espconn) (((espconn)->pcommon.espconn_opt & ESPCONN_NODELAY) != 0) |
| #define | espconn_delay_enabled(espconn) (((espconn)->pcommon.espconn_opt & ESPCONN_NODELAY) == 0) |
| #define | espconn_reuse_disabled(espconn) (((espconn)->pcommon.espconn_opt & ESPCONN_REUSEADDR) != 0) |
| #define | espconn_copy_disabled(espconn) (((espconn)->pcommon.espconn_opt & ESPCONN_COPY) != 0) |
| #define | espconn_copy_enabled(espconn) (((espconn)->pcommon.espconn_opt & ESPCONN_COPY) == 0) |
| #define | espconn_keepalive_disabled(espconn) (((espconn)->pcommon.espconn_opt & ESPCONN_KEEPALIVE) != 0) |
| #define | espconn_keepalive_enabled(espconn) (((espconn)->pcommon.espconn_opt & ESPCONN_KEEPALIVE) == 0) |
| #define | espconn_TaskPrio 26 |
| #define | espconn_TaskQueueLen 15 |
Typedefs | |
| typedef void * | espconn_handle |
| typedef void(* | espconn_connect_callback) (void *arg) |
| typedef void(* | espconn_reconnect_callback) (void *arg, sint8 err) |
| typedef struct _esp_tcp | esp_tcp |
| typedef struct _esp_udp | esp_udp |
| typedef struct _remot_info | remot_info |
| typedef void(* | espconn_recv_callback) (void *arg, char *pdata, unsigned short len) |
| typedef void(* | espconn_sent_callback) (void *arg) |
| typedef struct _espconn_buf | espconn_buf |
| typedef struct _comon_pkt | comon_pkt |
| typedef struct _espconn_msg | espconn_msg |
Enumerations | |
| enum | espconn_type { ESPCONN_INVALID = 0, ESPCONN_TCP = 0x10, ESPCONN_UDP = 0x20, ESPCONN_INVALID = 0, ESPCONN_TCP = 0x10, ESPCONN_UDP = 0x20 } |
| enum | espconn_state { ESPCONN_NONE, ESPCONN_WAIT, ESPCONN_LISTEN, ESPCONN_CONNECT, ESPCONN_WRITE, ESPCONN_READ, ESPCONN_CLOSE, ESPCONN_NONE, ESPCONN_WAIT, ESPCONN_LISTEN, ESPCONN_CONNECT, ESPCONN_WRITE, ESPCONN_READ, ESPCONN_CLOSE } |
| enum | espconn_option { ESPCONN_START = 0x00, ESPCONN_REUSEADDR = 0x01, ESPCONN_NODELAY = 0x02, ESPCONN_COPY = 0x04, ESPCONN_KEEPALIVE = 0x08, ESPCONN_END, ESPCONN_START = 0x00, ESPCONN_REUSEADDR = 0x01, ESPCONN_NODELAY = 0x02, ESPCONN_COPY = 0x04, ESPCONN_KEEPALIVE = 0x08, ESPCONN_END } |
| enum | espconn_level { ESPCONN_KEEPIDLE, ESPCONN_KEEPINTVL, ESPCONN_KEEPCNT, ESPCONN_KEEPIDLE, ESPCONN_KEEPINTVL, ESPCONN_KEEPCNT } |
| enum | espconn_sig { SIG_ESPCONN_NONE, SIG_ESPCONN_ERRER, SIG_ESPCONN_LISTEN, SIG_ESPCONN_CONNECT, SIG_ESPCONN_WRITE, SIG_ESPCONN_SEND, SIG_ESPCONN_READ, SIG_ESPCONN_CLOSE } |
| #define AP_NETIF 0x01 |
Definition at line 48 of file espconn.h.
Referenced by espconn_connect().
| #define ESPCONN_AP 0x02 |
Definition at line 44 of file espconn.h.
Referenced by espconn_connect().
| #define ESPCONN_AP_STA 0x03 |
Definition at line 45 of file espconn.h.
Referenced by espconn_connect(), espconn_udp_sendto(), and espconn_udp_sent().
| #define ESPCONN_ARG -12 /* Illegal argument. */ |
Definition at line 32 of file espconn.h.
Referenced by espconn_abort(), espconn_accept(), espconn_clear_opt(), espconn_connect(), espconn_create(), espconn_delete(), espconn_disconnect(), espconn_get_connection_info(), espconn_get_keepalive(), espconn_get_packet_info(), espconn_recv_hold(), espconn_recv_unhold(), espconn_regist_connectcb(), espconn_regist_disconcb(), espconn_regist_reconcb(), espconn_regist_recvcb(), espconn_regist_sentcb(), espconn_regist_time(), espconn_regist_write_finish(), espconn_sendto(), espconn_sent(), espconn_set_keepalive(), espconn_set_opt(), espconn_tcp_delete(), espconn_tcp_get_max_con_allow(), espconn_tcp_sent(), espconn_tcp_set_buf_count(), espconn_tcp_set_max_con(), espconn_tcp_set_max_con_allow(), espconn_tcp_set_max_retran(), espconn_tcp_set_max_syn(), espconn_tcp_set_wnd(), espconn_udp_sendto(), and espconn_udp_sent().
| #define ESPCONN_CLSD -10 /* Connection closed. */ |
Definition at line 29 of file espconn.h.
Referenced by espconn_client_err(), and esponn_server_err().
| #define ESPCONN_CONN -11 /* Not connected. */ |
Definition at line 30 of file espconn.h.
Referenced by espconn_client_err(), and esponn_server_err().
| #define espconn_copy_disabled | ( | espconn | ) | (((espconn)->pcommon.espconn_opt & ESPCONN_COPY) != 0) |
Definition at line 198 of file espconn.h.
Referenced by espconn_sent(), and espconn_tcp_sent().
| #define espconn_copy_enabled | ( | espconn | ) | (((espconn)->pcommon.espconn_opt & ESPCONN_COPY) == 0) |
Definition at line 199 of file espconn.h.
Referenced by espconn_sent().
| #define espconn_delay_disabled | ( | espconn | ) | (((espconn)->pcommon.espconn_opt & ESPCONN_NODELAY) != 0) |
Definition at line 195 of file espconn.h.
Referenced by espconn_set_opt().
| #define espconn_delay_enabled | ( | espconn | ) | (((espconn)->pcommon.espconn_opt & ESPCONN_NODELAY) == 0) |
Definition at line 196 of file espconn.h.
Referenced by espconn_clear_opt().
| #define ESPCONN_IF -14 /* Low_level error */ |
Definition at line 33 of file espconn.h.
Referenced by espconn_udp_sendto(), and espconn_udp_sent().
| #define ESPCONN_INPROGRESS -5 /* Operation in progress */ |
Definition at line 24 of file espconn.h.
Referenced by espconn_abort(), espconn_disconnect(), and espconn_tcp_delete().
| #define ESPCONN_ISCONN -15 /* Already connected. */ |
Definition at line 34 of file espconn.h.
Referenced by espconn_accept(), espconn_connect(), and espconn_create().
| #define espconn_keepalive_disabled | ( | espconn | ) | (((espconn)->pcommon.espconn_opt & ESPCONN_KEEPALIVE) != 0) |
Definition at line 200 of file espconn.h.
Referenced by espconn_client_connect(), espconn_get_keepalive(), espconn_set_keepalive(), espconn_set_opt(), and espconn_tcp_accept().
| #define espconn_keepalive_enabled | ( | espconn | ) | (((espconn)->pcommon.espconn_opt & ESPCONN_KEEPALIVE) == 0) |
Definition at line 201 of file espconn.h.
Referenced by espconn_clear_opt().
| #define ESPCONN_MAXNUM -7 /* Total number exceeds the set maximum*/ |
Definition at line 25 of file espconn.h.
Referenced by espconn_sent().
| #define ESPCONN_MEM -1 /* Out of memory error. */ |
Definition at line 21 of file espconn.h.
Referenced by espconn_sent(), espconn_tcp_client(), espconn_tcp_server(), espconn_tcp_write(), espconn_udp_sendto(), espconn_udp_sent(), and espconn_udp_server().
| #define ESPCONN_OK 0 /* No error, everything OK. */ |
Definition at line 20 of file espconn.h.
Referenced by captdnsRecv(), espconn_abort(), espconn_accept(), espconn_clear_opt(), espconn_connect(), espconn_create(), espconn_delete(), espconn_disconnect(), espconn_get_connection_info(), espconn_get_keepalive(), espconn_get_packet_info(), espconn_igmp_join(), espconn_igmp_leave(), espconn_recv_hold(), espconn_recv_unhold(), espconn_regist_connectcb(), espconn_regist_disconcb(), espconn_regist_reconcb(), espconn_regist_recvcb(), espconn_regist_sentcb(), espconn_regist_time(), espconn_regist_write_finish(), espconn_sendto(), espconn_sent(), espconn_set_keepalive(), espconn_set_opt(), espconn_tcp_server(), espconn_tcp_set_buf_count(), espconn_tcp_set_max_con(), espconn_tcp_set_max_con_allow(), espconn_tcp_set_max_retran(), espconn_tcp_set_max_syn(), espconn_tcp_set_wnd(), espconn_udp_server(), and mqtt_send_keepalive().
| #define espconn_printf | ( | fmt, | |
| args... | |||
| ) |
Definition at line 10 of file espconn.h.
Referenced by espconn_client_connect(), espconn_client_err(), espconn_connect(), espconn_server_poll(), espconn_server_recv(), espconn_tcp_accept(), espconn_tcp_delete(), espconn_tcp_disconnect(), espconn_tcp_disconnect_successful(), espconn_tcp_reconnect(), and espconn_tcp_sent().
| #define ESPCONN_PROTO_MSG -61 /* ssl application invalid */ |
| #define ESPCONN_RESP_TIMEOUT -29 /* ssl handshake no response*/ |
| #define espconn_reuse_disabled | ( | espconn | ) | (((espconn)->pcommon.espconn_opt & ESPCONN_REUSEADDR) != 0) |
Definition at line 197 of file espconn.h.
Referenced by espconn_tcp_disconnect_successful().
| #define ESPCONN_RTE -4 /* Routing problem. */ |
Definition at line 23 of file espconn.h.
Referenced by espconn_connect(), espconn_tcp_client(), espconn_udp_sendto(), and espconn_udp_sent().
| #define ESPCONN_STA 0x01 |
Definition at line 43 of file espconn.h.
Referenced by espconn_connect().
| #define espconn_TaskPrio 26 |
Definition at line 203 of file espconn.h.
Referenced by espconn_client_close(), espconn_client_err(), espconn_init(), espconn_server_close(), espconn_tcp_sent(), and esponn_server_err().
| #define espconn_TaskQueueLen 15 |
Definition at line 204 of file espconn.h.
Referenced by espconn_init().
| #define ESPCONN_TIMEOUT -3 /* Timeout. */ |
Definition at line 22 of file espconn.h.
Referenced by espconn_client_err(), and esponn_server_err().
| #define linkMax 15 |
Definition at line 193 of file espconn.h.
Referenced by espconn_tcp_set_max_con(), and espconn_tcp_set_wnd().
| #define STA_NETIF 0x00 |
Definition at line 47 of file espconn.h.
Referenced by espconn_connect().
| typedef struct _comon_pkt comon_pkt |
| typedef struct _espconn_buf espconn_buf |
| typedef void* espconn_handle |
| typedef struct _espconn_msg espconn_msg |
| typedef void(* espconn_reconnect_callback) (void *arg, sint8 err) |
| typedef void(* espconn_recv_callback) (void *arg, char *pdata, unsigned short len) |
| typedef struct _remot_info remot_info |
| enum espconn_level |
| Enumerator | |
|---|---|
| ESPCONN_KEEPIDLE | |
| ESPCONN_KEEPINTVL | |
| ESPCONN_KEEPCNT | |
| ESPCONN_KEEPIDLE | |
| ESPCONN_KEEPINTVL | |
| ESPCONN_KEEPCNT | |
| enum espconn_option |
| Enumerator | |
|---|---|
| ESPCONN_START | |
| ESPCONN_REUSEADDR | |
| ESPCONN_NODELAY | |
| ESPCONN_COPY | |
| ESPCONN_KEEPALIVE | |
| ESPCONN_END | |
| ESPCONN_START | |
| ESPCONN_REUSEADDR | |
| ESPCONN_NODELAY | |
| ESPCONN_COPY | |
| ESPCONN_KEEPALIVE | |
| ESPCONN_END | |
Definition at line 115 of file espconn.h.
| enum espconn_sig |
| Enumerator | |
|---|---|
| SIG_ESPCONN_NONE | |
| SIG_ESPCONN_ERRER | |
| SIG_ESPCONN_LISTEN | |
| SIG_ESPCONN_CONNECT | |
| SIG_ESPCONN_WRITE | |
| SIG_ESPCONN_SEND | |
| SIG_ESPCONN_READ | |
| SIG_ESPCONN_CLOSE | |
Definition at line 206 of file espconn.h.
| enum espconn_state |
Current state of the espconn. Non-TCP espconn are always in state ESPCONN_NONE!
Definition at line 60 of file espconn.h.
| enum espconn_type |
Protocol family and type of the espconn
| Enumerator | |
|---|---|
| ESPCONN_INVALID | |
| ESPCONN_TCP | |
| ESPCONN_UDP | |
| ESPCONN_INVALID | |
| ESPCONN_TCP | |
| ESPCONN_UDP | |
Definition at line 875 of file espconn.c.
Referenced by httpdInit().
Definition at line 260 of file espconn.c.
Referenced by MQTT_Connect(), and mqtt_dns_found().
Definition at line 46 of file espconn.c.
References _esp_tcp::connect_callback, _esp_tcp::disconnect_callback, ESPCONN_TCP, espconn::link_cnt, _esp_tcp::local_ip, _esp_udp::local_ip, _esp_tcp::local_port, _esp_udp::local_port, os_memcpy, espconn::proto, _esp_tcp::reconnect_callback, espconn::recv_callback, _esp_tcp::remote_ip, _esp_udp::remote_ip, _esp_tcp::remote_port, _esp_udp::remote_port, espconn::reverse, espconn::sent_callback, espconn::state, espconn::tcp, espconn::type, and espconn::udp.
Referenced by espconn_tcp_accept(), espconn_tcp_disconnect_successful(), and espconn_tcp_reconnect().
Definition at line 334 of file espconn.c.
Referenced by captdnsInit().
Definition at line 1217 of file espconn.c.
Referenced by captdnsStop(), httpdStop(), and mqtt_tcpclient_delete().
Definition at line 942 of file espconn.c.
Referenced by httpdConnectCb(), httpdSentCb(), httpdStop(), MQTT_Task(), and mqtt_tcpclient_recv().
Definition at line 1302 of file espconn.c.
Referenced by wifi_softap_ip_config().
| bool espconn_find_connection | ( | struct espconn * | pespconn, |
| espconn_msg ** | pnode | ||
| ) |
Definition at line 186 of file espconn.c.
References ip_addr::addr, ICACHE_FLASH_ATTR, IP4_ADDR, IPADDR_ANY, NULL, _espconn_msg::pcommon, _espconn_msg::pespconn, plist, _espconn_msg::pnext, espconn::proto, _esp_tcp::remote_ip, _comon_pkt::remote_ip, _esp_tcp::remote_port, _comon_pkt::remote_port, and espconn::tcp.
Referenced by espconn_abort(), espconn_clear_opt(), espconn_delete(), espconn_disconnect(), espconn_get_keepalive(), espconn_get_packet_info(), espconn_recv_hold(), espconn_recv_unhold(), espconn_regist_time(), espconn_sendto(), espconn_sent(), espconn_set_keepalive(), and espconn_set_opt().
| sint8 espconn_get_connection_info | ( | struct espconn * | pespconn, |
| remot_info ** | pcon_info, | ||
| uint8 | typeflags | ||
| ) |
Definition at line 825 of file espconn.c.
Referenced by captdnsRecv(), espconn_tcp_accept(), and espconn_tcp_delete().
Definition at line 1173 of file espconn.c.
| sint8 espconn_get_packet_info | ( | struct espconn * | espconn, |
| struct espconn_packet * | infoarg | ||
| ) |
Definition at line 1004 of file espconn.c.
| sint8 espconn_gethostbyname | ( | struct espconn * | pespconn, |
| const char * | name, | ||
| ip_addr_t * | addr, | ||
| dns_found_callback | found | ||
| ) |
Definition at line 1288 of file espconn.c.
Referenced by MQTT_Connect().
Definition at line 414 of file espconn_udp.c.
Definition at line 396 of file espconn_udp.c.
| void espconn_list_creat | ( | espconn_msg ** | phead, |
| espconn_msg * | pinsert | ||
| ) |
Definition at line 76 of file espconn.c.
References NULL, plist, and _espconn_msg::pnext.
Referenced by espconn_tcp_accept(), espconn_tcp_client(), espconn_tcp_server(), and espconn_udp_server().
| void espconn_list_delete | ( | espconn_msg ** | phead, |
| espconn_msg * | pdelete | ||
| ) |
Definition at line 104 of file espconn.c.
References NULL, plist, and _espconn_msg::pnext.
Referenced by espconn_Task(), espconn_tcp_client(), espconn_tcp_delete(), and espconn_udp_disconnect().
| void espconn_mdns_close | ( | void | ) |
Definition at line 119 of file espconn_mdns.c.
| void espconn_mdns_disable | ( | void | ) |
Definition at line 37 of file espconn_mdns.c.
| void espconn_mdns_enable | ( | void | ) |
Definition at line 25 of file espconn_mdns.c.
| char* espconn_mdns_get_hostname | ( | void | ) |
Definition at line 63 of file espconn_mdns.c.
| char* espconn_mdns_get_servername | ( | void | ) |
Definition at line 85 of file espconn_mdns.c.
| void espconn_mdns_init | ( | struct mdns_info * | info | ) |
Definition at line 131 of file espconn_mdns.c.
| void espconn_mdns_server_register | ( | void | ) |
Definition at line 96 of file espconn_mdns.c.
| void espconn_mdns_server_unregister | ( | void | ) |
Definition at line 107 of file espconn_mdns.c.
| void espconn_mdns_set_hostname | ( | char * | name | ) |
Definition at line 50 of file espconn_mdns.c.
| void espconn_mdns_set_servername | ( | const char * | name | ) |
Definition at line 74 of file espconn_mdns.c.
| uint32 espconn_port | ( | void | ) |
Definition at line 1245 of file espconn.c.
Referenced by MQTT_Connect().
| sint8 espconn_regist_connectcb | ( | struct espconn * | espconn, |
| espconn_connect_callback | connect_cb | ||
| ) |
Definition at line 751 of file espconn.c.
Referenced by httpdInit(), and MQTT_Connect().
| sint8 espconn_regist_disconcb | ( | struct espconn * | espconn, |
| espconn_connect_callback | discon_cb | ||
| ) |
Definition at line 807 of file espconn.c.
Referenced by httpdConnectCb(), and mqtt_tcpclient_connect_cb().
| sint8 espconn_regist_reconcb | ( | struct espconn * | espconn, |
| espconn_reconnect_callback | recon_cb | ||
| ) |
Definition at line 789 of file espconn.c.
Referenced by httpdConnectCb(), and MQTT_Connect().
| sint8 espconn_regist_recvcb | ( | struct espconn * | espconn, |
| espconn_recv_callback | recv_cb | ||
| ) |
Definition at line 770 of file espconn.c.
Referenced by captdnsInit(), httpdConnectCb(), and mqtt_tcpclient_connect_cb().
| sint8 espconn_regist_sentcb | ( | struct espconn * | espconn, |
| espconn_sent_callback | sent_cb | ||
| ) |
Definition at line 712 of file espconn.c.
Referenced by httpdConnectCb(), and mqtt_tcpclient_connect_cb().
Definition at line 905 of file espconn.c.
| sint8 espconn_regist_write_finish | ( | struct espconn * | espconn, |
| espconn_connect_callback | write_finish_fn | ||
| ) |
Definition at line 732 of file espconn.c.
Definition at line 368 of file espconn.c.
Referenced by cgiEspFsHook(), and xmitSendBuff().
Definition at line 1128 of file espconn.c.
Referenced by MQTT_Connect().
Definition at line 1056 of file espconn.c.
Referenced by MQTT_Connect().
Definition at line 618 of file espconn.c.
Referenced by espconn_tcp_accept().
| uint8 espconn_tcp_get_max_retran | ( | void | ) |
| uint8 espconn_tcp_get_max_syn | ( | void | ) |
Definition at line 665 of file espconn.c.
References ESPCONN_ARG, ESPCONN_OK, ESPCONN_TCP, NULL, _comon_pkt::pbuf_num, _espconn_msg::pcommon, _espconn_msg::pespconn, plist, _espconn_msg::pnext, TCP_SND_QUEUELEN, and espconn::type.
Referenced by espconn_client_connect(), and espconn_tcp_accept().
Definition at line 640 of file espconn.c.
Definition at line 498 of file espconn.c.
References ESPCONN_ARG, ESPCONN_OK, linkMax, TCP_MSS, and TCP_WND.
1.8.13