forked from matth-x/MicroOcpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMeterValues.h
More file actions
44 lines (29 loc) · 1.01 KB
/
Copy pathMeterValues.h
File metadata and controls
44 lines (29 loc) · 1.01 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
43
44
// matth-x/ArduinoOcpp
// Copyright Matthias Akstaller 2019 - 2022
// MIT License
#ifndef METERVALUES_H
#define METERVALUES_H
#include <ArduinoOcpp/Core/OcppMessage.h>
#include <ArduinoOcpp/Core/OcppTime.h>
namespace ArduinoOcpp {
namespace Ocpp16 {
class MeterValues : public OcppMessage {
private:
std::vector<OcppTimestamp> sampleTime;
std::vector<float> power;
std::vector<float> energy;
int connectorId = 0;
int transactionId = -1;
public:
MeterValues(const std::vector<OcppTimestamp> *sampleTime, const std::vector<float> *energy, const std::vector<float> *power, int connectorId, int transactionId);
MeterValues(); //for debugging only. Make this for the server pendant
~MeterValues();
const char* getOcppOperationType();
std::unique_ptr<DynamicJsonDocument> createReq();
void processConf(JsonObject payload);
void processReq(JsonObject payload);
std::unique_ptr<DynamicJsonDocument> createConf();
};
} //end namespace Ocpp16
} //end namespace ArduinoOcpp
#endif