forked from matth-x/MicroOcpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOcppEngine.h
More file actions
42 lines (29 loc) · 866 Bytes
/
Copy pathOcppEngine.h
File metadata and controls
42 lines (29 loc) · 866 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
41
42
// matth-x/ArduinoOcpp
// Copyright Matthias Akstaller 2019 - 2022
// MIT License
#ifndef OCPPENGINE_H
#define OCPPENGINE_H
#include <ArduinoOcpp/Core/OcppConnection.h>
#include <ArduinoOcpp/Core/OcppTime.h>
#include <memory>
namespace ArduinoOcpp {
class OcppSocket;
class OcppModel;
class FilesystemAdapter;
class OcppEngine {
private:
OcppSocket& oSock;
std::shared_ptr<OcppModel> oModel;
OcppConnection oConn;
bool runOcppTasks = true;
public:
OcppEngine(OcppSocket& ocppSocket, const OcppClock& system_clock, std::shared_ptr<FilesystemAdapter> filesystem);
~OcppEngine();
void loop();
void setRunOcppTasks(bool enable) {runOcppTasks = enable;}
void initiateOperation(std::unique_ptr<OcppOperation> op);
OcppModel& getOcppModel();
};
extern OcppEngine *defaultOcppEngine;
} //end namespace ArduinoOcpp
#endif