From f61db9d7bdd8d5e2db2b9a83ff246c10e8ee02c4 Mon Sep 17 00:00:00 2001 From: Soumya Subramanya Date: Thu, 26 Oct 2023 12:09:43 +0200 Subject: [PATCH] Add handler fucntion for Getstatus request Signed-off-by: Soumya Subramanya --- include/ocpp/v201/charge_point.hpp | 2 ++ lib/ocpp/v201/charge_point.cpp | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/include/ocpp/v201/charge_point.hpp b/include/ocpp/v201/charge_point.hpp index 6951dcfb2..0307690f6 100644 --- a/include/ocpp/v201/charge_point.hpp +++ b/include/ocpp/v201/charge_point.hpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -326,6 +327,7 @@ class ChargePoint : ocpp::ChargingStationBase { // Functional Block E: Transaction void handle_start_transaction_event_response(const EnhancedMessage& message); + void handle_get_transaction_status_request(Call call); // Function Block F: Remote transaction control void handle_unlock_connector(Call call); diff --git a/lib/ocpp/v201/charge_point.cpp b/lib/ocpp/v201/charge_point.cpp index 0d7800f7c..b4cda1ec3 100644 --- a/lib/ocpp/v201/charge_point.cpp +++ b/lib/ocpp/v201/charge_point.cpp @@ -744,6 +744,9 @@ void ChargePoint::handle_message(const EnhancedMessage& messa case MessageType::GetLocalListVersion: this->handle_get_local_authorization_list_version_req(json_message); break; + case MessageType::GetTransactionStatus: + this->handle_get_transaction_status_request(json_message); + break; default: if (message.messageTypeId == MessageTypeId::CALL) { const auto call_error = CallError(message.uniqueId, "NotImplemented", "", json({})); @@ -1803,6 +1806,14 @@ void ChargePoint::handle_start_transaction_event_response(const EnhancedMessage< } } +void ChargePoint::handle_get_transaction_status_request(Call call) +{ + const auto msg = call.msg; + GetTransactionStatusResponse response; + + + EVLOG_info << "========HANDLE GET TRANSACTION REqUEST====="; +} void ChargePoint::handle_unlock_connector(Call call) { const UnlockConnectorRequest& msg = call.msg; const UnlockConnectorResponse unlock_response = callbacks.unlock_connector_callback(msg.evseId, msg.connectorId);