|
| | NetworkScheduler (Credentials &credentials) |
| | Construct a new NetworkScheduler.
|
| |
| virtual void | pushTo (TaskScheduler &scheduler) override |
| | Push all network tasks to the scheduler.
|
| |
| virtual void | attach () override |
| | Attach the network scheduler and start initial connection.
|
| |
| void | config () |
| | Start or recover configuration mode.
|
| |
| void | forget () |
| | Forget stored WiFi credentials and enter configuration mode.
|
| |
| bool | reconnect () |
| | Attempt to reconnect using stored credentials.
|
| |
| bool | setCredentials (const String &ssid, const String &password) |
| | Set and store new WiFi credentials.
|
| |
| bool | addCustomPage (const String &path, const uint8_t *gzData, size_t gzLen, const String &label="", const char *contentType="text/html") |
| | Register a custom gzipped page on the configuration portal.
|
| |
| bool | addCustomRoute (const String &path, WebRequestMethodComposite method, ArRequestHandlerFunction handler) |
| | Register a custom HTTP route on the configuration portal.
|
| |
| virtual | ~ISchedulerConnectionKit () |
| | Virtual destructor for proper cleanup.
|
| |
| virtual | ~EventEmitter ()=default |
| | Virtual destructor to ensure proper cleanup of derived classes.
|
| |
| virtual type_id | getTypeId () const override |
| | Returns the type identifier for this EventEmitter.
|
| |
| void | emitEvent (unsigned int topic, int msg) |
| | Emits an event to all registered event buses.
|
| |
| virtual | ~EventEmitter ()=default |
| | Virtual destructor to ensure proper cleanup of derived classes.
|
| |
| virtual type_id | getTypeId () const override |
| | Returns the type identifier for this EventEmitter.
|
| |
| void | emitEvent (unsigned int topic, int msg) |
| | Emits an event to all registered event buses.
|
| |
| virtual | ~EventEntity () |
| | Destructor - disconnects from all connected EventBus instances.
|
| |
| bool | sendDataToChannel (T_topic channel, T_data data) |
| | Sends data to a specific channel on all connected EventBus instances.
|
| |
| void | receiveDataFromChannel (T_topic channel, DataChannelCallback callback) |
| | Receives data from a specific channel on all connected EventBus instances.
|
| |
Complete WiFi network management and configuration scheduler.
This class orchestrates all aspects of WiFi connectivity including station connection, access point configuration mode, web-based setup interface, and ongoing network monitoring. It implements the ISchedulerConnectionKit interface and emits network events through the CoreEventEmitter system.
The scheduler operates in multiple modes:
- STA mode: Connects to configured WiFi networks
- AP mode: Creates configuration access point
- Hybrid mode: Maintains AP while attempting STA connection
All operations are task-based and non-blocking, making it suitable for real-time embedded applications.
| bool uniot::NetworkScheduler::addCustomPage |
( |
const String & | path, |
|
|
const uint8_t * | gzData, |
|
|
size_t | gzLen, |
|
|
const String & | label = "", |
|
|
const char * | contentType = "text/html" ) |
|
inline |
Register a custom gzipped page on the configuration portal.
- Parameters
-
| path | URL path to serve the page on (e.g. "/app") |
| gzData | Pointer to the gzipped page data |
| gzLen | Length of the gzipped data in bytes |
| label | Button label shown in the portal UI (empty hides the button) |
| contentType | MIME content type (default: "text/html") |
- Return values
-
| bool | true if the route was registered, false if the server is unavailable |
Serves a user-supplied embedded page from the captive portal server. The data must remain valid for the lifetime of the server, which is the case for a PROGMEM array generated from a gzipped file.
The path and label are reported to the configuration UI in the status payload, which renders a link to the page.