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

The base class for SensESP applications. More...

#include <sensesp_base_app.h>

Inheritance diagram for sensesp::SensESPBaseApp:
[legend]

Public Member Functions

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 SensESPBaseAppget ()
 Get the singleton instance of the SensESPBaseApp.
 
static String get_hostname ()
 Get the current hostname.
 

Protected Member Functions

 SensESPBaseApp ()
 Construct a new SensESP Base App object.
 
virtual void setup ()
 Perform initialization of SensESPBaseApp once builder configuration is done.
 
const SensESPBaseAppset_hostname (String hostname)
 

Protected Attributes

ObservableValue< String > * hostname_
 
Filesystemfilesystem_
 
DebugOutputdebug_output_
 

Static Protected Attributes

static SensESPBaseAppinstance_ = nullptr
 

Detailed Description

The base class for SensESP applications.

SensESPBaseApp is the base class for all apps. It can be either expanded in child classes to provide additional functionality, or used as is to provide a bare-bones application.

See also
SensESPApp

Definition at line 32 of file sensesp_base_app.h.

Constructor & Destructor Documentation

◆ SensESPBaseApp()

sensesp::SensESPBaseApp::SensESPBaseApp ( )
protected

Construct a new SensESP Base App object.

This constructor must only be used in SensESPBaseAppBuilder, and must be called only once. For compatibility reasons, the class hasn't been refactored into a singleton.

Definition at line 20 of file sensesp_base_app.cpp.

Member Function Documentation

◆ get()

SensESPBaseApp * sensesp::SensESPBaseApp::get ( )
static

Get the singleton instance of the SensESPBaseApp.

Get the singleton SensESPBaseApp singleton instance. The instance must be set by the builder.

Definition at line 30 of file sensesp_base_app.cpp.

Here is the caller graph for this function:

◆ get_hostname()

String sensesp::SensESPBaseApp::get_hostname ( )
static

Get the current hostname.

Returns
String

Definition at line 74 of file sensesp_base_app.cpp.

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

◆ get_hostname_observable()

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

Get the hostname observable object.

Returns
ObservableValue<String>*

Definition at line 65 of file sensesp_base_app.cpp.

◆ reset()

void sensesp::SensESPBaseApp::reset ( )
virtual

Reset the device to factory defaults.

Definition at line 55 of file sensesp_base_app.cpp.

Here is the call graph for this function:

◆ set_hostname()

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

Definition at line 79 of file sensesp_base_app.h.

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

◆ setup()

void sensesp::SensESPBaseApp::setup ( )
protectedvirtual

Perform initialization of SensESPBaseApp once builder configuration is done.

This should be only called from the builder!

Reimplemented in sensesp::SensESPApp.

Definition at line 39 of file sensesp_base_app.cpp.

Here is the caller graph for this function:

◆ start()

void sensesp::SensESPBaseApp::start ( )
virtual

Start the app (activate all the subcomponents)

Definition at line 47 of file sensesp_base_app.cpp.

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

Member Data Documentation

◆ debug_output_

DebugOutput* sensesp::SensESPBaseApp::debug_output_
protected

Definition at line 77 of file sensesp_base_app.h.

◆ filesystem_

Filesystem* sensesp::SensESPBaseApp::filesystem_
protected

Definition at line 76 of file sensesp_base_app.h.

◆ hostname_

ObservableValue<String>* sensesp::SensESPBaseApp::hostname_
protected

Definition at line 74 of file sensesp_base_app.h.

◆ instance_

SensESPBaseApp * sensesp::SensESPBaseApp::instance_ = nullptr
staticprotected

Definition at line 72 of file sensesp_base_app.h.


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