Logo Pico-Framework A web-first embedded framework for C++
Loading...
Searching...
No Matches
FrameworkApp.cpp
Go to the documentation of this file.
1
19#include "framework/FrameworkManager.h" // <-- This is important for wiring up system services, right now that means starting WiFi and setting the system time from a network time server
20
22FrameworkApp::FrameworkApp(int port, const char *name, uint16_t stackSize, UBaseType_t priority)
23 : FrameworkController(name, router, stackSize, priority),
24 router(),
25 server(port, router),
26 manager(this, router)
27{
28 manager.start();
29}
30
33{
34 FrameworkController::start(); // Start this app's task and calls run(), you are safely in the FreeRTOS task context in run())
35}
36
38{
39 FrameworkController::onStart(); // Call base class start logic (including any route initialization)
40}
Base class for applications using the PicoFramework.
Orchestrates application startup and network initialization.
FrameworkManager manager
Responsible for launching system services and networking.
FrameworkApp(int port, const char *name="AppTask", uint16_t stackSize=2048, UBaseType_t priority=tskIDLE_PRIORITY+1)
Constructor.
virtual void start()
Initializes the application and its framework services.
void onStart() override
Starts the Framework Manager.
Base class for event-driven control logic in embedded applications.
virtual void onStart()
Called once at task start before entering the main loop.
bool start()
Starts the task via FreeRTOS.