ESPixelStick Firmware
Firmware for the ESPixelStick
Loading...
Searching...
No Matches
c_WiFiDriver Class Reference

#include <WiFiDriver.hpp>

Collaboration diagram for c_WiFiDriver:

Public Member Functions

 c_WiFiDriver ()
 < Start up the driver and put it into a safe mode
 
virtual ~c_WiFiDriver ()
 < deallocate any resources and put the output channels into a safe state
 
void Begin ()
 < Start the module
 
void GetConfig (JsonObject &json)
 
void GetStatus (JsonObject &json)
 
bool SetConfig (JsonObject &json)
 
IPAddress getIpAddress ()
 
void setIpAddress (IPAddress NewAddress)
 
IPAddress getIpSubNetMask ()
 
void setIpSubNetMask (IPAddress NewAddress)
 
void connectWifi (const String &ssid, const String &passphrase)
 
void reset ()
 
void Poll ()
 
void SetFsmState (fsm_WiFi_state *NewState)
 
void AnnounceState ()
 
FastTimerGetFsmTimer (void)
 
bool IsWiFiConnected ()
 
void SetIsWiFiConnected (bool value)
 
void GetDriverName (String &Name)
 
uint32_t Get_sta_timeout ()
 
uint32_t Get_ap_timeout ()
 
bool Get_ap_fallbackIsEnabled ()
 
bool Get_ap_StayInApMode ()
 
bool Get_RebootOnWiFiFailureToConnect ()
 
String GetConfig_ssid ()
 
String GetConfig_apssid ()
 
String GetConfig_passphrase ()
 
void GetHostname (String &name)
 
void SetHostname (String &name)
 
void Disable ()
 
void Enable ()
 

Protected Attributes

fsm_WiFi_statepCurrentFsmState = nullptr
 
FastTimer FsmTimer
 

Private Member Functions

int ValidateConfig ()
 
void SetUpIp ()
 
void onWiFiConnect (const WiFiEvent_t event, const WiFiEventInfo_t info)
 
void onWiFiDisconnect (const WiFiEvent_t event, const WiFiEventInfo_t info)
 WiFi Disconnect Handler.
 
void onWiFiStaConn (const WiFiEvent_t event, const WiFiEventInfo_t info)
 
void onWiFiStaDisc (const WiFiEvent_t event, const WiFiEventInfo_t info)
 

Private Attributes

IPAddress CurrentIpAddress = IPAddress (0, 0, 0, 0)
 
IPAddress CurrentSubnetMask = IPAddress (0, 0, 0, 0)
 
FastTimer NextPoll
 
uint32_t PollInterval = 1000
 
bool ReportedIsWiFiConnected = false
 
String ssid
 
String passphrase
 
String ap_ssid
 
String ap_passphrase
 
IPAddress ip = INADDR_NONE
 
IPAddress netmask = INADDR_NONE
 
IPAddress gateway = INADDR_NONE
 
IPAddress primaryDns = INADDR_NONE
 
IPAddress secondaryDns = INADDR_NONE
 
bool UseDhcp = true
 
uint8_t ap_channelNumber = 1
 
bool ap_fallbackIsEnabled = true
 
uint32_t ap_timeout = AP_TIMEOUT
 How long to wait in AP mode with no connection before rebooting.
 
uint32_t sta_timeout = CLIENT_TIMEOUT
 Timeout when connection as client (station)
 
bool StayInApMode = false
 
bool RebootOnWiFiFailureToConnect = true
 

Friends

class fsm_WiFi_state_Boot
 
class fsm_WiFi_state_ConnectingUsingConfig
 
class fsm_WiFi_state_ConnectingUsingDefaults
 
class fsm_WiFi_state_ConnectedToAP
 
class fsm_WiFi_state_ConnectingAsAP
 
class fsm_WiFi_state_ConnectedToSta
 
class fsm_WiFi_state_ConnectionFailed
 
class fsm_WiFi_state_Disabled
 
