Logo Pico-Framework A web-first embedded framework for C++
Loading...
Searching...
No Matches
FrameworkApp.h
Go to the documentation of this file.
1
21#ifndef FRAMEWORK_APP_H
22#define FRAMEWORK_APP_H
23#pragma once
24
28#include "http/Router.h"
29#include "http/HttpServer.h"
30
40{
41public:
59 FrameworkApp(int port, const char* name = "AppTask", uint16_t stackSize = 2048, UBaseType_t priority = tskIDLE_PRIORITY + 1);
60
66 virtual ~FrameworkApp() = default;
67
80 virtual void start();
87 void onStart() override;
88
110protected:
111 virtual void initRoutes() {} // Default no-op
112 // ⚠️ Construction order is critical:
113 // router → server → manager — do not reorder these declarations for correct construction.
117};
118
119#endif // FRAMEWORK_APP_H
The FrameworkController class for event-driven control logic in embedded applications.
Orchestrates application startup and network initialization.
HTTP Server class that listens for connections and dispatches requests to a Router.
HTTP routing with middleware and optional JWT-based authorization. Part of the PicoFramework HTTP ser...
Base class for applications using the framework.
virtual ~FrameworkApp()=default
Virtual destructor.
HttpServer server
Embedded HTTP server instance.
virtual void initRoutes()
Define the application's HTTP routes.
Router router
Router instance for handling HTTP routes.
FrameworkManager manager
Responsible for launching system services and networking.
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.
Starts and coordinates core system services like networking and time sync.
HTTP Server that listens for incoming connections and dispatches requests.
Definition HttpServer.h:29
The central router for handling HTTP requests and middleware.
Definition Router.h:60