SensESP
3.0.1
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
base_command_handler.h
Go to the documentation of this file.
1
#ifndef SENSESP_NET_WEB_BASE_COMMAND_HANDLER_H_
2
#define SENSESP_NET_WEB_BASE_COMMAND_HANDLER_H_
3
4
#include <esp_http_server.h>
5
#include <vector>
6
7
#include "ArduinoJson.h"
8
#include "
sensesp/net/http_server.h
"
9
#include "
sensesp_base_app.h
"
10
11
namespace
sensesp
{
12
13
class
RouteDefinition
{
14
public
:
15
RouteDefinition
(String name, String path, String component_name)
16
:
name_
(name),
path_
(path),
component_name_
(component_name) {};
17
18
String
get_name
() {
return
name_
; }
19
String
get_path
() {
return
path_
; }
20
String
get_component_name
() {
return
component_name_
; }
21
22
JsonDocument
as_json
() {
23
JsonDocument doc;
24
doc[
"name"
] =
name_
;
25
doc[
"path"
] =
path_
;
26
doc[
"componentName"
] =
component_name_
;
27
28
return
doc;
29
}
30
31
protected
:
32
String
name_
;
33
String
path_
;
34
String
component_name_
;
35
};
36
37
void
add_base_app_http_command_handlers
(std::shared_ptr<HTTPServer>& server);
38
39
}
// namespace sensesp
40
41
#endif
// SENSESP_NET_HTTP_COMMAND_HANDLER_H_
sensesp::RouteDefinition
Definition
base_command_handler.h:13
sensesp::RouteDefinition::get_name
String get_name()
Definition
base_command_handler.h:18
sensesp::RouteDefinition::component_name_
String component_name_
Definition
base_command_handler.h:34
sensesp::RouteDefinition::name_
String name_
Definition
base_command_handler.h:32
sensesp::RouteDefinition::get_path
String get_path()
Definition
base_command_handler.h:19
sensesp::RouteDefinition::get_component_name
String get_component_name()
Definition
base_command_handler.h:20
sensesp::RouteDefinition::RouteDefinition
RouteDefinition(String name, String path, String component_name)
Definition
base_command_handler.h:15
sensesp::RouteDefinition::as_json
JsonDocument as_json()
Definition
base_command_handler.h:22
sensesp::RouteDefinition::path_
String path_
Definition
base_command_handler.h:33
http_server.h
sensesp
Definition
sensesp.cpp:7
sensesp::add_base_app_http_command_handlers
void add_base_app_http_command_handlers(std::shared_ptr< HTTPServer > &server)
Definition
base_command_handler.cpp:117
sensesp_base_app.h
src
sensesp
net
web
base_command_handler.h
Generated by
1.12.0