SensESP 2.7.2
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
sensesp::WiFiStateProducer Class Reference

Provide information about the current WiFi state. More...

#include <sensesp/net/networking.h>

Inheritance diagram for sensesp::WiFiStateProducer:
[legend]

Public Member Functions

 WiFiStateProducer (WiFiStateProducer &other)=delete
 
void operator= (const WiFiStateProducer &)=delete
 
virtual void start () override
 
- Public Member Functions inherited from sensesp::ValueProducer< WiFiState >
 ValueProducer ()
 
virtual const WiFiStateget () const
 
void connect_to (ValueConsumer< WiFiState > *consumer, uint8_t input_channel=0)
 
void connect_to (ValueConsumer< CT > *consumer, uint8_t input_channel=0)
 Connect a producer to a consumer of a different type.
 
Transform< WiFiState, T2 > * connect_to (Transform< WiFiState, T2 > *consumer_producer, uint8_t input_channel=0)
 
Transform< TT, T2 > * connect_to (Transform< TT, T2 > *consumer_producer, uint8_t input_channel=0)
 Connect a producer to a transform with a different input type.
 
void emit (WiFiState new_value)
 
- Public Member Functions inherited from sensesp::Observable
 Observable ()
 
 Observable (Observable &&other)
 Move constructor.
 
void notify ()
 
void attach (std::function< void()> observer)
 
- Public Member Functions inherited from sensesp::Startable
 Startable (int priority=0)
 
const int get_start_priority ()
 
void set_start_priority (int priority)
 

Static Public Member Functions

static WiFiStateProducerget_singleton ()
 Get the singleton instance of the WiFiStateProducer.
 
- Static Public Member Functions inherited from sensesp::Startable
static void start_all ()
 

Protected Member Functions

 WiFiStateProducer ()
 
void setup_wifi_callbacks ()
 
void wifi_station_connected ()
 
void wifi_ap_enabled ()
 
void wifi_disconnected ()
 

Static Protected Attributes

static WiFiStateProducerinstance_ = nullptr
 

Additional Inherited Members

- Protected Attributes inherited from sensesp::ValueProducer< WiFiState >
WiFiState output
 

Detailed Description

Provide information about the current WiFi state.

WiFiStateProducer reads the current network state using Arduino Core callbacks. It is a replacement for the Networking class ValueProducer output and effectively decouples the Networkig class from the rest of the system. This allows for replacing the Networking class with a different implementation.

Definition at line 28 of file networking.h.

Constructor & Destructor Documentation

◆ WiFiStateProducer() [1/2]

sensesp::WiFiStateProducer::WiFiStateProducer ( WiFiStateProducer other)
delete

Singletons should not be cloneable

◆ WiFiStateProducer() [2/2]

sensesp::WiFiStateProducer::WiFiStateProducer ( )
inlineprotected

Definition at line 52 of file networking.h.

Here is the caller graph for this function:

Member Function Documentation

◆ get_singleton()

WiFiStateProducer * sensesp::WiFiStateProducer::get_singleton ( )
static

Get the singleton instance of the WiFiStateProducer.

Definition at line 282 of file networking.cpp.

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

◆ operator=()

void sensesp::WiFiStateProducer::operator= ( const WiFiStateProducer )
delete

Singletons should not be assignable

◆ setup_wifi_callbacks()

void sensesp::WiFiStateProducer::setup_wifi_callbacks ( )
inlineprotected

Definition at line 54 of file networking.h.

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

◆ start()

virtual void sensesp::WiFiStateProducer::start ( )
inlineoverridevirtual

Called during the initialization process. Override this method to add runtime initialization code to your class

Reimplemented from sensesp::Startable.

Definition at line 45 of file networking.h.

Here is the call graph for this function:

◆ wifi_ap_enabled()

void sensesp::WiFiStateProducer::wifi_ap_enabled ( )
inlineprotected

Definition at line 80 of file networking.h.

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

◆ wifi_disconnected()

void sensesp::WiFiStateProducer::wifi_disconnected ( )
inlineprotected

Definition at line 91 of file networking.h.

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

◆ wifi_station_connected()

void sensesp::WiFiStateProducer::wifi_station_connected ( )
inlineprotected

Definition at line 71 of file networking.h.

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

Member Data Documentation

◆ instance_

WiFiStateProducer * sensesp::WiFiStateProducer::instance_ = nullptr
staticprotected

Definition at line 96 of file networking.h.


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