Browse Source

[Improve][Modularization][Module_OcppBackend]

2020.12.11 / Folus Wen

Actions:
1. DataTransfer sent out check logic move location.

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 4 years ago
parent
commit
e5019a0ba2

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

@@ -4745,6 +4745,15 @@ void CheckSystemValue(void)
 	//===============================
 	for(int gun_index=0;gun_index < gunTotalNumber ;gun_index++)
 	{
+		//==========================================
+		// csu trigger DataTransferReq
+		//==========================================
+		if(isWebsocketSendable && (server_sign == TRUE) && (ShmOCPP20Data->CsMsg.bits[gun_index].DataTransferReq == ON))
+		{
+			sendDataTransferRequest(gun_index);
+			ShmOCPP20Data->CsMsg.bits[gun_index].DataTransferReq = OFF;
+		}
+
 		//===============================
 		// CSU Trigger Smart Charging Profilw
 		//===============================
@@ -5349,15 +5358,6 @@ void CheckSystemValue(void)
 			sendReserveNowConfirmation((char *)ShmOCPP20Data->ReserveNow[gun_index].guid, gun_index);
 			ShmOCPP20Data->CsMsg.bits[gun_index].ReserveNowConf = OFF;
 		}
-
-		//==========================================
-		// csu trigger DataTransferReq
-		//==========================================
-		if(isWebsocketSendable && (server_sign == TRUE) && (ShmOCPP20Data->CsMsg.bits[gun_index].DataTransferReq == ON))
-		{
-			sendDataTransferRequest(gun_index);
-			ShmOCPP20Data->CsMsg.bits[gun_index].DataTransferReq = OFF;
-		}
 	}
 }
 

+ 9 - 9
EVSE/Modularization/ocppfiles/MessageHandler.c

@@ -2313,6 +2313,15 @@ void CheckSystemValue(void)
 
 	for(int gun_index=0;gun_index < gunTotalNumber ;gun_index++)
 	{
+		//==========================================
+		// csu trigger DataTransferReq
+		//==========================================
+		if(isWebsocketSendable && (server_sign == TRUE) && (ShmOCPP16Data->CsMsg.bits[gun_index].DataTransferReq == 1))
+		{
+			sendDataTransferRequest(gun_index);
+			ShmOCPP16Data->CsMsg.bits[gun_index].DataTransferReq = 0;
+		}
+
 		//===============================
 		// CSU Trigger Reset Conf
 		//===============================
@@ -2983,15 +2992,6 @@ void CheckSystemValue(void)
 			sendReserveNowTransactionConfirmation((char *)ShmOCPP16Data->ReserveNow[gun_index].guid, (char *)ShmOCPP16Data->ReserveNow[gun_index].ResponseStatus);
 			ShmOCPP16Data->CsMsg.bits[gun_index].ReserveNowConf = 0;
 		}
-
-		//==========================================
-		// csu trigger DataTransferReq
-		//==========================================
-		if(isWebsocketSendable && (server_sign == TRUE) && (ShmOCPP16Data->CsMsg.bits[gun_index].DataTransferReq == 1))
-		{
-			sendDataTransferRequest(gun_index);
-			ShmOCPP16Data->CsMsg.bits[gun_index].DataTransferReq = 0;
-		}
 	}
 }