SensESP 2.7.2
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
sensesp_app_builder.h
Go to the documentation of this file.
1#ifndef SENSESP_APP_BUILDER_H
2#define SENSESP_APP_BUILDER_H
3
5#include "sensesp_app.h"
7
8const char* kDefaultSystemInfoSensorPrefix = "sensorDevice.";
9
10namespace sensesp {
11
17 private:
18 String hostname_ = "SensESP";
19 String ssid_ = "";
20 String password_ = "";
21 String sk_server_address_ = "";
22 uint16_t sk_server_port_ = 0;
23
24 protected:
26
27 public:
74 return this;
75 }
146
153 app_->set_button_pin(pin);
154 return this;
155 }
156
172
181 return this;
182 }
183
198
207 app_->setup();
208 return app_;
209 }
210};
211
212} // namespace sensesp
213
214#endif
Reports the current amount of unused memory of the ESP.
Definition system_info.h:67
Reports the IP address of the ESP once it's connected to wifi.
Construct a new transform based on a single function.
A class for quickly configuring a SensESP application object before wiring up your sensors.
SensESPAppBuilder()
Construct a new SensESPApp Builder object.
SensESPAppBuilder * set_hostname(String hostname) override final
Set the device hostname.
SensESPAppBuilder * set_sk_server(String address, uint16_t port)
Set the Signal K server address and port.
SensESPAppBuilder * set_wifi(String ssid, String password)
Set the Wi-Fi network SSID and password.
SensESPAppBuilder * set_wifi_manager_password(const char *password)
Set the wifi manager password.
SensESPAppBuilder * enable_ip_address_sensor(String prefix=kDefaultSystemInfoSensorPrefix)
Report the IP address of the device.
SensESPAppBuilder * enable_free_mem_sensor(String prefix=kDefaultSystemInfoSensorPrefix)
Enable the free memory sensor.
SensESPAppBuilder * set_button_pin(int pin)
Set the button GPIO pin.
SensESPApp * get_app() override final
Get the SensESPApp object.
SensESPAppBuilder * enable_system_hz_sensor(String prefix=kDefaultSystemInfoSensorPrefix)
Enable the System Hz sensor.
SensESPAppBuilder * set_system_status_led(SystemStatusLed *system_status_led)
Set the system status led object.
SensESPAppBuilder * enable_system_info_sensors(String prefix=kDefaultSystemInfoSensorPrefix)
Enable all built-in system info sensors.
SensESPAppBuilder * enable_uptime_sensor(String prefix=kDefaultSystemInfoSensorPrefix)
Report the system uptime in seconds since the last reboot.
SensESPAppBuilder * enable_wifi_signal_sensor(String prefix=kDefaultSystemInfoSensorPrefix)
Report the Wi-Fi signal strength.
SensESPAppBuilder * enable_ota(const char *password)
Enable over-the-air updates for the device.
const SensESPApp * set_sk_server_port(uint16_t sk_server_port)
Definition sensesp_app.h:91
static SensESPApp * get()
Get the singleton instance of the SensESPApp.
const SensESPApp * set_hostname(String hostname)
Definition sensesp_app.h:75
const SensESPApp * set_sk_server_address(String sk_server_address)
Definition sensesp_app.h:87
const SensESPApp * set_system_status_led(SystemStatusLed *system_status_led)
Definition sensesp_app.h:95
void setup()
Perform initialization of SensESPApp once builder configuration is done.
const SensESPApp * set_wifi_manager_password(const char *password)
const SensESPApp * set_wifi_password(String wifi_password)
Definition sensesp_app.h:83
const SensESPApp * enable_ota(const char *password)
Definition sensesp_app.h:99
const SensESPApp * set_ssid(String ssid)
Definition sensesp_app.h:79
const SensESPApp * set_button_pin(int pin)
Abstract base class for other SensESP*AppBuilder classes.
Reports the current clock speed of the ESP.
Definition system_info.h:46
Consumes the networking and websocket states and delta counts and updates the device LED accordingly....
Reports the number of seconds since the last restart of the ESP.
Definition system_info.h:85
Reports the current strength of the wifi signal that the ESP is connected to.
void connect_system_info_sensor(SensorT< T > *sensor, String prefix, String name)
Connect a system information sensor to SKOutput.
Definition system_info.h:17
const char * kDefaultSystemInfoSensorPrefix