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

A class for quickly configuring a SensESP application object before wiring up your sensors. More...

#include <sensesp_app_builder.h>

Inheritance diagram for sensesp::SensESPAppBuilder:
[legend]

Public Member Functions

 SensESPAppBuilder ()
 Construct a new SensESPApp Builder object.
 
SensESPAppBuilderset_wifi_client (String ssid, String password)
 Set the Wi-Fi network SSID and password.
 
SensESPAppBuilderset_wifi (String ssid, String password)
 
SensESPAppBuilderset_wifi_access_point (const String &ssid, const String &password)
 Set the wifi access point object SSID and password.
 
SensESPAppBuilderset_sk_server (String address, uint16_t port)
 Set the Signal K server address and port.
 
SensESPAppBuilderset_hostname (String hostname) override final
 Set the device hostname.
 
SensESPAppBuilderset_admin_user (const char *username, const char *password)
 Set admin username and password for the web interface.
 
SensESPAppBuilderset_system_status_led (std::shared_ptr< SystemStatusLed > system_status_led)
 Set the system status led object.
 
SensESPAppBuilderenable_system_hz_sensor (String prefix=kDefaultSystemInfoSensorPrefix)
 Enable the System Hz sensor.
 
SensESPAppBuilderenable_free_mem_sensor (String prefix=kDefaultSystemInfoSensorPrefix)
 Enable the free memory sensor.
 
SensESPAppBuilderenable_uptime_sensor (String prefix=kDefaultSystemInfoSensorPrefix)
 Report the system uptime in seconds since the last reboot.
 
SensESPAppBuilderenable_ip_address_sensor (String prefix=kDefaultSystemInfoSensorPrefix)
 Report the IP address of the device.
 
SensESPAppBuilderenable_wifi_signal_sensor (String prefix=kDefaultSystemInfoSensorPrefix)
 Report the Wi-Fi signal strength.
 
SensESPAppBuilderset_button_pin (int pin)
 Set the button GPIO pin.
 
SensESPAppBuilderenable_system_info_sensors (String prefix=kDefaultSystemInfoSensorPrefix)
 Enable all built-in system info sensors.
 
SensESPAppBuilderenable_ota (const char *password)
 Enable over-the-air updates for the device.
 
SensESPAppBuilderset_wifi_manager_password (const char *password)
 Set the wifi manager password.
 
const SensESPAppBuilderenable_wifi_watchdog ()
 
std::shared_ptr< SensESPAppget_app ()
 Get the SensESPApp object.
 
- Public Member Functions inherited from sensesp::SensESPBaseAppBuilder

Protected Attributes

std::shared_ptr< SensESPAppapp_
 
- Protected Attributes inherited from sensesp::SensESPBaseAppBuilder
String hostname_ = "SensESP"
 

Detailed Description

A class for quickly configuring a SensESP application object before wiring up your sensors.

Definition at line 21 of file sensesp_app_builder.h.

Constructor & Destructor Documentation

◆ SensESPAppBuilder()

sensesp::SensESPAppBuilder::SensESPAppBuilder ( )
inline

Construct a new SensESPApp Builder object.

SensESPAppBuilder is used to instantiate a SensESPApp object with non-trivial configuration.

Definition at line 39 of file sensesp_app_builder.h.

Member Function Documentation

◆ enable_free_mem_sensor()

SensESPAppBuilder * sensesp::SensESPAppBuilder::enable_free_mem_sensor ( String prefix = kDefaultSystemInfoSensorPrefix)
inline

Enable the free memory sensor.

Parameters
prefix
Returns
SensESPAppBuilder*

Definition at line 154 of file sensesp_app_builder.h.

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

◆ enable_ip_address_sensor()

SensESPAppBuilder * sensesp::SensESPAppBuilder::enable_ip_address_sensor ( String prefix = kDefaultSystemInfoSensorPrefix)
inline

Report the IP address of the device.

Parameters
prefix
Returns
SensESPAppBuilder*

Definition at line 186 of file sensesp_app_builder.h.

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

◆ enable_ota()

SensESPAppBuilder * sensesp::SensESPAppBuilder::enable_ota ( const char * password)
inline

Enable over-the-air updates for the device.

Parameters
passwordOTA authentication password.
Returns
SensESPAppBuilder*

Definition at line 245 of file sensesp_app_builder.h.

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

◆ enable_system_hz_sensor()

SensESPAppBuilder * sensesp::SensESPAppBuilder::enable_system_hz_sensor ( String prefix = kDefaultSystemInfoSensorPrefix)
inline

Enable the System Hz sensor.

The System Hz sensor is a built-in sensor that measures how many times the system loop is executed per second.

Parameters
prefix
Returns
SensESPAppBuilder*

Definition at line 138 of file sensesp_app_builder.h.

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

◆ enable_system_info_sensors()

SensESPAppBuilder * sensesp::SensESPAppBuilder::enable_system_info_sensors ( String prefix = kDefaultSystemInfoSensorPrefix)
inline

