forked from matth-x/MicroOcpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOperation.cpp
More file actions
42 lines (31 loc) · 1.11 KB
/
Operation.cpp
File metadata and controls
42 lines (31 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// matth-x/MicroOcpp
// Copyright Matthias Akstaller 2019 - 2024
// MIT License
#include <MicroOcpp/Core/Operation.h>
#include <MicroOcpp/Debug.h>
using namespace MicroOcpp;
Operation::Operation() {}
Operation::~Operation() {}
const char* Operation::getOperationType(){
MO_DBG_ERR("Unsupported operation: getOperationType() is not implemented");
return "CustomOperation";
}
std::unique_ptr<JsonDoc> Operation::createReq() {
MO_DBG_ERR("Unsupported operation: createReq() is not implemented");
return createEmptyDocument();
}
void Operation::processConf(JsonObject payload) {
MO_DBG_ERR("Unsupported operation: processConf() is not implemented");
}
void Operation::processReq(JsonObject payload) {
MO_DBG_ERR("Unsupported operation: processReq() is not implemented");
}
std::unique_ptr<JsonDoc> Operation::createConf() {
MO_DBG_ERR("Unsupported operation: createConf() is not implemented");
return createEmptyDocument();
}
std::unique_ptr<JsonDoc> MicroOcpp::createEmptyDocument() {
auto emptyDoc = makeJsonDoc("EmptyJsonDoc", 0);
emptyDoc->to<JsonObject>();
return emptyDoc;
}