forked from matth-x/MicroOcpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOcppModel.h
More file actions
68 lines (50 loc) · 2.03 KB
/
Copy pathOcppModel.h
File metadata and controls
68 lines (50 loc) · 2.03 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// matth-x/ArduinoOcpp
// Copyright Matthias Akstaller 2019 - 2022
// MIT License
#ifndef OCPPMODEL_H
#define OCPPMODEL_H
#include <ArduinoOcpp/Core/OcppTime.h>
#include <memory>
namespace ArduinoOcpp {
class TransactionStore;
class SmartChargingService;
class ChargePointStatusService;
class ConnectorStatus;
class MeteringService;
class FirmwareService;
class DiagnosticsService;
class HeartbeatService;
class OcppModel {
private:
std::unique_ptr<TransactionStore> transactionStore;
std::unique_ptr<SmartChargingService> smartChargingService;
std::unique_ptr<ChargePointStatusService> chargePointStatusService;
std::unique_ptr<MeteringService> meteringService;
std::unique_ptr<FirmwareService> firmwareService;
std::unique_ptr<DiagnosticsService> diagnosticsService;
std::unique_ptr<HeartbeatService> heartbeatService;
OcppTime ocppTime;
public:
OcppModel(const OcppClock& system_clock);
OcppModel() = delete;
OcppModel(const OcppModel& rhs) = delete;
~OcppModel();
void loop();
void setTransactionStore(std::unique_ptr<TransactionStore> transactionStore);
TransactionStore *getTransactionStore();
void setSmartChargingService(std::unique_ptr<SmartChargingService> scs);
SmartChargingService* getSmartChargingService() const;
void setChargePointStatusService(std::unique_ptr<ChargePointStatusService> cpss);
ChargePointStatusService *getChargePointStatusService() const;
ConnectorStatus *getConnectorStatus(int connectorId) const;
void setMeteringSerivce(std::unique_ptr<MeteringService> meteringService);
MeteringService* getMeteringService() const;
void setFirmwareService(std::unique_ptr<FirmwareService> firmwareService);
FirmwareService *getFirmwareService() const;
void setDiagnosticsService(std::unique_ptr<DiagnosticsService> diagnosticsService);
DiagnosticsService *getDiagnosticsService() const;
void setHeartbeatService(std::unique_ptr<HeartbeatService> heartbeatService);
OcppTime &getOcppTime();
};
} //end namespace ArduinoOcpp
#endif