My Project
 All Classes Functions Variables Pages
Public Member Functions | Friends | List of all members
WiFiEventHandler Class Reference

WiFi state event handler. More...

#include <WiFiEventHandler.h>

Inheritance diagram for WiFiEventHandler:
NeoPixelWiFiEventHandler

Public Member Functions

 WiFiEventHandler ()
 Constructor.
 
virtual esp_err_t apStaConnected (system_event_ap_staconnected_t info)
 Handle a Station Connected to AP event. Handle having a station connected to ESP32 soft-AP. More...
 
virtual esp_err_t apStaDisconnected (system_event_ap_stadisconnected_t info)
 Handle a Station Disconnected from AP event. Handle having a station disconnected from ESP32 soft-AP. More...
 
virtual esp_err_t apStart ()
 Handle the Access Point started event. Handle an indication that the ESP32 has started being an access point. More...
 
virtual esp_err_t apStop ()
 Handle the Access Point stop event. Handle an indication that the ESP32 has stopped being an access point. More...
 
system_event_cb_t getEventHandler ()
 Get the event handler. Retrieve the event handler function to be passed to the ESP-IDF event handler system. More...
 
virtual esp_err_t staConnected (system_event_sta_connected_t info)
 Handle the Station Connected event. Handle having connected to remote AP. More...
 
virtual esp_err_t staDisconnected (system_event_sta_disconnected_t info)
 Handle the Station Disconnected event. Handle having disconnected from remote AP. More...
 
virtual esp_err_t staGotIp (system_event_sta_got_ip_t info)
 Handle the Station Got IP event. Handle having received/assigned an IP address when we are a station. More...
 
virtual esp_err_t staScanDone (system_event_sta_scan_done_t info)
 Handle a Scan for APs done event. Handle having an ESP32 station scan (APs) done. More...
 
virtual esp_err_t staAuthChange (system_event_sta_authmode_change_t info)
 Handle the auth mode of APs change event. Handle having the auth mode of AP ESP32 station connected to changed. More...
 
virtual esp_err_t staStart ()
 
virtual esp_err_t staStop ()
 
virtual esp_err_t wifiReady ()
 
WiFiEventHandlergetNextHandler ()
 
void setNextHandler (WiFiEventHandler *nextHandler)
 

Friends

class WiFi
 

Detailed Description

WiFi state event handler.

Here is an example class that implements all the virtual functions that can be called for events:

MyHandler::MyHandler() {
}
MyHandler::~MyHandler() {
}
esp_err_t MyHandler::apStart() {
return ESP_OK;
}
esp_err_t MyHandler::staConnected(system_event_sta_connected_t info) {
return ESP_OK;
}
esp_err_t MyHandler::staDisconnected(system_event_sta_disconnected_t info) {
return ESP_OK;
}
esp_err_t MyHandler::apStaConnected(system_event_ap_staconnected_t info) {
return ESP_OK;
}
esp_err_t MyHandler::apStaDisconnected(system_event_ap_stadisconnected_t info) {
return ESP_OK;
}
esp_err_t MyHandler::staStart() {
return ESP_OK;
}
esp_err_t MyHandler::staGotIp(system_event_sta_got_ip_t info) {
return ESP_OK;
}
esp_err_t MyHandler::staScanDone(system_event_sta_scan_done_t info) {
return ESP_OK;
}
esp_err_t MyHandler::staAuthChange(system_event_sta_authmode_change_t info) {
return ESP_OK;
}
esp_err_t MyHandler::wifiReady() {
return ESP_OK;
}

Member Function Documentation

esp_err_t WiFiEventHandler::apStaConnected ( system_event_ap_staconnected_t  info)
virtual

Handle a Station Connected to AP event. Handle having a station connected to ESP32 soft-AP.

Parameters
[in]event_sta_connectedsystem_event_ap_staconnected_t.
Returns
An indication of whether or not we processed the event successfully.
esp_err_t WiFiEventHandler::apStaDisconnected ( system_event_ap_stadisconnected_t  info)
virtual

Handle a Station Disconnected from AP event. Handle having a station disconnected from ESP32 soft-AP.

Parameters
[in]event_sta_disconnectedsystem_event_ap_stadisconnected_t.
Returns
An indication of whether or not we processed the event successfully.
esp_err_t WiFiEventHandler::apStart ( )
virtual

Handle the Access Point started event. Handle an indication that the ESP32 has started being an access point.

Returns
An indication of whether or not we processed the event successfully.

Reimplemented in NeoPixelWiFiEventHandler.

esp_err_t WiFiEventHandler::apStop ( )
virtual

Handle the Access Point stop event. Handle an indication that the ESP32 has stopped being an access point.

Returns
An indication of whether or not we processed the event successfully.
system_event_cb_t WiFiEventHandler::getEventHandler ( )

Get the event handler. Retrieve the event handler function to be passed to the ESP-IDF event handler system.

Returns
The event handler function.
WiFiEventHandler* WiFiEventHandler::getNextHandler ( )
inline

Get the next WiFi event handler in the chain, if there is one.

Returns
The next WiFi event handler in the chain or nullptr if there is none.
void WiFiEventHandler::setNextHandler ( WiFiEventHandler nextHandler)
inline

Set the next WiFi event handler in the chain.

Parameters
[in]nextHandlerThe next WiFi event handler in the chain.
esp_err_t WiFiEventHandler::staAuthChange ( system_event_sta_authmode_change_t  info)
virtual

Handle the auth mode of APs change event. Handle having the auth mode of AP ESP32 station connected to changed.

Parameters
[in]event_auth_changesystem_event_sta_authmode_change_t.
Returns
An indication of whether or not we processed the event successfully.
esp_err_t WiFiEventHandler::staConnected ( system_event_sta_connected_t  info)
virtual

Handle the Station Connected event. Handle having connected to remote AP.

Parameters
[in]event_connectedsystem_event_sta_connected_t.
Returns
An indication of whether or not we processed the event successfully.

Reimplemented in NeoPixelWiFiEventHandler.

esp_err_t WiFiEventHandler::staDisconnected ( system_event_sta_disconnected_t  info)
virtual

Handle the Station Disconnected event. Handle having disconnected from remote AP.

Parameters
[in]event_disconnectedsystem_event_sta_disconnected_t.
Returns
An indication of whether or not we processed the event successfully.

Reimplemented in NeoPixelWiFiEventHandler.

esp_err_t WiFiEventHandler::staGotIp ( system_event_sta_got_ip_t  info)
virtual

Handle the Station Got IP event. Handle having received/assigned an IP address when we are a station.

Parameters
[in]event_sta_got_ipThe Station Got IP event.
Returns
An indication of whether or not we processed the event successfully.

Reimplemented in NeoPixelWiFiEventHandler.

esp_err_t WiFiEventHandler::staScanDone ( system_event_sta_scan_done_t  info)
virtual

Handle a Scan for APs done event. Handle having an ESP32 station scan (APs) done.

Parameters
[in]event_scan_donesystem_event_sta_scan_done_t.
Returns
An indication of whether or not we processed the event successfully.

The documentation for this class was generated from the following files: