ocpp 0.24.1
A C++ implementation of the Open Charge Point Protocol
Public Member Functions | List of all members
ocpp::MessageDispatcherInterface< T > Class Template Referenceabstract

Interface for dispatching OCPP messages that shall be send over the websocket. This interface defines dispatching of Call, CallResult and CallError messages. More...

#include <message_dispatcher.hpp>

Public Member Functions

virtual void dispatch_call (const json &call, bool triggered=false)=0
 Dispatches a Call message. More...
 
virtual std::future< ocpp::EnhancedMessage< T > > dispatch_call_async (const json &call, bool triggered=false)=0
 Dispatches a Call message asynchronously. More...
 
virtual void dispatch_call_result (const json &call_result)=0
 Dispatches a CallResult message. More...
 
virtual void dispatch_call_error (const json &call_error)=0
 Dispatches a CallError message. More...
 

Detailed Description

template<typename T>
class ocpp::MessageDispatcherInterface< T >

Interface for dispatching OCPP messages that shall be send over the websocket. This interface defines dispatching of Call, CallResult and CallError messages.

Template Parameters
TType specifies the OCPP protocol version

Member Function Documentation

◆ dispatch_call()

template<typename T >
virtual void ocpp::MessageDispatcherInterface< T >::dispatch_call ( const json &  call,
bool  triggered = false 
)
pure virtual

Dispatches a Call message.

Parameters
callthe OCPP Call message.
triggeredindicates if the call was triggered by a TriggerMessage. Default is false.

Implemented in ocpp::v16::MessageDispatcher, and ocpp::v2::MessageDispatcher.

◆ dispatch_call_async()

template<typename T >
virtual std::future< ocpp::EnhancedMessage< T > > ocpp::MessageDispatcherInterface< T >::dispatch_call_async ( const json &  call,
bool  triggered = false 
)
pure virtual

Dispatches a Call message asynchronously.

Parameters
callthe OCPP Call message.
triggeredindicates if the call was triggered by a TriggerMessage. Default is false.
Returns
std::future<ocpp::EnhancedMessage<T>> Future object containing the enhanced message result of type T.

Implemented in ocpp::v16::MessageDispatcher, and ocpp::v2::MessageDispatcher.

◆ dispatch_call_error()

template<typename T >
virtual void ocpp::MessageDispatcherInterface< T >::dispatch_call_error ( const json &  call_error)
pure virtual

Dispatches a CallError message.

Parameters
call_resultthe OCPP CallError message.

Implemented in ocpp::v16::MessageDispatcher, and ocpp::v2::MessageDispatcher.

◆ dispatch_call_result()

template<typename T >
virtual void ocpp::MessageDispatcherInterface< T >::dispatch_call_result ( const json &  call_result)
pure virtual

Dispatches a CallResult message.

Parameters
call_resultthe OCPP CallResult message.

Implemented in ocpp::v16::MessageDispatcher, and ocpp::v2::MessageDispatcher.


The documentation for this class was generated from the following file: