AlteriomPainlessMesh v2.1.1
Easy ESP32/ESP8266 mesh networking with Alteriom IoT extensions
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
StationScan Class Reference

#include <painlessMeshSTA.h>

Collaboration diagram for StationScan:
Collaboration graph
[legend]

Public Member Functions

 StationScan ()
 
void init (painlessmesh::wifi::Mesh *pMesh, TSTRING ssid, TSTRING password, uint16_t port, uint8_t channel, bool hidden)
 
void stationScan ()
 
void scanComplete ()
 
void scanDone ()
 
void filterAPs ()
 
void connectToAP ()
 
bool followBridgeChannel (uint8_t targetChannel)
 
void noteRooted (uint8_t channel)
 
void noteEverRooted ()
 
void stationAttemptOver ()
 
void stationUp ()
 
void stationDown ()
 
bool droppedByMove () const
 
void redetectOnNextScan ()
 
bool atHome () const
 
void yieldConnectToAP ()
 
bool isChannelResyncNeeded () const
 
uint16_t getConsecutiveEmptyScans () const
 
void blockNodeAfterTCPFailure (uint32_t nodeId, uint32_t blockDurationMs=60000)
 
bool isNodeBlocked (uint32_t nodeId) const
 
void cleanupBlocklist ()
 

Static Public Member Functions

static uint8_t scanForMeshChannel (TSTRING meshSSID, bool meshHidden, uint8_t avoidChannel=0, TSTRING routerSSID="")
 

Public Attributes

Task task
 
bool stationLinkUp = false
 
std::list< WiFi_AP_Record_t > lastAPs
 Valid APs found during the last scan.
 

Protected Member Functions

void requestIP (WiFi_AP_Record_t &ap)
 

Protected Attributes

TSTRING ssid
 
TSTRING password
 
painlessMesh * mesh = nullptr
 
uint16_t port = 0
 
uint8_t channel = 0
 
bool hidden = false
 
std::list< WiFi_AP_Record_t > aps
 
bool manual = false
 
IPAddress manualIP = IPAddress(0, 0, 0, 0)
 
uint16_t consecutiveEmptyScans = 0
 
uint32_t connectAttemptStarted = 0
 
uint32_t channelMovedAt = 0
 
bool halfOpenDropped = false
 
bool scanRequested = false
 
bool rejoinScanned = false
 
bool redetectRequested = false
 
bool scanAllChannels = false
 
uint8_t scanSlice = 0
 
uint8_t huntChannel = 0
 
bool huntPending = false
 
std::map< uint8_t, size_t > huntCounts
 
std::map< uint8_t, int8_t > huntRssi
 
uint8_t orphanScanBackoff = 0
 
uint8_t orphanRedetects = 0
 
bool everRooted = false
 
uint8_t rootedChannel = 0
 
uint8_t homeStays = 0
 
uint8_t pendingElsewhere = 0
 
uint8_t partitionScans = 0
 
std::map< uint32_t, uint32_t > tcpFailureBlocklist
 
friend painlessMesh
 

Static Protected Attributes

static const uint16_t EMPTY_SCAN_THRESHOLD = 2
 
static constexpr int32_t MILLIS_ROLLOVER_THRESHOLD = (int32_t)(1U << 30)
 

Constructor & Destructor Documentation

◆ StationScan()

StationScan::StationScan ( )
inline

Member Function Documentation

◆ atHome()

bool StationScan::atHome ( ) const
inline

◆ blockNodeAfterTCPFailure()

void ICACHE_FLASH_ATTR StationScan::blockNodeAfterTCPFailure ( uint32_t  nodeId,
uint32_t  blockDurationMs = 60000 
)

◆ cleanupBlocklist()

void ICACHE_FLASH_ATTR StationScan::cleanupBlocklist ( )

◆ connectToAP()

void ICACHE_FLASH_ATTR StationScan::connectToAP ( )

◆ droppedByMove()

bool StationScan::droppedByMove ( ) const
inline

◆ filterAPs()

void ICACHE_FLASH_ATTR StationScan::filterAPs ( )

◆ followBridgeChannel()

bool ICACHE_FLASH_ATTR StationScan::followBridgeChannel ( uint8_t  targetChannel)

◆ getConsecutiveEmptyScans()

uint16_t StationScan::getConsecutiveEmptyScans ( ) const
inline

◆ init()

void ICACHE_FLASH_ATTR StationScan::init ( painlessmesh::wifi::Mesh *  pMesh,
TSTRING  ssid,
TSTRING  password,
uint16_t  port,
uint8_t  channel,
bool  hidden 
)

◆ isChannelResyncNeeded()

bool StationScan::isChannelResyncNeeded ( ) const
inline

◆ isNodeBlocked()

bool ICACHE_FLASH_ATTR StationScan::isNodeBlocked ( uint32_t  nodeId) const

◆ noteEverRooted()

void StationScan::noteEverRooted ( )
inline

◆ noteRooted()

void StationScan::noteRooted ( uint8_t  channel)
inline

◆ redetectOnNextScan()

void StationScan::redetectOnNextScan ( )
inline

◆ requestIP()

void ICACHE_FLASH_ATTR StationScan::requestIP ( WiFi_AP_Record_t &  ap)
protected

◆ scanComplete()

void ICACHE_FLASH_ATTR StationScan::scanComplete ( )

◆ scanDone()

void ICACHE_FLASH_ATTR StationScan::scanDone ( )

◆ scanForMeshChannel()

uint8_t ICACHE_FLASH_ATTR StationScan::scanForMeshChannel ( TSTRING  meshSSID,
bool  meshHidden,
uint8_t  avoidChannel = 0,
TSTRING  routerSSID = "" 
)
static

◆ stationAttemptOver()

void StationScan::stationAttemptOver ( )
inline

◆ stationDown()

void StationScan::stationDown ( )
inline

◆ stationScan()

void ICACHE_FLASH_ATTR StationScan::stationScan ( )

◆ stationUp()

void StationScan::stationUp ( )
inline

◆ yieldConnectToAP()

void StationScan::yieldConnectToAP ( )
inline

Member Data Documentation

◆ aps

std::list<WiFi_AP_Record_t> StationScan::aps
protected

◆ channel

uint8_t StationScan::channel = 0
protected

◆ channelMovedAt

uint32_t StationScan::channelMovedAt = 0
protected

◆ connectAttemptStarted

uint32_t StationScan::connectAttemptStarted = 0
protected

◆ consecutiveEmptyScans

uint16_t StationScan::consecutiveEmptyScans = 0
protected

◆ EMPTY_SCAN_THRESHOLD

const uint16_t StationScan::EMPTY_SCAN_THRESHOLD = 2
staticprotected

◆ everRooted

bool StationScan::everRooted = false
protected

◆ halfOpenDropped

bool StationScan::halfOpenDropped = false
protected

◆ hidden

bool StationScan::hidden = false
protected

◆ homeStays

uint8_t StationScan::homeStays = 0
protected

◆ huntChannel

uint8_t StationScan::huntChannel = 0
protected

◆ huntCounts

std::map<uint8_t, size_t> StationScan::huntCounts
protected

◆ huntPending

bool StationScan::huntPending = false
protected

◆ huntRssi

std::map<uint8_t, int8_t> StationScan::huntRssi
protected

◆ lastAPs

std::list<WiFi_AP_Record_t> StationScan::lastAPs

Valid APs found during the last scan.

◆ manual

bool StationScan::manual = false
protected

◆ manualIP

IPAddress StationScan::manualIP = IPAddress(0, 0, 0, 0)
protected

◆ mesh

painlessMesh* StationScan::mesh = nullptr
protected

◆ MILLIS_ROLLOVER_THRESHOLD

constexpr int32_t StationScan::MILLIS_ROLLOVER_THRESHOLD = (int32_t)(1U << 30)
staticconstexprprotected

◆ orphanRedetects

uint8_t StationScan::orphanRedetects = 0
protected

◆ orphanScanBackoff

uint8_t StationScan::orphanScanBackoff = 0
protected

◆ painlessMesh

friend StationScan::painlessMesh
protected

◆ partitionScans

uint8_t StationScan::partitionScans = 0
protected

◆ password

TSTRING StationScan::password
protected

◆ pendingElsewhere

uint8_t StationScan::pendingElsewhere = 0
protected

◆ port

uint16_t StationScan::port = 0
protected

◆ redetectRequested

bool StationScan::redetectRequested = false
protected

◆ rejoinScanned

bool StationScan::rejoinScanned = false
protected

◆ rootedChannel

uint8_t StationScan::rootedChannel = 0
protected

◆ scanAllChannels

bool StationScan::scanAllChannels = false
protected

◆ scanRequested

bool StationScan::scanRequested = false
protected

◆ scanSlice

uint8_t StationScan::scanSlice = 0
protected

◆ ssid

TSTRING StationScan::ssid
protected

◆ stationLinkUp

bool StationScan::stationLinkUp = false

◆ task

Task StationScan::task

◆ tcpFailureBlocklist

std::map<uint32_t, uint32_t> StationScan::tcpFailureBlocklist
protected

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