ocpp 0.24.1
A C++ implementation of the Open Charge Point Protocol
message_dispatcher.hpp
1// SPDX-License-Identifier: Apache-2.0
2// Copyright Pionix GmbH and Contributors to EVerest
3
4#pragma once
5
6#include <ocpp/common/message_queue.hpp>
7
8namespace ocpp {
9
13template <typename T> class MessageDispatcherInterface {
14
15public:
17
21 virtual void dispatch_call(const json& call, bool triggered = false) = 0;
22
28 virtual std::future<ocpp::EnhancedMessage<T>> dispatch_call_async(const json& call, bool triggered = false) = 0;
29
32 virtual void dispatch_call_result(const json& call_result) = 0;
33
36 virtual void dispatch_call_error(const json& call_error) = 0;
37};
38
39} // namespace ocpp
Interface for dispatching OCPP messages that shall be send over the websocket. This interface defines...
Definition: message_dispatcher.hpp:13
virtual void dispatch_call_error(const json &call_error)=0
Dispatches a CallError message.
virtual std::future< ocpp::EnhancedMessage< T > > dispatch_call_async(const json &call, bool triggered=false)=0
Dispatches a Call message asynchronously.
virtual void dispatch_call(const json &call, bool triggered=false)=0
Dispatches a Call message.
virtual void dispatch_call_result(const json &call_result)=0
Dispatches a CallResult message.