2023-01-05 23:33:59 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <nng/nng.h>
|
|
|
|
|
#include <nng/supplemental/http/http.h>
|
|
|
|
|
#include <nng/supplemental/util/platform.h>
|
|
|
|
|
#include <functional>
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
|
// Webserver for stats
|
|
|
|
|
namespace webserver
|
|
|
|
|
{
|
|
|
|
|
extern std::function<std::string()> handle_callback;
|
2023-12-15 17:57:20 +01:00
|
|
|
extern std::function<std::string(std::string)> handle_callback_html;
|
2023-12-15 15:30:45 +01:00
|
|
|
extern std::function<std::vector<uint8_t>()> handle_callback_polarplot;
|
2023-12-16 19:58:45 +01:00
|
|
|
extern std::function<std::vector<uint8_t>()> handle_callback_fft;
|
2024-01-23 20:25:27 +01:00
|
|
|
extern std::function<std::vector<uint8_t>()> handle_callback_schedule;
|
2023-01-05 23:33:59 +01:00
|
|
|
|
2023-12-15 15:30:45 +01:00
|
|
|
extern bool add_polarplot_handler;
|
2023-01-05 23:33:59 +01:00
|
|
|
void start(std::string http_server_url);
|
|
|
|
|
|
|
|
|
|
void stop();
|
|
|
|
|
};
|