forked from matth-x/MicroOcpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClearCache.cpp
More file actions
27 lines (20 loc) · 771 Bytes
/
Copy pathClearCache.cpp
File metadata and controls
27 lines (20 loc) · 771 Bytes
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
// matth-x/ArduinoOcpp
// Copyright Matthias Akstaller 2019 - 2022
// MIT License
#include <ArduinoOcpp/MessagesV16/ClearCache.h>
#include <ArduinoOcpp/Debug.h>
using ArduinoOcpp::Ocpp16::ClearCache;
ClearCache::ClearCache() {
}
const char* ClearCache::getOcppOperationType(){
return "ClearCache";
}
void ClearCache::processReq(JsonObject payload) {
AO_DBG_WARN("Authorization Cache not supported - ClearCache is without effect");
}
std::unique_ptr<DynamicJsonDocument> ClearCache::createConf(){
auto doc = std::unique_ptr<DynamicJsonDocument>(new DynamicJsonDocument(JSON_OBJECT_SIZE(1)));
JsonObject payload = doc->to<JsonObject>();
payload["status"] = "Accepted"; //"Accepted", because the intended postcondition is true
return doc;
}