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

#include <sensesp_app.h>

Inheritance diagram for sensesp::SensESPApp:
[legend]

Public Member Functions

 SensESPApp (SensESPApp &other)=delete
 
void operator= (const SensESPApp &)=delete
 
ObservableValue< String > * get_hostname_observable ()
 
SKDeltaQueueget_sk_delta ()
 
SystemStatusControllerget_system_status_controller ()
 
Networkingget_networking ()
 
WSClientget_ws_client ()
 
- Public Member Functions inherited from sensesp::SensESPBaseApp
virtual void start ()
 Start the app (activate all the subcomponents)
 
virtual void reset ()
 Reset the device to factory defaults.
 
ObservableValue< String > * get_hostname_observable ()
 Get the hostname observable object.
 

Static Public Member Functions

static SensESPAppget ()
 Get the singleton instance of the SensESPApp.
 
- Static Public Member Functions inherited from sensesp::SensESPBaseApp
static SensESPBaseAppget ()
 Get the singleton instance of the SensESPBaseApp.
 
static String get_hostname ()
 Get the current hostname.
 

Protected Member Functions

 SensESPApp ()
 SensESPApp constructor.
 
const SensESPAppset_hostname (String hostname)
 
const SensESPAppset_ssid (String ssid)
 
const SensESPAppset_wifi_password (String wifi_password)
 
const SensESPAppset_sk_server_address (String sk_server_address)
 
const SensESPAppset_sk_server_port (uint16_t sk_server_port)
 
const SensESPAppset_system_status_led (SystemStatusLed *system_status_led)
 
const SensESPAppenable_ota (const char *password)
 
const SensESPAppset_button_pin (int pin)
 
const SensESPAppset_wifi_manager_password (const char *password)
 
void setup ()
 Perform initialization of SensESPApp once builder configuration is done.
 
- Protected Member Functions inherited from sensesp::SensESPBaseApp
 SensESPBaseApp ()
 Construct a new SensESP Base App object.
 
const SensESPBaseAppset_hostname (String hostname)
 

Protected Attributes

String ssid_ = ""
 
String wifi_password_ = ""
 
String sk_server_address_ = ""
 
uint16_t sk_server_port_ = 0
 
const charota_password_ = nullptr
 
const charwifi_manager_password_ = "thisisfine"
 
Filesystemfilesystem_
 
DebugOutputdebug_output_
 
MDNSDiscoverymdns_discovery_
 
HTTPServerhttp_server_
 
SystemStatusLedsystem_status_led_ = NULL
 
SystemStatusController system_status_controller_
 
int button_gpio_pin_ = SENSESP_BUTTON_PIN
 
ButtonHandlerbutton_handler_ = nullptr
 
Networkingnetworking_ = NULL
 
OTAota_
 
SKDeltaQueuesk_delta_queue_
 
WSClientws_client_
 
UIOutput< String > * build_info_ui_output_
 
UIOutput< String > * sensesp_version_ui_output_
 
UIOutput< String > * hostname_ui_output_
 
UIOutput< String > * mac_address_ui_output_
 
UILambdaOutput< String > * wifi_ssid_ui_output_
 
UILambdaOutput< int8_t > * wifi_rssi_ui_output_
 
UILambdaOutput< String > * sk_server_address_ui_output_
 
UILambdaOutput< uint16_t > * sk_server_port_ui_output_
 
UILambdaOutput< String > * sk_server_connection_ui_output_
 
- Protected Attributes inherited from sensesp::SensESPBaseApp
ObservableValue< String > * hostname_
 
Filesystemfilesystem_
 
DebugOutputdebug_output_
 

Friends

class HTTPServer
 
class SensESPAppBuilder
 

Additional Inherited Members

- Static Protected Attributes inherited from sensesp::SensESPBaseApp
static SensESPBaseAppinstance_ = nullptr
 

Detailed Description

The default SensESP application object with networking and Signal K communication.

See also
SensESPAppBuilder

Definition at line 34 of file sensesp_app.h.

Constructor & Destructor Documentation

◆ SensESPApp() [1/2]

sensesp::SensESPApp::SensESPApp ( SensESPApp other)
delete

Singletons should not be cloneable

◆ SensESPApp() [2/2]

sensesp::SensESPApp::SensESPApp ( )
inlineprotected

SensESPApp constructor.

Note that the constructor is protected, so SensESPApp should only be instantiated using SensESPAppBuilder.

Definition at line 69 of file sensesp_app.h.

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

Member Function Documentation

◆ enable_ota()

const SensESPApp * sensesp::SensESPApp::enable_ota ( const char password)
inlineprotected