class fsm_WiFi_state
 

Constructor & Destructor Documentation

◆ c_WiFiDriver()

c_WiFiDriver::c_WiFiDriver ( )

< Start up the driver and put it into a safe mode

Here is the call graph for this function:

◆ ~c_WiFiDriver()

c_WiFiDriver::~c_WiFiDriver ( )
virtual

< deallocate any resources and put the output channels into a safe state

Member Function Documentation

◆ AnnounceState()

void c_WiFiDriver::AnnounceState ( )
Here is the call graph for this function:

◆ Begin()

void c_WiFiDriver::Begin ( )

< Start the module

Here is the call graph for this function:
Here is the caller graph for this function:

◆ connectWifi()

void c_WiFiDriver::connectWifi ( const String & ssid,
const String & passphrase )
Here is the call graph for this function:

◆ Disable()

void c_WiFiDriver::Disable ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Enable()

void c_WiFiDriver::Enable ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Get_ap_fallbackIsEnabled()

bool c_WiFiDriver::Get_ap_fallbackIsEnabled ( )
inline

◆ Get_ap_StayInApMode()

bool c_WiFiDriver::Get_ap_StayInApMode ( )
inline

◆ Get_ap_timeout()

uint32_t c_WiFiDriver::Get_ap_timeout ( )
inline

◆ Get_RebootOnWiFiFailureToConnect()

bool c_WiFiDriver::Get_RebootOnWiFiFailureToConnect ( )
inline

◆ Get_sta_timeout()

uint32_t c_WiFiDriver::Get_sta_timeout ( )
inline

◆ GetConfig()

void c_WiFiDriver::GetConfig ( JsonObject & json)
Here is the caller graph for this function:

◆ GetConfig_apssid()

String c_WiFiDriver::GetConfig_apssid ( )
inline

◆ GetConfig_passphrase()

String c_WiFiDriver::GetConfig_passphrase ( )
inline

◆ GetConfig_ssid()

String c_WiFiDriver::GetConfig_ssid ( )
inline

◆ GetDriverName()

void c_WiFiDriver::GetDriverName ( String & Name)
inline

◆ GetFsmTimer()

FastTimer & c_WiFiDriver::GetFsmTimer ( void )
inline

◆ GetHostname()

void c_WiFiDriver::GetHostname ( String & name)
Here is the caller graph for this function:

◆ getIpAddress()

IPAddress c_WiFiDriver::getIpAddress ( )
inline
Here is the caller graph for this function:

◆ getIpSubNetMask()

IPAddress c_WiFiDriver::getIpSubNetMask ( )
inline
Here is the caller graph for this function:

◆ GetStatus()

void c_WiFiDriver::GetStatus ( JsonObject & json)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsWiFiConnected()

bool c_WiFiDriver::IsWiFiConnected ( )
inline
Here is the caller graph for this function:

◆ onWiFiConnect()

void c_WiFiDriver::onWiFiConnect ( const WiFiEvent_t event,
const WiFiEventInfo_t info )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ onWiFiDisconnect()

void c_WiFiDriver::onWiFiDisconnect ( const WiFiEvent_t event,
const WiFiEventInfo_t info )
private

WiFi Disconnect Handler.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ onWiFiStaConn()

void c_WiFiDriver::onWiFiStaConn ( const WiFiEvent_t event,
const WiFiEventInfo_t info )
private
Here is the caller graph for this function:

◆ onWiFiStaDisc()

void c_WiFiDriver::onWiFiStaDisc ( const WiFiEvent_t event,
const WiFiEventInfo_t info )
private
Here is the caller graph for this function:

◆ Poll()

void c_WiFiDriver::Poll ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset()

void c_WiFiDriver::reset ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetConfig()

bool c_WiFiDriver::SetConfig ( JsonObject & json)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetFsmState()

void c_WiFiDriver::SetFsmState ( fsm_WiFi_state * NewState)

◆ SetHostname()

void c_WiFiDriver::SetHostname ( String & name)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setIpAddress()

