Logo Pico-Framework A web-first embedded framework for C++
Loading...
Searching...
No Matches
GpioController.h
Go to the documentation of this file.
1
13#pragma once
14
16
17#include <vector>
18#include <string>
19
20#include "http/HttpRequest.h"
21#include "http/HttpResponse.h"
22#include "PicoModel.h"
23
25public:
27 void initRoutes() override;
28
29private:
30 void getState(HttpRequest& req, HttpResponse& res, const std::vector<std::string>& params);
31 void setState(HttpRequest& req, HttpResponse& res, const std::vector<std::string>& params);
33 PicoModel &pico; // Reference to the PicoModel for GPIO state management
34};
The FrameworkController class for event-driven control logic in embedded applications.
Defines the HttpRequest class for handling HTTP requests: headers, method, path, query string,...
HTTP HttpResponse class for managing status, headers, body, and streaming support.
Base class for event-driven control logic in embedded applications.
@fileGpioController.cpp
PicoModel & pico
void initRoutes() override
Initialize routes for this controller.
void handleGetMultipleGpios(HttpRequest &req, HttpResponse &res)
void getState(HttpRequest &req, HttpResponse &res, const std::vector< std::string > &params)
void setState(HttpRequest &req, HttpResponse &res, const std::vector< std::string > &params)
Forward declaration for potential routing needs.
Definition HttpRequest.h:32
Represents an HTTP response object.
The central router for handling HTTP requests and middleware.
Definition Router.h:60