소스 검색

[Improve][Modularization][Module_OcppBackend / Module_OcppBackend20]

2021.09.22 / Folus Wen

Actions:
1. handleUnlockConnector() set request flag without check system status.

Files:
1. As follow commit history

Image version: D0.00.XX.XXXX.XX
Image checksum: XXXXXXXX

Hardware PWB P/N : XXXXXXX
Hardware Version : XXXXXXX
FolusWen 3 년 전
부모
커밋
6e5d829f33
3개의 변경된 파일15개의 추가작업 그리고 16개의 파일을 삭제
  1. 5 5
      EVSE/Modularization/ocpp20/MessageHandler.c
  2. 5 6
      EVSE/Modularization/ocppfiles/MessageHandler.c
  3. 5 5
      EVSE/Modularization/ocppph/MessageHandler.c

+ 5 - 5
EVSE/Modularization/ocpp20/MessageHandler.c

@@ -16723,7 +16723,7 @@ int handleUnlockConnectorRequest(char *uuid, char *payload)
 
 			for (int index = 0; index < CHAdeMO_QUANTITY; index++)
 			{
-				if ((ShmSysConfigAndInfo->SysInfo.ChademoChargingData[index].Index == tempIndex ) && ((ShmSysConfigAndInfo->SysInfo.ChademoChargingData[index].SystemStatus == SYS_MODE_CHARGING) || (ShmSysConfigAndInfo->SysInfo.ChademoChargingData[index].SystemStatus == SYS_MODE_IDLE) ))
+				if ((ShmSysConfigAndInfo->SysInfo.ChademoChargingData[index].Index == tempIndex ))
 				{
 					//stop Transaction
 					ShmOCPP20Data->CsMsg.bits[connectorIdInt-1].UnlockConnectorReq = ON;
@@ -16743,7 +16743,7 @@ int handleUnlockConnectorRequest(char *uuid, char *payload)
 
 			for (int index = 0; index < CCS_QUANTITY; index++)
 			{
-				if ((ShmSysConfigAndInfo->SysInfo.CcsChargingData[index].Index == tempIndex ) &&  ((ShmSysConfigAndInfo->SysInfo.CcsChargingData[index].SystemStatus == SYS_MODE_CHARGING) || (ShmSysConfigAndInfo->SysInfo.CcsChargingData[index].SystemStatus == SYS_MODE_IDLE) ))
+				if ((ShmSysConfigAndInfo->SysInfo.CcsChargingData[index].Index == tempIndex ))
 				{
 					//stop Transaction
 					ShmOCPP20Data->CsMsg.bits[connectorIdInt-1].UnlockConnectorReq = ON;
@@ -16763,7 +16763,7 @@ int handleUnlockConnectorRequest(char *uuid, char *payload)
 
 			for (int index = 0; index < GB_QUANTITY; index++)
 			{
-				if ((ShmSysConfigAndInfo->SysInfo.GbChargingData[index].Index == tempIndex ) &&((ShmSysConfigAndInfo->SysInfo.GbChargingData[index].SystemStatus == SYS_MODE_CHARGING)||(ShmSysConfigAndInfo->SysInfo.GbChargingData[index].SystemStatus == SYS_MODE_IDLE)))
+				if ((ShmSysConfigAndInfo->SysInfo.GbChargingData[index].Index == tempIndex ))
 				{
 					//stop Transaction
 					ShmOCPP20Data->CsMsg.bits[connectorIdInt-1].UnlockConnectorReq = ON;
@@ -16776,7 +16776,7 @@ int handleUnlockConnectorRequest(char *uuid, char *payload)
 
 			for (int index = 0; index < GENERAL_GUN_QUANTITY; index++)
 			{
-				if ((ShmSysConfigAndInfo->SysInfo.ConnectorInfo[index].GeneralChargingData.Index == tempIndex ) &&((ShmSysConfigAndInfo->SysInfo.ConnectorInfo[index].GeneralChargingData.SystemStatus == SYS_MODE_CHARGING)||(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[index].GeneralChargingData.SystemStatus == SYS_MODE_IDLE)))
+				if ((ShmSysConfigAndInfo->SysInfo.ConnectorInfo[index].GeneralChargingData.Index == tempIndex ))
 				{
 					//stop Transaction
 					ShmOCPP20Data->CsMsg.bits[connectorIdInt-1].UnlockConnectorReq = ON;
@@ -16796,7 +16796,7 @@ int handleUnlockConnectorRequest(char *uuid, char *payload)
 
 			for (int index = 0; index < AC_QUANTITY; index++)
 			{
-				if ((ShmSysConfigAndInfo->SysInfo.AcChargingData[index].Index == tempIndex ) && ((ShmSysConfigAndInfo->SysInfo.AcChargingData[index].SystemStatus == SYS_MODE_CHARGING) || (ShmSysConfigAndInfo->SysInfo.AcChargingData[index].SystemStatus == SYS_MODE_IDLE) ))
+				if ((ShmSysConfigAndInfo->SysInfo.AcChargingData[index].Index == tempIndex ))
 				{
 					ShmOCPP20Data->CsMsg.bits[connectorIdInt-1].UnlockConnectorReq = ON;
 				}

+ 5 - 6
EVSE/Modularization/ocppfiles/MessageHandler.c

@@ -12881,7 +12881,7 @@ int handleUnlockConnectorRequest(char *uuid, char *payload)
 
 			for (int index = 0; index < CHAdeMO_QUANTITY; index++)
 			{
-				if ((ShmSysConfigAndInfo->SysInfo.ChademoChargingData[index].Index == tempIndex ) && ((ShmSysConfigAndInfo->SysInfo.ChademoChargingData[index].SystemStatus == SYS_MODE_CHARGING) || (ShmSysConfigAndInfo->SysInfo.ChademoChargingData[index].SystemStatus == SYS_MODE_IDLE) ))
+				if ((ShmSysConfigAndInfo->SysInfo.ChademoChargingData[index].Index == tempIndex ))
 				{
 					//stop Transaction
 					ShmOCPP16Data->CsMsg.bits[connectorIdInt-1].UnlockConnectorReq = 1;
@@ -12902,7 +12902,7 @@ int handleUnlockConnectorRequest(char *uuid, char *payload)
 
 			for (int index = 0; index < CCS_QUANTITY; index++)
 			{
-				if ((ShmSysConfigAndInfo->SysInfo.CcsChargingData[index].Index == tempIndex ) &&  ((ShmSysConfigAndInfo->SysInfo.CcsChargingData[index].SystemStatus == SYS_MODE_CHARGING) || (ShmSysConfigAndInfo->SysInfo.CcsChargingData[index].SystemStatus == SYS_MODE_IDLE) ))
+				if ((ShmSysConfigAndInfo->SysInfo.CcsChargingData[index].Index == tempIndex ))
 				{
 					//stop Transaction
 					ShmOCPP16Data->CsMsg.bits[connectorIdInt-1].UnlockConnectorReq = 1;
@@ -12922,7 +12922,7 @@ int handleUnlockConnectorRequest(char *uuid, char *payload)
 
 			for (int index = 0; index < GB_QUANTITY; index++)
 			{
-				if ((ShmSysConfigAndInfo->SysInfo.GbChargingData[index].Index == tempIndex ) &&((ShmSysConfigAndInfo->SysInfo.GbChargingData[index].SystemStatus == SYS_MODE_CHARGING)||(ShmSysConfigAndInfo->SysInfo.GbChargingData[index].SystemStatus == SYS_MODE_IDLE)))
+				if ((ShmSysConfigAndInfo->SysInfo.GbChargingData[index].Index == tempIndex ))
 				{
 					//stop Transaction
 					ShmOCPP16Data->CsMsg.bits[connectorIdInt-1].UnlockConnectorReq = 1;
@@ -12936,7 +12936,7 @@ int handleUnlockConnectorRequest(char *uuid, char *payload)
 
 			for (int index = 0; index < GENERAL_GUN_QUANTITY; index++)
 			{
-				if ((ShmSysConfigAndInfo->SysInfo.ConnectorInfo[index].GeneralChargingData.Index == tempIndex ) &&((ShmSysConfigAndInfo->SysInfo.ConnectorInfo[index].GeneralChargingData.SystemStatus == SYS_MODE_CHARGING)||(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[index].GeneralChargingData.SystemStatus == SYS_MODE_IDLE)))
+				if ((ShmSysConfigAndInfo->SysInfo.ConnectorInfo[index].GeneralChargingData.Index == tempIndex ))
 				{
 					//stop Transaction
 					ShmOCPP16Data->CsMsg.bits[connectorIdInt-1].UnlockConnectorReq = 1;
@@ -12957,10 +12957,9 @@ int handleUnlockConnectorRequest(char *uuid, char *payload)
 
 			for (int index = 0; index < AC_QUANTITY; index++)
 			{
-				if ((ShmSysConfigAndInfo->SysInfo.AcChargingData[index].Index == tempIndex ) && ((ShmSysConfigAndInfo->SysInfo.AcChargingData[index].SystemStatus == SYS_MODE_CHARGING) || (ShmSysConfigAndInfo->SysInfo.AcChargingData[index].SystemStatus == SYS_MODE_IDLE) ))
+				if ((ShmSysConfigAndInfo->SysInfo.AcChargingData[index].Index == tempIndex ))
 				{
 					ShmOCPP16Data->CsMsg.bits[connectorIdInt-1].UnlockConnectorReq = 1;
-
 				}
 			}
 

+ 5 - 5
EVSE/Modularization/ocppph/MessageHandler.c

@@ -12611,7 +12611,7 @@ int handleUnlockConnectorRequest(char *uuid, char *payload)
 
 			for (int index = 0; index < CHAdeMO_QUANTITY; index++)
 			{
-				if ((ShmSysConfigAndInfo->SysInfo.ChademoChargingData[index].Index == tempIndex ) && ((ShmSysConfigAndInfo->SysInfo.ChademoChargingData[index].SystemStatus == SYS_MODE_CHARGING) || (ShmSysConfigAndInfo->SysInfo.ChademoChargingData[index].SystemStatus == SYS_MODE_IDLE) ))
+				if ((ShmSysConfigAndInfo->SysInfo.ChademoChargingData[index].Index == tempIndex ))
 				{
 					//stop Transaction
 					ShmOCPP16DataPH->CsMsg.bits[connectorIdInt-1].UnlockConnectorReq = 1;
@@ -12632,7 +12632,7 @@ int handleUnlockConnectorRequest(char *uuid, char *payload)
 
 			for (int index = 0; index < CCS_QUANTITY; index++)
 			{
-				if ((ShmSysConfigAndInfo->SysInfo.CcsChargingData[index].Index == tempIndex ) &&  ((ShmSysConfigAndInfo->SysInfo.CcsChargingData[index].SystemStatus == SYS_MODE_CHARGING) || (ShmSysConfigAndInfo->SysInfo.CcsChargingData[index].SystemStatus == SYS_MODE_IDLE) ))
+				if ((ShmSysConfigAndInfo->SysInfo.CcsChargingData[index].Index == tempIndex ))
 				{
 					//stop Transaction
 					ShmOCPP16DataPH->CsMsg.bits[connectorIdInt-1].UnlockConnectorReq = 1;
@@ -12652,7 +12652,7 @@ int handleUnlockConnectorRequest(char *uuid, char *payload)
 
 			for (int index = 0; index < GB_QUANTITY; index++)
 			{
-				if ((ShmSysConfigAndInfo->SysInfo.GbChargingData[index].Index == tempIndex ) &&((ShmSysConfigAndInfo->SysInfo.GbChargingData[index].SystemStatus == SYS_MODE_CHARGING)||(ShmSysConfigAndInfo->SysInfo.GbChargingData[index].SystemStatus == SYS_MODE_IDLE)))
+				if ((ShmSysConfigAndInfo->SysInfo.GbChargingData[index].Index == tempIndex ))
 				{
 					//stop Transaction
 					ShmOCPP16DataPH->CsMsg.bits[connectorIdInt-1].UnlockConnectorReq = 1;
@@ -12666,7 +12666,7 @@ int handleUnlockConnectorRequest(char *uuid, char *payload)
 
 			for (int index = 0; index < GENERAL_GUN_QUANTITY; index++)
 			{
-				if ((ShmSysConfigAndInfo->SysInfo.ConnectorInfo[index].GeneralChargingData.Index == tempIndex ) &&((ShmSysConfigAndInfo->SysInfo.ConnectorInfo[index].GeneralChargingData.SystemStatus == SYS_MODE_CHARGING)||(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[index].GeneralChargingData.SystemStatus == SYS_MODE_IDLE)))
+				if ((ShmSysConfigAndInfo->SysInfo.ConnectorInfo[index].GeneralChargingData.Index == tempIndex ))
 				{
 					//stop Transaction
 					ShmOCPP16DataPH->CsMsg.bits[connectorIdInt-1].UnlockConnectorReq = 1;
@@ -12687,7 +12687,7 @@ int handleUnlockConnectorRequest(char *uuid, char *payload)
 
 			for (int index = 0; index < AC_QUANTITY; index++)
 			{
-				if ((ShmSysConfigAndInfo->SysInfo.AcChargingData[index].Index == tempIndex ) && ((ShmSysConfigAndInfo->SysInfo.AcChargingData[index].SystemStatus == SYS_MODE_CHARGING) || (ShmSysConfigAndInfo->SysInfo.AcChargingData[index].SystemStatus == SYS_MODE_IDLE) ))
+				if ((ShmSysConfigAndInfo->SysInfo.AcChargingData[index].Index == tempIndex ))
 				{
 					ShmOCPP16DataPH->CsMsg.bits[connectorIdInt-1].UnlockConnectorReq = 1;