|
SensESP 3.1.1
Universal Signal K sensor toolkit ESP32
|
Manages the ESP's connection to the Wifi network. More...
#include <sensesp/net/networking.h>
Public Member Functions | |
| Networking (const String &config_path, const String &client_ssid="", const String &client_password="", const String &ap_ssid="", const String &ap_password="") | |
| ~Networking () | |
| virtual void | reset () override |
| virtual bool | to_json (JsonObject &doc) override |
| Serialize the current configuration to a JSON document. | |
| virtual bool | from_json (const JsonObject &config) override |
| void | start_wifi_scan () |
| int16_t | get_wifi_scan_results (std::vector< WiFiNetworkInfo > &ssid_list) |
| bool | is_captive_portal_enabled () |
| const std::shared_ptr< WiFiStateProducer > & | get_wifi_state_producer () |
Public Member Functions inherited from sensesp::FileSystemSaveable | |
| FileSystemSaveable (const String &config_path) | |
| virtual bool | load () override |
| Load and populate the object from a persistent storage. | |
| virtual bool | save () override |
| Save the object to a persistent storage. | |
| virtual bool | clear () override |
| Delete the data from a persistent storage. | |
| bool | find_config_file (const String &config_path, String &filename) |
Public Member Functions inherited from sensesp::Saveable | |
| Saveable (const String &config_path) | |
| virtual bool | refresh () |
| Refresh the object. This may or may not access the persistent storage but is not expected to overwrite the object's state. | |
| const String & | get_config_path () const |
Public Member Functions inherited from sensesp::Resettable | |
| Resettable (int priority=0) | |
| const int | get_reset_priority () const |
| void | set_reset_priority (int priority) |
Public Member Functions inherited from sensesp::ValueProducer< WiFiState > | |
| ValueProducer () | |
| ValueProducer (const WiFiState &initial_value) | |
| virtual const WiFiState & | get () const |
| std::enable_if< std::is_base_of< ValueConsumer< typenameVConsumer::input_type >, VConsumer >::value &&std::is_convertible< WiFiState, typenameVConsumer::input_type >::value, std::shared_ptr< VConsumer > >::type | connect_to (std::shared_ptr< VConsumer > consumer) |
| Connect a producer to a transform with a different input type. | |
| std::enable_if< std::is_base_of< ValueConsumer< typenameVConsumer::input_type >, VConsumer >::value &&std::is_convertible< WiFiState, typenameVConsumer::input_type >::value, VConsumer * >::type | connect_to (VConsumer *consumer) |
| std::enable_if< std::is_base_of< ValueConsumer< typenameVConsumer::input_type >, VConsumer >::value &&std::is_convertible< WiFiState, typenameVConsumer::input_type >::value, VConsumer * >::type | connect_to (VConsumer &consumer) |
| void | emit (const WiFiState &new_value) |
Public Member Functions inherited from sensesp::Observable | |
| Observable () | |
| Observable (Observable &&other) | |
| Move constructor. | |
| void | notify () |
| void | attach (std::function< void()> observer) |
Protected Member Functions | |
| void | start_access_point () |
| Start an access point. | |
| void | start_client_autoconnect () |
| Start WiFi using preset SSID and password. | |
Protected Attributes | |
| AccessPointSettings | ap_settings_ |
| bool | client_enabled_ = false |
| std::vector< ClientSSIDConfig > | client_settings_ |
| std::unique_ptr< DNSServer > | dns_server_ |
| std::shared_ptr< WiFiStateProducer > | wifi_state_producer_ |
| std::shared_ptr< LambdaConsumer< WiFiState > > | wifi_state_emitter_ |
Protected Attributes inherited from sensesp::Saveable | |
| const String | config_path_ |
Protected Attributes inherited from sensesp::ValueProducer< WiFiState > | |
| WiFiState | output_ |
Additional Inherited Members | |
Static Public Member Functions inherited from sensesp::Resettable | |
| static void | reset_all () |
Manages the ESP's connection to the Wifi network.
Definition at line 244 of file networking.h.
| sensesp::Networking::Networking | ( | const String & | config_path, |
| const String & | client_ssid = "", | ||
| const String & | client_password = "", | ||
| const String & | ap_ssid = "", | ||
| const String & | ap_password = "" ) |
| sensesp::Networking::~Networking | ( | ) |
Definition at line 110 of file networking.cpp.
|
overridevirtual |
Deserializes the current object data from a JsonObject.
Reimplemented from sensesp::Serializable.
Definition at line 240 of file networking.cpp.
| int16_t sensesp::Networking::get_wifi_scan_results | ( | std::vector< WiFiNetworkInfo > & | ssid_list | ) |
Definition at line 316 of file networking.cpp.
|
inline |
Definition at line 265 of file networking.h.
|
inline |
Definition at line 261 of file networking.h.
|
overridevirtual |
Reimplemented from sensesp::Resettable.
Definition at line 292 of file networking.cpp.
|
protected |
Start an access point.
Definition at line 123 of file networking.cpp.
|
protected |
Start WiFi using preset SSID and password.
Definition at line 143 of file networking.cpp.
| void sensesp::Networking::start_wifi_scan | ( | ) |
Definition at line 302 of file networking.cpp.
|
overridevirtual |
Serialize the current configuration to a JSON document.
Reimplemented from sensesp::Serializable.
Definition at line 222 of file networking.cpp.
|
protected |
Definition at line 273 of file networking.h.
|
protected |
Definition at line 275 of file networking.h.
|
protected |
Definition at line 276 of file networking.h.
|
protected |
Definition at line 278 of file networking.h.
|
protected |
Definition at line 283 of file networking.h.
|
protected |
Definition at line 280 of file networking.h.