6#include <ocpp/v2/message_handler.hpp>
8#include <ocpp/v2/functional_blocks/display_message.hpp>
11struct FunctionalBlockContext;
12class MeterValuesInterface;
14struct CostUpdatedRequest;
16typedef std::function<void(
const RunningCost& running_cost,
const uint32_t number_of_decimals,
17 std::optional<std::string> currency_code)>
18 SetRunningCostCallback;
32 const json& original_transaction_event_response) = 0;
38 std::optional<SetDisplayMessageCallback>& set_display_message_callback,
39 std::optional<SetRunningCostCallback>& set_running_cost_callback,
40 boost::asio::io_service& io_service);
45 const json& original_transaction_event_response)
override;
50 std::optional<SetDisplayMessageCallback> set_display_message_callback;
51 std::optional<SetRunningCostCallback> set_running_cost_callback;
52 boost::asio::io_service& io_service;
62 bool is_multilanguage_enabled()
const;
68 bool is_tariff_enabled()
const;
74 bool is_cost_enabled()
const;
Interface for handling OCPP2.0.1 CALL messages from the CSMS. Classes implementing a functional block...
Definition: message_handler.hpp:13
Definition: meter_values.hpp:14
Definition: tariff_and_cost.hpp:20
virtual void handle_cost_and_tariff(const TransactionEventResponse &response, const TransactionEventRequest &original_message, const json &original_transaction_event_response)=0
Create cost and / or tariff message and call the callbacks to send it, if tariff and / or cost is ena...
Definition: tariff_and_cost.hpp:35
void handle_cost_and_tariff(const TransactionEventResponse &response, const TransactionEventRequest &original_message, const json &original_transaction_event_response) override
Create cost and / or tariff message and call the callbacks to send it, if tariff and / or cost is ena...
Definition: tariff_and_cost.cpp:37
void handle_message(const ocpp::EnhancedMessage< MessageType > &message) override
Handles the given message from the CSMS. This includes dispatching a CALLRESULT as a response to the ...
Definition: tariff_and_cost.cpp:28
Contains a OCPP Call message.
Definition: call_types.hpp:60
Contains a OCPP message in json form with additional information.
Definition: message_queue.hpp:54
Context / requirements for the functional blocks.
Definition: functional_block_context.hpp:23
Contains a OCPP TransactionEvent message.
Definition: TransactionEvent.hpp:19
Contains a OCPP TransactionEventResponse message.
Definition: TransactionEvent.hpp:50