forked from matth-x/MicroOcpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUpdateFirmware.h
More file actions
40 lines (28 loc) · 845 Bytes
/
Copy pathUpdateFirmware.h
File metadata and controls
40 lines (28 loc) · 845 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
28
29
30
31
32
33
34
35
36
37
38
39
40
// matth-x/ArduinoOcpp
// Copyright Matthias Akstaller 2019 - 2023
// MIT License
#ifndef UPDATEFIRMWARE_H
#define UPDATEFIRMWARE_H
#include <ArduinoOcpp/Core/Operation.h>
#include <ArduinoOcpp/Core/Time.h>
namespace ArduinoOcpp {
class Model;
namespace Ocpp16 {
class UpdateFirmware : public Operation {
private:
Model& model;
std::string location {};
Timestamp retreiveDate = Timestamp();
int retries = 1;
unsigned long retryInterval = 180;
bool formatError = false;
public:
UpdateFirmware(Model& model);
const char* getOperationType() {return "UpdateFirmware";}
void processReq(JsonObject payload);
std::unique_ptr<DynamicJsonDocument> createConf();
const char *getErrorCode() {if (formatError) return "FormationViolation"; else return NULL;}
};
} //end namespace Ocpp16
} //end namespace ArduinoOcpp
#endif