void c_WiFiDriver::setIpAddress ( IPAddress NewAddress)
inline

◆ setIpSubNetMask()

void c_WiFiDriver::setIpSubNetMask ( IPAddress NewAddress)
inline

◆ SetIsWiFiConnected()

void c_WiFiDriver::SetIsWiFiConnected ( bool value)
inline

◆ SetUpIp()

void c_WiFiDriver::SetUpIp ( )
private
Here is the caller graph for this function:

◆ ValidateConfig()

int c_WiFiDriver::ValidateConfig ( )
private

Friends And Related Symbol Documentation

◆ fsm_WiFi_state

friend class fsm_WiFi_state
friend

◆ fsm_WiFi_state_Boot

friend class fsm_WiFi_state_Boot
friend

◆ fsm_WiFi_state_ConnectedToAP

friend class fsm_WiFi_state_ConnectedToAP
friend

◆ fsm_WiFi_state_ConnectedToSta

friend class fsm_WiFi_state_ConnectedToSta
friend

◆ fsm_WiFi_state_ConnectingAsAP

friend class fsm_WiFi_state_ConnectingAsAP
friend

◆ fsm_WiFi_state_ConnectingUsingConfig

◆ fsm_WiFi_state_ConnectingUsingDefaults

◆ fsm_WiFi_state_ConnectionFailed

friend class fsm_WiFi_state_ConnectionFailed
friend

◆ fsm_WiFi_state_Disabled

friend class fsm_WiFi_state_Disabled
friend

Member Data Documentation

◆ ap_channelNumber

uint8_t c_WiFiDriver::ap_channelNumber = 1
private

◆ ap_fallbackIsEnabled

bool c_WiFiDriver::ap_fallbackIsEnabled = true
private

◆ ap_passphrase

String c_WiFiDriver::ap_passphrase
private

◆ ap_ssid

String c_WiFiDriver::ap_ssid
private

◆ ap_timeout

uint32_t c_WiFiDriver::ap_timeout = AP_TIMEOUT
private

How long to wait in AP mode with no connection before rebooting.

◆ CurrentIpAddress

IPAddress c_WiFiDriver::CurrentIpAddress = IPAddress (0, 0, 0, 0)
private

◆ CurrentSubnetMask

IPAddress c_WiFiDriver::CurrentSubnetMask = IPAddress (0, 0, 0, 0)
private

◆ FsmTimer

FastTimer c_WiFiDriver::FsmTimer
protected

◆ gateway

IPAddress c_WiFiDriver::gateway = INADDR_NONE
private

◆ ip

IPAddress c_WiFiDriver::ip = INADDR_NONE
private

◆ netmask

IPAddress c_WiFiDriver::netmask = INADDR_NONE
private

◆ NextPoll

FastTimer c_WiFiDriver::NextPoll
private

◆ passphrase

String c_WiFiDriver::passphrase
private

◆ pCurrentFsmState

fsm_WiFi_state* c_WiFiDriver::pCurrentFsmState = nullptr
protected

◆ PollInterval

uint32_t c_WiFiDriver::PollInterval = 1000
private

◆ primaryDns

IPAddress c_WiFiDriver::primaryDns = INADDR_NONE
private

◆ RebootOnWiFiFailureToConnect

bool c_WiFiDriver::RebootOnWiFiFailureToConnect = true
private

◆ ReportedIsWiFiConnected

bool c_WiFiDriver::ReportedIsWiFiConnected = false
private

◆ secondaryDns

IPAddress c_WiFiDriver::secondaryDns = INADDR_NONE
private

◆ ssid

String c_WiFiDriver::ssid
private

◆ sta_timeout

uint32_t c_WiFiDriver::sta_timeout = CLIENT_TIMEOUT
private

Timeout when connection as client (station)

◆ StayInApMode

bool c_WiFiDriver::StayInApMode = false
private

◆ UseDhcp

bool c_WiFiDriver::UseDhcp = true
private

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