From 094bf82d226ce73fecfe2da21f0dae281ec7d026 Mon Sep 17 00:00:00 2001 From: Habbus <44402940+Habbus@users.noreply.github.com> Date: Mon, 13 Nov 2023 10:45:07 +0100 Subject: [PATCH] Update TransactionManager.cpp, reject connectorid 0 on remotestart --- src/chargepoint/transaction/TransactionManager.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/chargepoint/transaction/TransactionManager.cpp b/src/chargepoint/transaction/TransactionManager.cpp index a4e662e8..7975bea2 100644 --- a/src/chargepoint/transaction/TransactionManager.cpp +++ b/src/chargepoint/transaction/TransactionManager.cpp @@ -299,7 +299,7 @@ bool TransactionManager::handleMessage(const ocpp::messages::RemoteStartTransact } } } - else + else if (!request.connectorId.isSet()) { // The user application will determine which connector to use authorized = m_events_handler.remoteStartTransactionRequested(Connectors::CONNECTOR_ID_CHARGE_POINT, request.idTag.str()); @@ -309,6 +309,12 @@ bool TransactionManager::handleMessage(const ocpp::messages::RemoteStartTransact authorized = m_smart_charging_manager.installTxProfile(Connectors::CONNECTOR_ID_CHARGE_POINT, request.chargingProfile); } } + else + { + // Connector id is set but equal to CONNECTOR_ID_CHARGE_POINT + // This is not allowed by the ocpp1.6 standard + authorized = false; + } // Response if (authorized)