From 132f6f55b6ed7021c2cd463e7e2605b390bc0f4e Mon Sep 17 00:00:00 2001 From: c-jimenez <18682655+c-jimenez@users.noreply.github.com> Date: Thu, 26 Jan 2023 14:48:08 +0100 Subject: [PATCH 1/3] =?UTF-8?q?[localcontroller]=C2=A0Triggers=20a=20reque?= =?UTF-8?q?st=20timeout=20when=20a=20request=20cannot=20be=20forward=20to?= =?UTF-8?q?=20the=20Central=20System=20or=20to=20the=20Charge=20Point?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/localcontroller/centralsystem/CentralSystemHandler.h | 2 -- src/localcontroller/centralsystem/CentralSystemProxy.cpp | 2 +- src/localcontroller/chargepoint/ChargePointHandler.h | 1 - src/rpc/RpcBase.cpp | 5 ++--- 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/localcontroller/centralsystem/CentralSystemHandler.h b/src/localcontroller/centralsystem/CentralSystemHandler.h index 13d496d3..43cb5b46 100644 --- a/src/localcontroller/centralsystem/CentralSystemHandler.h +++ b/src/localcontroller/centralsystem/CentralSystemHandler.h @@ -415,7 +415,6 @@ class CentralSystemHandler if (cs_error.empty()) { LOG_WARNING << "[" << m_identifier << "] - Unable to forward [" << action << "] request"; - error = ocpp::rpc::IRpc::RPC_ERROR_INTERNAL; } else { @@ -428,7 +427,6 @@ class CentralSystemHandler else { LOG_WARNING << "[" << m_identifier << "] - Unable to forward [" << action << "] request"; - error = ocpp::rpc::IRpc::RPC_ERROR_INTERNAL; } return ret; diff --git a/src/localcontroller/centralsystem/CentralSystemProxy.cpp b/src/localcontroller/centralsystem/CentralSystemProxy.cpp index 1a029190..474d47ba 100644 --- a/src/localcontroller/centralsystem/CentralSystemProxy.cpp +++ b/src/localcontroller/centralsystem/CentralSystemProxy.cpp @@ -563,7 +563,7 @@ void CentralSystemProxy::rcpMessageReceived(const std::string& msg) /** @copydoc void IRpc::ISpy::rcpMessageSent(const std::string& msg) */ void CentralSystemProxy::rcpMessageSent(const std::string& msg) { - LOG_COM << "[" << m_identifier << "] - RX : " << msg; + LOG_COM << "[" << m_identifier << "] - TX : " << msg; } // RpcClient::IListener interface diff --git a/src/localcontroller/chargepoint/ChargePointHandler.h b/src/localcontroller/chargepoint/ChargePointHandler.h index 572b9ae2..c2d537ef 100644 --- a/src/localcontroller/chargepoint/ChargePointHandler.h +++ b/src/localcontroller/chargepoint/ChargePointHandler.h @@ -266,7 +266,6 @@ class ChargePointHandler if (cs_error.empty()) { LOG_WARNING << "[" << m_identifier << "] - Unable to forward [" << action << "] request"; - error = ocpp::rpc::IRpc::RPC_ERROR_INTERNAL; } else { diff --git a/src/rpc/RpcBase.cpp b/src/rpc/RpcBase.cpp index 94f5f317..02930a4a 100644 --- a/src/rpc/RpcBase.cpp +++ b/src/rpc/RpcBase.cpp @@ -415,11 +415,10 @@ void RpcBase::rxThread() else { // Error - if (error_code.empty()) + if (!error_code.empty()) { - error_code = RPC_ERROR_GENERIC; + sendCallError(rpc_message->unique_id, error_code.c_str(), error); } - sendCallError(rpc_message->unique_id, error_code.c_str(), error); } // Free resources From 59ef4a0595223f415090b9fe77a79fd540f93c48 Mon Sep 17 00:00:00 2001 From: c-jimenez <18682655+c-jimenez@users.noreply.github.com> Date: Thu, 26 Jan 2023 14:48:35 +0100 Subject: [PATCH 2/3] =?UTF-8?q?[locallist]=C2=A0Fix=20local=20list=20messa?= =?UTF-8?q?ge=20deserialization?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/messages/SendLocalList.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/messages/SendLocalList.cpp b/src/messages/SendLocalList.cpp index 1c13f09c..6b09f32c 100644 --- a/src/messages/SendLocalList.cpp +++ b/src/messages/SendLocalList.cpp @@ -46,7 +46,7 @@ bool SendLocalListReqConverter::fromJson(const rapidjson::Value& json, { bool ret = true; extract(json, "listVersion", data.listVersion); - if (json.HasMember("")) + if (json.HasMember("localAuthorizationList")) { AuthorizationDataConverter authorization_data_converter; std::vector& local_authorization_list = data.localAuthorizationList; From 231f6dbb30b56abbc378d44c074b4270a09b9731 Mon Sep 17 00:00:00 2001 From: c-jimenez <18682655+c-jimenez@users.noreply.github.com> Date: Thu, 26 Jan 2023 14:48:59 +0100 Subject: [PATCH 3/3] =?UTF-8?q?[vscode]=C2=A0Update=20launch=20and=20debug?= =?UTF-8?q?=20configuration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/launch.json | 9 +++++++++ .vscode/tasks.json | 12 ++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 42296aa3..17e1d00a 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -22,6 +22,15 @@ "arguments": "-r", "valuesFormatting": "parseText" }, + { + "type": "gdb", + "request": "launch", + "name": "x86 LC debug", + "target": "${workspaceRoot}/bin/gcc_native/quick_start_localcontroller", + "cwd": "${workspaceRoot}/bin/gcc_native/", + "arguments": "-r", + "valuesFormatting": "parseText" + }, { "type": "gdb", "request": "launch", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 4193fc64..2962d58a 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -4,11 +4,11 @@ "version": "2.0.0", "tasks": [ { - "label": "build GCC native", + "label": "build GCC", "type": "shell", "command": "make", "args": [ - "gcc-native", + "gcc", "BUILD_TYPE=Debug" ], "problemMatcher": "$gcc", @@ -18,20 +18,20 @@ } }, { - "label": "tests GCC native", + "label": "tests GCC", "type": "shell", "command": "make", "args": [ - "tests-gcc-native" + "tests-gcc" ], "group": "build" }, { - "label": "clean GCC native", + "label": "clean GCC", "type": "shell", "command": "make", "args": [ - "clean-gcc-native", + "clean-gcc", "BUILD_TYPE=Debug" ], "group": "build"