Browse Source

2020-05-22 / Kathy Yeh
1. modify offline Temp StopTransaction appear time
2. modify Temp StopTransaction idtag

Kathy_Yeh 4 years ago
parent
commit
18e2906844
1 changed files with 9 additions and 9 deletions
  1. 9 9
      EVSE/Modularization/ocppfiles/MessageHandler.c

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

@@ -38,7 +38,6 @@
 #include	"TransactionQueue.h"
 
 
-
 #define PASS	1
 #define FAIL	-1
 
@@ -1135,7 +1134,7 @@ int isOFFline(void)
 {
 	if(ShmSysConfigAndInfo->SysInfo.InternetConn == 0)
 	{
-		if(TempMeterValueInterval >=  10  )
+		if(TempMeterValueInterval >=  2  )
 		{
 			TempMeterValueInterval = 0;
 			return TRUE;
@@ -17823,6 +17822,7 @@ void storeTempStopTransaction(int gun_index)
 
 	strcpy((char *)ShmOCPP16Data->StopTransaction[gun_index].Timestamp,buf);
 	ShmOCPP16Data->StopTransaction[gun_index].TransactionId = ShmOCPP16Data->StartTransaction[gun_index].ResponseTransactionId;
+	strcpy((char *)ShmOCPP16Data->StopTransaction[gun_index].IdTag, (const char*)ShmOCPP16Data->StartTransaction[gun_index].IdTag);
 
 	random_uuid(guid);
 
@@ -17831,7 +17831,7 @@ void storeTempStopTransaction(int gun_index)
 	strcpy((char *)ShmOCPP16Data->StopTransaction[gun_index].TransactionData[0].TimeStamp, buf);
 
 	//=================================
-	// Transaction_Begin
+	//1. Transaction_Begin
 	//=================================
 	// Energy.Active.Export.Interval
     //idx_sample=0;
@@ -17854,9 +17854,9 @@ void storeTempStopTransaction(int gun_index)
 	strcpy((char *)ShmOCPP16Data->StopTransaction[gun_index].TransactionData[0].SampledValue[0].Unit,UnitOfMeasureStr[UnitOfMeasure_kWh]);
 
 	//=================================
-	// Transaction_End
+	//2. Transaction_End
 	//=================================
-	//Current.Export
+	//2.1 Current.Export
 	//idx_sample=1;
 	//J: CHAdeMO  U: CCS1 combo  E: CCS2 combo  G : GBT DC
 	if(gunType[gun_index] == 'J')
@@ -17951,7 +17951,7 @@ void storeTempStopTransaction(int gun_index)
 	strcpy((char *)ShmOCPP16Data->StopTransaction[gun_index].TransactionData[0].SampledValue[1].Location,LocationStr[Location_Outlet]);
 	strcpy((char *)ShmOCPP16Data->StopTransaction[gun_index].TransactionData[0].SampledValue[1].Unit,UnitOfMeasureStr[UnitOfMeasure_A]);
 
-	//Energy.Active.Export.Interval
+	//2.2 Energy.Active.Export.Interval
 	//idx_sample=2;
 	//J: CHAdeMO  U: CCS1 combo   E: CCS2 combo   G: GBT DC
 
@@ -18050,7 +18050,7 @@ void storeTempStopTransaction(int gun_index)
 	strcpy((char *)ShmOCPP16Data->StopTransaction[gun_index].TransactionData[0].SampledValue[2].Location,LocationStr[Location_Outlet]);
 	strcpy((char *)ShmOCPP16Data->StopTransaction[gun_index].TransactionData[0].SampledValue[2].Unit,UnitOfMeasureStr[UnitOfMeasure_kWh]);
 
-	//Power.Active.Export
+	//2.3 Power.Active.Export
 	//idx_sample=3;
 	//J: CHAdeMO  U: CCS1 combo  E: CCS2 combo  G: GBT DC
 
@@ -18146,7 +18146,7 @@ void storeTempStopTransaction(int gun_index)
 	strcpy((char *)ShmOCPP16Data->StopTransaction[gun_index].TransactionData[0].SampledValue[3].Location,LocationStr[Location_Outlet]);
 	strcpy((char *)ShmOCPP16Data->StopTransaction[gun_index].TransactionData[0].SampledValue[3].Unit,UnitOfMeasureStr[UnitOfMeasure_kW/*UnitOfMeasure_kWh*/]);
 
-	//Voltage
+	//2.4 Voltage
 	//idx_sample=4;
 	//J: CHAdeMO  U: CCS1 combo  E: CCS2 combo  G: GBT DC
 	if(gunType[gun_index] == 'J')
@@ -18242,7 +18242,7 @@ void storeTempStopTransaction(int gun_index)
 	strcpy((char *)ShmOCPP16Data->StopTransaction[gun_index].TransactionData[0].SampledValue[4].Location,LocationStr[Location_Outlet]);
 	strcpy((char *)ShmOCPP16Data->StopTransaction[gun_index].TransactionData[0].SampledValue[4].Unit,UnitOfMeasureStr[UnitOfMeasure_V]);
 
-	//SoC
+	//2.5 SoC
 	//idx_sample=5;
 	//J : CHAdeMO  U: CCS1 combo  E: CCS2 combo  G: GBT DC
 	if((gunType[gun_index] == 'J')||(gunType[gun_index] == 'U')||(gunType[gun_index] == 'E')||(gunType[gun_index] == 'G'))