Definition at line 99 of file sensesp_app.h.

Here is the caller graph for this function:

◆ get()

SensESPApp * sensesp::SensESPApp::get ( )
static

Get the singleton instance of the SensESPApp.

Definition at line 12 of file sensesp_app.cpp.

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

◆ get_hostname_observable()

ObservableValue< String > * sensesp::SensESPApp::get_hostname_observable ( )

Definition at line 85 of file sensesp_app.cpp.

◆ get_networking()

Networking * sensesp::SensESPApp::get_networking ( )
inline

Definition at line 58 of file sensesp_app.h.

◆ get_sk_delta()

SKDeltaQueue * sensesp::SensESPApp::get_sk_delta ( )
inline

Definition at line 54 of file sensesp_app.h.

◆ get_system_status_controller()

SystemStatusController * sensesp::SensESPApp::get_system_status_controller ( )
inline

Definition at line 55 of file sensesp_app.h.

◆ get_ws_client()

WSClient * sensesp::SensESPApp::get_ws_client ( )
inline

Definition at line 59 of file sensesp_app.h.

◆ operator=()

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

Singletons should not be assignable

◆ set_button_pin()

const SensESPApp * sensesp::SensESPApp::set_button_pin ( int  pin)
inlineprotected

Definition at line 103 of file sensesp_app.h.

Here is the caller graph for this function:

◆ set_hostname()

const SensESPApp * sensesp::SensESPApp::set_hostname ( String  hostname)
inlineprotected

Definition at line 75 of file sensesp_app.h.

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

◆ set_sk_server_address()

const SensESPApp * sensesp::SensESPApp::set_sk_server_address ( String  sk_server_address)
inlineprotected

Definition at line 87 of file sensesp_app.h.

Here is the caller graph for this function:

◆ set_sk_server_port()

const SensESPApp * sensesp::SensESPApp::set_sk_server_port ( uint16_t  sk_server_port)
inlineprotected

Definition at line 91 of file sensesp_app.h.

Here is the caller graph for this function:

◆ set_ssid()

const SensESPApp * sensesp::SensESPApp::set_ssid ( String  ssid)
inlineprotected

Definition at line 79 of file sensesp_app.h.

Here is the caller graph for this function:

◆ set_system_status_led()

const SensESPApp * sensesp::SensESPApp::set_system_status_led ( SystemStatusLed system_status_led)
inlineprotected

Definition at line 95 of file sensesp_app.h.

Here is the caller graph for this function:

◆ set_wifi_manager_password()

const SensESPApp * sensesp::SensESPApp::set_wifi_manager_password ( const char password)
inlineprotected

Definition at line 107 of file sensesp_app.h.

Here is the caller graph for this function:

◆ set_wifi_password()

const SensESPApp * sensesp::SensESPApp::set_wifi_password ( String  wifi_password)
inlineprotected

Definition at line 83 of file sensesp_app.h.

Here is the caller graph for this function:

◆ setup()

void sensesp::SensESPApp::setup ( )
protectedvirtual

Perform initialization of SensESPApp once builder configuration is done.

This should be only called from the builder!

Reimplemented from sensesp::SensESPBaseApp.

Definition at line 26 of file sensesp_app.cpp.

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

Friends And Related Symbol Documentation

◆ HTTPServer

Definition at line 163 of file sensesp_app.h.

◆ SensESPAppBuilder

Definition at line 164 of file sensesp_app.h.

Member Data Documentation

◆ build_info_ui_output_

UIOutput<String>* sensesp::SensESPApp::build_info_ui_output_
protected
Initial value:
=
new UIOutput<String>("Built at", __DATE__ " " __TIME__, "Software", 2000)

Definition at line 135 of file sensesp_app.h.

◆ button_gpio_pin_

int sensesp::SensESPApp::button_gpio_pin_ = SENSESP_BUTTON_PIN
protected

Definition at line 127 of file sensesp_app.h.

◆ button_handler_

ButtonHandler* sensesp::SensESPApp::button_handler_ = nullptr
protected

Definition at line 128 of file sensesp_app.h.

◆ debug_output_

DebugOutput* sensesp::SensESPApp::debug_output_
protected

Definition at line 122 of file sensesp_app.h.

◆ filesystem_

Filesystem* sensesp::SensESPApp::filesystem_
protected

Definition at line 121 of file sensesp_app.h.

◆ hostname_ui_output_

UIOutput<String>* sensesp::SensESPApp::hostname_ui_output_
protected
Initial value:
=
new UIOutput<String>("Hostname", "", "Network", 500)

Definition at line 139 of file sensesp_app.h.

◆ http_server_