Enable all built-in system info sensors.

Parameters
prefix
Returns
SensESPAppBuilder*

Definition at line 229 of file sensesp_app_builder.h.

Here is the call graph for this function:

◆ enable_uptime_sensor()

SensESPAppBuilder * sensesp::SensESPAppBuilder::enable_uptime_sensor ( String prefix = kDefaultSystemInfoSensorPrefix)
inline

Report the system uptime in seconds since the last reboot.

Parameters
prefix
Returns
SensESPAppBuilder*

Definition at line 170 of file sensesp_app_builder.h.

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

◆ enable_wifi_signal_sensor()

SensESPAppBuilder * sensesp::SensESPAppBuilder::enable_wifi_signal_sensor ( String prefix = kDefaultSystemInfoSensorPrefix)
inline

Report the Wi-Fi signal strength.

Parameters
prefix
Returns
SensESPAppBuilder*

Definition at line 202 of file sensesp_app_builder.h.

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

◆ enable_wifi_watchdog()

const SensESPAppBuilder * sensesp::SensESPAppBuilder::enable_wifi_watchdog ( )
inline

Definition at line 266 of file sensesp_app_builder.h.

Here is the call graph for this function:

◆ get_app()

std::shared_ptr< SensESPApp > sensesp::SensESPAppBuilder::get_app ( )
inline

Get the SensESPApp object.

Return a SensESPApp object that has been setup.

Returns
SensESPApp*

Definition at line 292 of file sensesp_app_builder.h.

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

◆ set_admin_user()

SensESPAppBuilder * sensesp::SensESPAppBuilder::set_admin_user ( const char * username,
const char * password )
inline

Set admin username and password for the web interface.

Definition at line 110 of file sensesp_app_builder.h.

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

◆ set_button_pin()

SensESPAppBuilder * sensesp::SensESPAppBuilder::set_button_pin ( int pin)
inline

Set the button GPIO pin.

Returns
SensESPAppBuilder*

Definition at line 218 of file sensesp_app_builder.h.

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

◆ set_hostname()

SensESPAppBuilder * sensesp::SensESPAppBuilder::set_hostname ( String hostname)
inlinefinaloverridevirtual

Set the device hostname.

If not set, the device hostname is set to "SensESP".

Parameters
hostname
Returns
SensESPAppBuilder*

Implements sensesp::SensESPBaseAppBuilder.

Definition at line 102 of file sensesp_app_builder.h.

Here is the caller graph for this function:

◆ set_sk_server()

SensESPAppBuilder * sensesp::SensESPAppBuilder::set_sk_server ( String address,
uint16_t port )
inline

Set the Signal K server address and port.

If not set, mDNS is used to discover the Signal K server.

Parameters
address
port
Returns
SensESPAppBuilder*

Definition at line 89 of file sensesp_app_builder.h.

Here is the caller graph for this function:

◆ set_system_status_led()

SensESPAppBuilder * sensesp::SensESPAppBuilder::set_system_status_led ( std::shared_ptr< SystemStatusLed > system_status_led)
inline

Set the system status led object.

This allows custom status LED patterns to be used.

Parameters
system_status_led
Returns
SensESPAppBuilder*

Definition at line 124 of file sensesp_app_builder.h.

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

◆ set_wifi()

SensESPAppBuilder * sensesp::SensESPAppBuilder::set_wifi ( String ssid,
String password )
inline

Definition at line 60 of file sensesp_app_builder.h.

Here is the call graph for this function:

◆ set_wifi_access_point()

SensESPAppBuilder * sensesp::SensESPAppBuilder::set_wifi_access_point ( const String & ssid,
const String & password )
inline

Set the wifi access point object SSID and password.

To disable the SSID, set both to empty strings.

Parameters
ssid
password
Returns
SensESPAppBuilder*

Definition at line 73 of file sensesp_app_builder.h.

◆ set_wifi_client()

SensESPAppBuilder * sensesp::SensESPAppBuilder::set_wifi_client ( String ssid,
String password )
inline

Set the Wi-Fi network SSID and password.

If not set, WiFiManager is used to create an access point for configuring the settings.

Parameters
ssid
password
Returns
SensESPAppBuilder*

Definition at line 53 of file sensesp_app_builder.h.

Here is the caller graph for this function:

◆ set_wifi_manager_password()

SensESPAppBuilder * sensesp::SensESPAppBuilder::set_wifi_manager_password ( const char * password)
inline

Set the wifi manager password.

Set the password for the WiFi configuration access point that is enabled after device reset if no wifi configuration is provided in the application code.

Parameters
password
Returns
SensESPAppBuilder*

Definition at line 261 of file sensesp_app_builder.h.

Member Data Documentation

◆ app_

std::shared_ptr<SensESPApp> sensesp::SensESPAppBuilder::app_
protected

Definition at line 30 of file sensesp_app_builder.h.


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