RSeries astromech firmware
WifiAccess Class Reference

#include <wifi/WifiAccess.h>

+ Inheritance diagram for WifiAccess:
+ Collaboration diagram for WifiAccess:

Classes

class  Notify
 

Public Member Functions

 WifiAccess (uint32_t interval=30000)
 Constructor. More...
 
 WifiAccess (const String &wifiAP, const String &wifiPassword, bool accessPoint=true, bool enabled=true, uint32_t interval=30000)
 Constructor. More...
 
void setNetworkCredentials (const String &wifiAP, const String &wifiPassword, bool accessPoint, bool enabled)
 
bool isConnected ()
 
IPAddress getIPAddress ()
 
String getMacAddress ()
 
String getWifiAP ()
 
String getWifiPassword ()
 
bool isSoftAP ()
 
void setReconnect (bool reconnect)
 
virtual void animate ()
 Subclasses must implement this function to run through a single frame of animation/activity. More...
 
bool enabled ()
 
void setEnabled (bool enabled=true)
 
void addNotify (WifiAccess::Notify *client)
 
void notifyWifiConnected (void(*notify)(WifiAccess &wifi))
 
void notifyWifiDisconnected (void(*notify)(WifiAccess &wifi))
 
- Public Member Functions inherited from AnimatedEvent
 AnimatedEvent ()
 Default Constructor. More...
 
void setLoopDoneCallback (AnimatedLoopDone loopProc)
 

Protected Member Functions

void notifyConnected ()
 
void notifyDisconnected ()
 

Protected Attributes

String fWifiAP
 
String fWifiPassword
 
uint32_t fWifiInterval
 
uint32_t fWifiPrevMillis = 0
 
bool fWifiSoftAP
 
bool fWifiStarted = false
 
bool fWifiEnabled = true
 
bool fWifiAttemptReconnect = true
 
bool fWifiActive = false
 
bool fWifiWasConnected = false
 
std::vector< Notify * > fWifiNotify
 
void(* fNotifyConnectedCallback )(WifiAccess &wifi) = nullptr
 
void(* fNotifyDisconnectedCallback )(WifiAccess &wifi) = nullptr
 

Additional Inherited Members

- Static Public Member Functions inherited from AnimatedEvent
static void process ()
 Calls animate() for each created AnimatedEvent subclass. More...
 

Constructor & Destructor Documentation

◆ WifiAccess() [1/2]

WifiAccess::WifiAccess ( uint32_t  interval = 30000)
inline

Constructor.

Parameters
intervalthe number of milliseconds before attempting to reconnect

◆ WifiAccess() [2/2]

WifiAccess::WifiAccess ( const String &  wifiAP,
const String &  wifiPassword,
bool  accessPoint = true,
bool  enabled = true,
uint32_t  interval = 30000 
)
inline

Constructor.

Parameters
intervalthe number of milliseconds before attempting to reconnect

Member Function Documentation

◆ addNotify()

void WifiAccess::addNotify ( WifiAccess::Notify client)
inline

◆ animate()

virtual void WifiAccess::animate ( )
inlinevirtual

Subclasses must implement this function to run through a single frame of animation/activity.

Subclasses should not call delay() or otherwise block.

Implements AnimatedEvent.

◆ enabled()

bool WifiAccess::enabled ( )
inline

◆ getIPAddress()

IPAddress WifiAccess::getIPAddress ( )
inline

◆ getMacAddress()

String WifiAccess::getMacAddress ( )
inline

◆ getWifiAP()

String WifiAccess::getWifiAP ( )
inline

◆ getWifiPassword()

String WifiAccess::getWifiPassword ( )
inline

◆ isConnected()

bool WifiAccess::isConnected ( )
inline

◆ isSoftAP()

bool WifiAccess::isSoftAP ( )
inline

◆ notifyConnected()

void WifiAccess::notifyConnected ( )
inlineprotected

◆ notifyDisconnected()

void WifiAccess::notifyDisconnected ( )
inlineprotected

◆ notifyWifiConnected()

void WifiAccess::notifyWifiConnected ( void(*)(WifiAccess &wifi)  notify)
inline

◆ notifyWifiDisconnected()

void WifiAccess::notifyWifiDisconnected ( void(*)(WifiAccess &wifi)  notify)
inline

◆ setEnabled()

void WifiAccess::setEnabled ( bool  enabled = true)
inline

◆ setNetworkCredentials()

void WifiAccess::setNetworkCredentials ( const String &  wifiAP,
const String &  wifiPassword,
bool  accessPoint,
bool  enabled 
)
inline

◆ setReconnect()

void WifiAccess::setReconnect ( bool  reconnect)
inline

Member Data Documentation

◆ fNotifyConnectedCallback

void(* WifiAccess::fNotifyConnectedCallback) (WifiAccess &wifi) = nullptr
protected

◆ fNotifyDisconnectedCallback

void(* WifiAccess::fNotifyDisconnectedCallback) (WifiAccess &wifi) = nullptr
protected

◆ fWifiActive

bool WifiAccess::fWifiActive = false
protected

◆ fWifiAP

String WifiAccess::fWifiAP
protected

◆ fWifiAttemptReconnect

bool WifiAccess::fWifiAttemptReconnect = true
protected

◆ fWifiEnabled

bool WifiAccess::fWifiEnabled = true
protected

◆ fWifiInterval

uint32_t WifiAccess::fWifiInterval
protected

◆ fWifiNotify

std::vector<Notify*> WifiAccess::fWifiNotify
protected

◆ fWifiPassword

String WifiAccess::fWifiPassword
protected

◆ fWifiPrevMillis

uint32_t WifiAccess::fWifiPrevMillis = 0
protected

◆ fWifiSoftAP

bool WifiAccess::fWifiSoftAP
protected

◆ fWifiStarted

bool WifiAccess::fWifiStarted = false
protected

◆ fWifiWasConnected

bool WifiAccess::fWifiWasConnected = false
protected

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