Переглянути джерело

2020-05-19 / Kathy Yeh
1. 異常斷電:modify StopTransaction Reason(PowerLoss)

Kathy_Yeh 4 роки тому
батько
коміт
73a455e069
1 змінених файлів з 2 додано та 23 видалено
  1. 2 23
      EVSE/Modularization/ocppfiles/MessageHandler.c

+ 2 - 23
EVSE/Modularization/ocppfiles/MessageHandler.c

@@ -38,7 +38,6 @@
 #include	"TransactionQueue.h"
 
 
-
 #define PASS				1
 #define FAIL				-1
 
@@ -18283,7 +18282,7 @@ void storeTempStopTransaction(int gun_index)
 							,ShmOCPP16Data->StopTransaction[gun_index].MeterStop
 							,ShmOCPP16Data->StopTransaction[gun_index].Timestamp
 							,ShmOCPP16Data->StopTransaction[gun_index].TransactionId
-							,ShmOCPP16Data->StopTransaction[gun_index].StopReason
+							,"PowerLoss"
 							,(const char *)ShmOCPP16Data->StopTransaction[gun_index].TransactionData[0].TimeStamp
 							,ShmOCPP16Data->StopTransaction[gun_index].TransactionData[0].SampledValue[0].Value
 							,ShmOCPP16Data->StopTransaction[gun_index].TransactionData[0].SampledValue[0].Context
@@ -18339,7 +18338,7 @@ void storeTempStopTransaction(int gun_index)
 							,ShmOCPP16Data->StopTransaction[gun_index].MeterStop
 							,ShmOCPP16Data->StopTransaction[gun_index].Timestamp
 							,ShmOCPP16Data->StopTransaction[gun_index].TransactionId
-							,ShmOCPP16Data->StopTransaction[gun_index].StopReason
+							,"PowerLoss"
 							,(const char *)ShmOCPP16Data->StopTransaction[gun_index].TransactionData[0].TimeStamp
 							,ShmOCPP16Data->StopTransaction[gun_index].TransactionData[0].SampledValue[0].Value
 							,ShmOCPP16Data->StopTransaction[gun_index].TransactionData[0].SampledValue[0].Context
@@ -18413,26 +18412,6 @@ void storeTempStopTransaction(int gun_index)
 	fputs(queuedata, outfile);
 	fputs("\n", outfile);
 	fclose (outfile);
-
-#if 0
-	sprintf(tempdata, "StopTransaction,%d", (gun_index));
-	if(hashmap_operation(0, guid, tempdata) == 1)
-	{
-			result = PASS;
-			DEBUG_INFO("StopTransaction mapitem pass\n");
-	}
-	queue_operation(4, guid, queuedata );//addq(guid, queuedata); ---> remove temporally
-
-
-	//----------------------------replace queue StopTransaction TransactionId ---------------------------//
-	int gettransactionId = GetTransactionId(gun_index+1, ShmOCPP16Data->StopTransaction[gun_index].IdTag);
-
-	if((ShmOCPP16Data->StopTransaction[gun_index].TransactionId != 0) && (gettransactionId != 0))
-	{
-		SetTransactionIdZero(ShmOCPP16Data->StopTransaction[gun_index].TransactionId);
-	}
-#endif
-
 }
 
 void checkTempStopTransaction(int gun_index)