SensESP 2.7.2
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 (String ssid, String password)
 Set the Wi-Fi network 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_system_status_led (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.
 
SensESPAppget_app () override final
 Get the SensESPApp object.
 

Protected Attributes

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 16 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 34 of file sensesp_app_builder.h.

Here is the call graph for this function:

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 108 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 130 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 179 of file sensesp_app_builder.h.

Here is the call 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 97 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 163 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 119 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 141 of file sensesp_app_builder.h.

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

◆ get_app()

SensESPApp * sensesp::SensESPAppBuilder::get_app ( )
inlinefinaloverridevirtual

Get the SensESPApp object.

Return a SensESPApp object that has been setup.

Returns
SensESPApp*

Implements sensesp::SensESPBaseAppBuilder.

Definition at line 206 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 152 of file sensesp_app_builder.h.

Here is the call 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 72 of file sensesp_app_builder.h.

Here is the call 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 59 of file sensesp_app_builder.h.

Here is the call graph for this function:

◆ set_system_status_led()

SensESPAppBuilder * sensesp::SensESPAppBuilder::set_system_status_led ( 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 84 of file sensesp_app_builder.h.

Here is the call graph for this function:

◆ set_wifi()

SensESPAppBuilder * sensesp::SensESPAppBuilder::set_wifi ( 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 45 of file sensesp_app_builder.h.

Here is the call 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 194 of file sensesp_app_builder.h.

Here is the call graph for this function:

Member Data Documentation

◆ app_

SensESPApp* sensesp::SensESPAppBuilder::app_
protected

Definition at line 25 of file sensesp_app_builder.h.


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