Skip to content

Commit

Permalink
Add handler fucntion for Getstatus request
Browse files Browse the repository at this point in the history
Signed-off-by: Soumya Subramanya <[email protected]>
  • Loading branch information
SNSubramanya committed Oct 26, 2023
1 parent a133941 commit f61db9d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/ocpp/v201/charge_point.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <ocpp/v201/messages/GetLog.hpp>
#include <ocpp/v201/messages/GetReport.hpp>
#include <ocpp/v201/messages/GetVariables.hpp>
#include <ocpp/v201/messages/GetTransactionStatus.hpp>
#include <ocpp/v201/messages/Heartbeat.hpp>
#include <ocpp/v201/messages/MeterValues.hpp>
#include <ocpp/v201/messages/NotifyEvent.hpp>
Expand Down Expand Up @@ -326,6 +327,7 @@ class ChargePoint : ocpp::ChargingStationBase {

// Functional Block E: Transaction
void handle_start_transaction_event_response(const EnhancedMessage<v201::MessageType>& message);
void handle_get_transaction_status_request(Call<GetTransactionStatusRequest> call);

// Function Block F: Remote transaction control
void handle_unlock_connector(Call<UnlockConnectorRequest> call);
Expand Down
11 changes: 11 additions & 0 deletions lib/ocpp/v201/charge_point.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,9 @@ void ChargePoint::handle_message(const EnhancedMessage<v201::MessageType>& 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({}));
Expand Down Expand Up @@ -1803,6 +1806,14 @@ void ChargePoint::handle_start_transaction_event_response(const EnhancedMessage<
}
}

void ChargePoint::handle_get_transaction_status_request(Call<GetTransactionStatusRequest> call)
{
const auto msg = call.msg;
GetTransactionStatusResponse response;


EVLOG_info << "========HANDLE GET TRANSACTION REqUEST=====";
}
void ChargePoint::handle_unlock_connector(Call<UnlockConnectorRequest> call) {
const UnlockConnectorRequest& msg = call.msg;
const UnlockConnectorResponse unlock_response = callbacks.unlock_connector_callback(msg.evseId, msg.connectorId);
Expand Down

0 comments on commit f61db9d

Please sign in to comment.