HTTPServer* sensesp::SensESPApp::http_server_
protected

Definition at line 124 of file sensesp_app.h.

◆ mac_address_ui_output_

UIOutput<String>* sensesp::SensESPApp::mac_address_ui_output_
protected
Initial value:
=
new UIOutput<String>("MAC Address", WiFi.macAddress(), "Network", 1100)

Definition at line 141 of file sensesp_app.h.

◆ mdns_discovery_

MDNSDiscovery* sensesp::SensESPApp::mdns_discovery_
protected

Definition at line 123 of file sensesp_app.h.

◆ networking_

Networking* sensesp::SensESPApp::networking_ = NULL
protected

Definition at line 130 of file sensesp_app.h.

◆ ota_

OTA* sensesp::SensESPApp::ota_
protected

Definition at line 131 of file sensesp_app.h.

◆ ota_password_

const char* sensesp::SensESPApp::ota_password_ = nullptr
protected

Definition at line 118 of file sensesp_app.h.

◆ sensesp_version_ui_output_

UIOutput<String>* sensesp::SensESPApp::sensesp_version_ui_output_
protected
Initial value:
= new UIOutput<String>(
"SenseESP version", kSensESPVersion, "Software", 1900)
const char *const kSensESPVersion

Definition at line 137 of file sensesp_app.h.

◆ sk_delta_queue_

SKDeltaQueue* sensesp::SensESPApp::sk_delta_queue_
protected

Definition at line 132 of file sensesp_app.h.

◆ sk_server_address_

String sensesp::SensESPApp::sk_server_address_ = ""
protected

Definition at line 116 of file sensesp_app.h.

◆ sk_server_address_ui_output_

UILambdaOutput<String>* sensesp::SensESPApp::sk_server_address_ui_output_
protected
Initial value:
=
new UILambdaOutput<String>(
"Signal K server address",
[this]() { return ws_client_->get_server_address(); }, "Network",
1400)
WSClient * ws_client_
const String get_server_address() const
Definition ws_client.h:42

Definition at line 148 of file sensesp_app.h.

◆ sk_server_connection_ui_output_

UILambdaOutput<String>* sensesp::SensESPApp::sk_server_connection_ui_output_
protected
Initial value:
=
new UILambdaOutput<String>(
"SK connection status",
[this]() { return ws_client_->get_connection_status(); }, "Network",
1600)
String get_connection_status()
Get a String representation of the current connection state.

Definition at line 157 of file sensesp_app.h.

◆ sk_server_port_

uint16_t sensesp::SensESPApp::sk_server_port_ = 0
protected

Definition at line 117 of file sensesp_app.h.

◆ sk_server_port_ui_output_

UILambdaOutput<uint16_t>* sensesp::SensESPApp::sk_server_port_ui_output_
protected
Initial value:
=
new UILambdaOutput<uint16_t>(
"Signal K server port",
[this]() { return ws_client_->get_server_port(); }, "Network", 1500)
const uint16_t get_server_port() const
Definition ws_client.h:43

Definition at line 153 of file sensesp_app.h.

◆ ssid_

String sensesp::SensESPApp::ssid_ = ""
protected

Definition at line 114 of file sensesp_app.h.

◆ system_status_controller_

SystemStatusController sensesp::SensESPApp::system_status_controller_
protected

Definition at line 126 of file sensesp_app.h.

◆ system_status_led_

SystemStatusLed* sensesp::SensESPApp::system_status_led_ = NULL
protected

Definition at line 125 of file sensesp_app.h.

◆ wifi_manager_password_

const char* sensesp::SensESPApp::wifi_manager_password_ = "thisisfine"
protected

Definition at line 119 of file sensesp_app.h.

◆ wifi_password_

String sensesp::SensESPApp::wifi_password_ = ""
protected

Definition at line 115 of file sensesp_app.h.

◆ wifi_rssi_ui_output_

UILambdaOutput<int8_t>* sensesp::SensESPApp::wifi_rssi_ui_output_
protected
Initial value:
= new UILambdaOutput<int8_t>(
"WiFi signal strength", [this]() { return WiFi.RSSI(); }, "Network",
1300)

Definition at line 145 of file sensesp_app.h.

◆ wifi_ssid_ui_output_

UILambdaOutput<String>* sensesp::SensESPApp::wifi_ssid_ui_output_
protected
Initial value:
= new UILambdaOutput<String>(
"SSID", [this]() { return WiFi.SSID(); }, "Network", 1200)

Definition at line 143 of file sensesp_app.h.

◆ ws_client_

WSClient* sensesp::SensESPApp::ws_client_
protected

Definition at line 133 of file sensesp_app.h.


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