Smart Camera ESP32
An AI-driven, real-time Sentry Turret platform leveraging asynchronous I/O and computer vision to deliver high-precision autonomous motion tracking on resource-constrained embedded hardware.
Loading...
Searching...
No Matches
turret_server.h
1
6#pragma once
7
8#include "base_detection_module.h"
9#include "camera.h"
10#include "motion_data.h"
11#include "websockets.h"
12#include <esp_http_server.h>
13
21{
22private:
23 static httpd_handle_t _server_handle;
24
28 static Camera* _camera_instance;
29
33 static BaseDetectionModule* _detection_instance;
34
35 StreamWebsocketHandler* _stream_handler;
36 CommandsWebSocketHandler* _commands_handler; // Used both for commands to the motors & sending metrics
37
38public:
39 HttpServer();
41
48 bool start(Camera* camera, BaseDetectionModule* detection = nullptr);
49
53 void stop();
54
65 static esp_err_t index_handler(httpd_req_t* req);
66};
An abstract base class (Interface) that defines the contract for detection algorithms....
Definition base_detection_module.h:22
Singleton-style manager for camera lifecycle and frame acquisition.
Definition camera.h:63
Definition websockets.h:166
Manages the ESP32-CAM web interface and control API.
Definition turret_server.h:21
void stop()
Shut down the server and unregister all URI handlers.
Definition turret_server.cpp:64
static esp_err_t index_handler(httpd_req_t *req)
HTTP handler for the root ("/") URI. This method is called by the ESP HTTP server whenever a client a...
Definition turret_server.cpp:89
bool start(Camera *camera, BaseDetectionModule *detection=nullptr)
Configures and launches the web server on port 80.
Definition turret_server.cpp:34
Definition websockets.h:130