forked from matth-x/MicroOcpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRequestCallbacks.h
More file actions
21 lines (16 loc) · 890 Bytes
/
Copy pathRequestCallbacks.h
File metadata and controls
21 lines (16 loc) · 890 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// matth-x/MicroOcpp
// Copyright Matthias Akstaller 2019 - 2024
// MIT License
#ifndef MO_REQUESTCALLBACKS_H
#define MO_REQUESTCALLBACKS_H
#include <ArduinoJson.h>
#include <functional>
namespace MicroOcpp {
using OnReceiveConfListener = std::function<void(JsonObject payload)>;
using OnReceiveReqListener = std::function<void(JsonObject payload)>;
using OnSendConfListener = std::function<void(JsonObject payload)>;
using OnTimeoutListener = std::function<void()>;
using OnReceiveErrorListener = std::function<void(const char *code, const char *description, JsonObject details)>; //will be called if OCPP communication partner returns error code
using OnAbortListener = std::function<void()>; //will be called whenever the engine will stop trying to execute the operation normallythere is a timeout or error (onAbort = onTimeout || onReceiveError)
} //end namespace MicroOcpp
#endif