Doxygen with github
|
A component that manages AP-based configuration. More...
#include <ksWifiConfigurator.h>
Public Member Functions | |
virtual const size_t | getInstanceType () const |
Retrieves type ID of the object. | |
virtual bool | isA (const size_t id) const |
Checks whether object is of given type. | |
ksWifiConfigurator () | |
Constructs WiFi configurator object. | |
ksWifiConfigurator (std::string devicePrefixName) | |
Constructs WiFi configurator object. | |
bool | loop (ksApplication *app) override |
Handles ksWifiConfigurator logic. | |
bool | init (ksApplication *app) override |
Implements ksWifiConfigurator initialization logic. | |
bool | postInit (ksApplication *app) override |
Implements ksWifiConfigurator post-initialization logic. | |
virtual | ~ksWifiConfigurator () |
Destructs WiFi configurator component. | |
Public Member Functions inherited from ksf::ksComponent | |
Public Member Functions inherited from ksf::ksRtti | |
template<typename TType > | |
TType * | as () |
Tries to cast object to the type provided as a template parameter. | |
template<typename TType > | |
const TType * | as () const |
Tries to cast object to the type provided as a template parameter (const version). | |
Static Public Member Functions | |
static const size_t | getClassType () |
Static Public Member Functions inherited from ksf::ksComponent | |
static const size_t | getClassType () |
Protected Member Functions | |
void | handlePeriodicTasks () |
Handles periodic tasks like WiFi management. | |
Protected Attributes | |
ksApplication * | app {nullptr} |
Pointer to ksApplication object that owns this component. | |
std::string | deviceName |
Device name (prefix). | |
ksf::ksSimpleTimer | configTimeout {120 * 1000} |
Timeout for captive portal in ms. | |
ksf::ksSimpleTimer | periodicTasksTimeout {1000} |
Timeout for loop in ms. | |
Protected Attributes inherited from ksf::ksComponent | |
ksComponentState::TYPE | componentState { ksComponentState::NotInitialized } |
A component that manages AP-based configuration.
Handles Device Portal, where the user can configure the device like WiFi or MQTT credentials as well as custom, application-defined parameters implemented using ksConfigProvider interface.
ksf::comps::ksWifiConfigurator::ksWifiConfigurator | ( | std::string | devicePrefixName | ) |
Constructs WiFi configurator object.
devicePrefixName | Device prefix name, will be used in AP (DEVPREFIX-112ACB84) and hostname |
References deviceName.
|
inlinevirtual |
|
overridevirtual |
Implements ksWifiConfigurator initialization logic.
app | Pointer to ksApplication object that owns this component |
Reimplemented from ksf::ksComponent.
References ksf::ksApplication::addComponent(), app, and deviceName.
|
inlinevirtual |
Checks whether object is of given type.
id | Type ID to check against. |
Reimplemented from ksf::ksComponent.
|
overridevirtual |
Handles ksWifiConfigurator logic.
It starts and handles Device Portal, where the user can configure the device (that means WiFi or MQTT credential as well as custom defined device parameters).
app | Pointer to ksApplication object that owns this component. |
Reimplemented from ksf::ksComponent.
References configTimeout, handlePeriodicTasks(), periodicTasksTimeout, and ksf::ksSimpleTimer::triggered().
|
overridevirtual |
Implements ksWifiConfigurator post-initialization logic.
app | Pointer to ksApplication object that owns this component |
Reimplemented from ksf::ksComponent.
References app, ksf::ksApplication::findComponents(), and ksf::comps::ksLed::setEnabled().