Browse Source

2022-12-27/Jerry Wang
[OCPP 1.6] confVersion 24->25
Action:
1. Add two configuration keys 'RfidEndianType' and 'AuthorizeTimeout'.
2. Cancel Heartbeat resend logic.
3. Cancel 'Phase' element for all sampled values. (Exception: Sampled values which is about 'Voltage' and 'Current' for AC charger)
4. Modify BootNotification default retry interval to 60s.
5. Improve checkCompositeSchedule logic.

File:
1. EVSE/Modularization/ocppfiles/MessageHandler.c
--> Action 1-5
2. EVSE/Modularization/ocppfiles/MessageHandler.h
--> Action 1
3. EVSE/Modularization/ocppfiles/Module_OcppBackend.c
--> Action 1
4. EVSE/Projects/define.h
--> Action 1

Jerry Wang 2 years ago
parent
commit
991cf5357b

+ 176 - 32
EVSE/Modularization/ocppfiles/MessageHandler.c

@@ -4743,7 +4743,8 @@ void checkCompositeSchedule(uint8_t connectorId, uint32_t durationReq, struct St
 
 					if((maxProfile.ChargingSchedule.Duration >= compositeProfile.ChargingSchedule.ChargingSchedulePeriod[compositePeriodIdx-1].StartPeriod))
 					{
-						if(maxProfile.ChargingSchedule.ChargingSchedulePeriod[idxMaxPeriod].Limit > compositeProfile.ChargingSchedule.ChargingSchedulePeriod[lastCompositePeriodIdx-1].Limit)
+					    if((maxProfile.ChargingSchedule.ChargingSchedulePeriod[idxMaxPeriod].Limit > compositeProfile.ChargingSchedule.ChargingSchedulePeriod[lastCompositePeriodIdx-1].Limit) &&
+					       (compositeProfile.ChargingSchedule.Duration >= durationReq))
 						{
 							tmpPeriod.StartPeriod = maxProfile.ChargingSchedule.ChargingSchedulePeriod[idxMaxPeriod].StartPeriod;
 							tmpPeriod.NumberPhases = maxProfile.ChargingSchedule.ChargingSchedulePeriod[idxMaxPeriod].NumberPhases;
@@ -4751,9 +4752,15 @@ void checkCompositeSchedule(uint8_t connectorId, uint32_t durationReq, struct St
 						}
 						else
 						{
-							tmpPeriod.StartPeriod = maxProfile.ChargingSchedule.ChargingSchedulePeriod[idxMaxPeriod].StartPeriod;
-							tmpPeriod.NumberPhases = maxProfile.ChargingSchedule.ChargingSchedulePeriod[idxMaxPeriod].NumberPhases;
-							tmpPeriod.Limit = maxProfile.ChargingSchedule.ChargingSchedulePeriod[idxMaxPeriod].Limit;
+							if(maxProfile.ChargingSchedule.Duration > compositeProfile.ChargingSchedule.Duration)
+							{
+								if(maxProfile.ChargingSchedule.ChargingSchedulePeriod[idxMaxPeriod].StartPeriod <= compositeProfile.ChargingSchedule.Duration)
+									tmpPeriod.StartPeriod = compositeProfile.ChargingSchedule.Duration;
+								else
+									tmpPeriod.StartPeriod = maxProfile.ChargingSchedule.ChargingSchedulePeriod[idxMaxPeriod].StartPeriod;
+								tmpPeriod.NumberPhases = maxProfile.ChargingSchedule.ChargingSchedulePeriod[idxMaxPeriod].NumberPhases;
+								tmpPeriod.Limit = maxProfile.ChargingSchedule.ChargingSchedulePeriod[idxMaxPeriod].Limit;
+							}
 						}
 					}
 
@@ -4785,6 +4792,15 @@ void checkCompositeSchedule(uint8_t connectorId, uint32_t durationReq, struct St
 					}
 				}
 			}
+
+			if((maxProfile.ChargingSchedule.Duration > durationReq) && (maxProfile.ChargingSchedule.Duration > compositeProfile.ChargingSchedule.Duration))
+			{
+				compositeProfile.ChargingSchedule.Duration = durationReq;
+			}
+			else if(maxProfile.ChargingSchedule.Duration > compositeProfile.ChargingSchedule.Duration)
+			{
+				compositeProfile.ChargingSchedule.Duration = maxProfile.ChargingSchedule.Duration;
+			}
 		}
 	}
 
@@ -5461,7 +5477,8 @@ void CheckSystemValue(void)
 	if((server_sign == TRUE) && (HeartBeatWaitTime > 0) && (getDiffSecNow(clientTime.Heartbeat) >= (HeartBeatWaitTime + HeartBeatWithNOResponse)))
 	{
 		//parameter for test
-		sendHeartbeatRequest(0);
+		if(HeartBeatWithNOResponse < 1)
+			sendHeartbeatRequest(0);
 	    //===========================
 		// Reset Waiting Time
 		//===========================
@@ -7743,7 +7760,7 @@ int sendMeterValuesRequest(int gun_index, ReadingContext dataType)
 				}
 			}
 
-			strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[0].Phase, PhaseStr[L3_N]);
+			//strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[0].Phase, PhaseStr[L3_N]);
 		}
 		else if(gunType[gun_index] == GUN_TYPE_CCS)
 		{
@@ -7764,7 +7781,7 @@ int sendMeterValuesRequest(int gun_index, ReadingContext dataType)
 				}
 			}
 
-			strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[0].Phase, PhaseStr[L3_N]);
+			//strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[0].Phase, PhaseStr[L3_N]);
 		}
 		else if(gunType[gun_index] == GUN_TYPE_GBT)
 		{
@@ -7785,7 +7802,7 @@ int sendMeterValuesRequest(int gun_index, ReadingContext dataType)
 				}
 			}
 
-			strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[0].Phase, PhaseStr[L3_N]);
+			//strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[0].Phase, PhaseStr[L3_N]);
 		}
 		else if(gunType[gun_index] == GUN_TYPE_DO)
 		{
@@ -7799,7 +7816,7 @@ int sendMeterValuesRequest(int gun_index, ReadingContext dataType)
 				}
 			}
 
-			strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[0].Phase, PhaseStr[L3_N]);
+			//strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[0].Phase, PhaseStr[L3_N]);
 		}
 		else
 		{
@@ -7855,7 +7872,7 @@ int sendMeterValuesRequest(int gun_index, ReadingContext dataType)
 					}
 				}
 
-				strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[1].Phase, PhaseStr[L3_N]);
+				//strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[1].Phase, PhaseStr[L3_N]);
 		}
 		else if(gunType[gun_index] == GUN_TYPE_CCS)
 		{
@@ -7876,7 +7893,7 @@ int sendMeterValuesRequest(int gun_index, ReadingContext dataType)
 					}
 				}
 
-				strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[1].Phase, PhaseStr[L3_N]);
+				//strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[1].Phase, PhaseStr[L3_N]);
 		}
 		else if(gunType[gun_index] == GUN_TYPE_GBT)
 		{
@@ -7897,7 +7914,7 @@ int sendMeterValuesRequest(int gun_index, ReadingContext dataType)
 					}
 				}
 
-				strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[1].Phase, PhaseStr[L3_N]);
+				//strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[1].Phase, PhaseStr[L3_N]);
 		}
 		else if(gunType[gun_index] == GUN_TYPE_DO)
 		{
@@ -7912,7 +7929,7 @@ int sendMeterValuesRequest(int gun_index, ReadingContext dataType)
 					}
 				}
 
-				strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[1].Phase, PhaseStr[L3_N]);
+				//strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[1].Phase, PhaseStr[L3_N]);
 		}
 		else
 		{
@@ -7933,7 +7950,7 @@ int sendMeterValuesRequest(int gun_index, ReadingContext dataType)
 					}
 				}
 
-				strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[1].Phase, PhaseStr[L1_N]);
+				//strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[1].Phase, PhaseStr[L1_N]);
 		}
 
 		strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[1].Context, ReadingContextStr[dataType]);
@@ -7981,7 +7998,7 @@ int sendMeterValuesRequest(int gun_index, ReadingContext dataType)
 				}
 			} // END OF FOR CHAdeMO_QUANTITY
 
-			strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[2].Phase, PhaseStr[L3_N]);
+			//strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[2].Phase, PhaseStr[L3_N]);
 		}
 		else if(gunType[gun_index] == GUN_TYPE_CCS)
 		{
@@ -8015,7 +8032,7 @@ int sendMeterValuesRequest(int gun_index, ReadingContext dataType)
 				}
 			} // END OF CCS_QUANTITY
 
-			strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[2].Phase, PhaseStr[L3_N]);
+			//strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[2].Phase, PhaseStr[L3_N]);
 		}
 		else if(gunType[gun_index] == GUN_TYPE_GBT)
 		{
@@ -8049,7 +8066,7 @@ int sendMeterValuesRequest(int gun_index, ReadingContext dataType)
 				}
 			} // END OF GB_QUANTITY
 
-			 strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[2].Phase, PhaseStr[L3_N]);
+			//strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[2].Phase, PhaseStr[L3_N]);
 		}
 		else if(gunType[gun_index] == GUN_TYPE_DO)
 		{
@@ -8076,7 +8093,7 @@ int sendMeterValuesRequest(int gun_index, ReadingContext dataType)
 				}
 			}
 
-			 strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[2].Phase, PhaseStr[L3_N]);
+			// strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[2].Phase, PhaseStr[L3_N]);
 		}
 		else
 		{
@@ -8110,7 +8127,7 @@ int sendMeterValuesRequest(int gun_index, ReadingContext dataType)
 				}
 			 }
 
-			strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[2].Phase, PhaseStr[L1_N]);
+			 //strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[2].Phase, PhaseStr[L1_N]);
 		}
 
 		strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[2].Context, ReadingContextStr[dataType]);
@@ -8145,7 +8162,7 @@ int sendMeterValuesRequest(int gun_index, ReadingContext dataType)
 				}
 			} // END OF FOR
 
-			strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[3].Phase, PhaseStr[L3_N]);
+			//strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[3].Phase, PhaseStr[L3_N]);
 		}
 		else if(gunType[gun_index] == GUN_TYPE_CCS)
 		{
@@ -8166,7 +8183,7 @@ int sendMeterValuesRequest(int gun_index, ReadingContext dataType)
 				}
 			}
 
-			 strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[3].Phase, PhaseStr[L3_N]);
+			//strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[3].Phase, PhaseStr[L3_N]);
 		}
 		else if(gunType[gun_index] == GUN_TYPE_GBT)
 		{
@@ -8188,7 +8205,7 @@ int sendMeterValuesRequest(int gun_index, ReadingContext dataType)
 				}
 			}
 
-			strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[3].Phase, PhaseStr[L3_N]);
+			//strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[3].Phase, PhaseStr[L3_N]);
 		}
 		else if(gunType[gun_index] == GUN_TYPE_DO)
 		{
@@ -8203,7 +8220,7 @@ int sendMeterValuesRequest(int gun_index, ReadingContext dataType)
 				}
 			}
 
-			strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[3].Phase, PhaseStr[L3_N]);
+			//strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[3].Phase, PhaseStr[L3_N]);
 		}
 		else
 		{
@@ -8224,7 +8241,7 @@ int sendMeterValuesRequest(int gun_index, ReadingContext dataType)
 				}
 			}
 
-			 strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[3].Phase, PhaseStr[L1_N]);
+			//strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[3].Phase, PhaseStr[L1_N]);
 		}
 
 		strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[3].Context, ReadingContextStr[dataType]);
@@ -8259,7 +8276,7 @@ int sendMeterValuesRequest(int gun_index, ReadingContext dataType)
 				}
 			}
 
-			 strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[4].Phase, PhaseStr[L3_N]);
+			//strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[4].Phase, PhaseStr[L3_N]);
 		}
 		else if(gunType[gun_index] == GUN_TYPE_CCS)
 		{
@@ -8280,7 +8297,7 @@ int sendMeterValuesRequest(int gun_index, ReadingContext dataType)
 				}
 			}
 
-			strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[4].Phase, PhaseStr[L3_N]);
+			//strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[4].Phase, PhaseStr[L3_N]);
 		}
 		else if(gunType[gun_index] == GUN_TYPE_GBT)
 		{
@@ -8301,7 +8318,7 @@ int sendMeterValuesRequest(int gun_index, ReadingContext dataType)
 				}
 			}
 
-			strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[4].Phase, PhaseStr[L3_N]);
+			//strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[4].Phase, PhaseStr[L3_N]);
 		}
 		else if(gunType[gun_index] == GUN_TYPE_DO)
 		{
@@ -8315,7 +8332,7 @@ int sendMeterValuesRequest(int gun_index, ReadingContext dataType)
 				}
 			}
 
-			strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[4].Phase, PhaseStr[L3_N]);
+			//strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[4].Phase, PhaseStr[L3_N]);
 		}
 		else
 		{
@@ -8420,7 +8437,7 @@ int sendMeterValuesRequest(int gun_index, ReadingContext dataType)
 			strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[5].Context, ReadingContextStr[dataType]);
 			strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[5].Format, ValueFormatStr[Raw]);
 			strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[5].Measurand, MeasurandStr[SoC]);
-			strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[5].Phase, PhaseStr[L3_N]);
+			//strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[5].Phase, PhaseStr[L3_N]);
 			strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[5].Location, LocationStr[Location_EV]);
 			strcpy((char *)ShmOCPP16Data->MeterValues[gun_index].MeterValue[0].SampledValue[5].Unit,UnitOfMeasureStr[UnitOfMeasure_Percent]);
 		}
@@ -17522,7 +17539,7 @@ int initialConfigurationTable(void)
 	FILE *fp;
 	FILE *outfile;
 	char str[512]={0};
-	int	confVersion = 24;
+	int	confVersion = 25;
 
 	DEBUG_INFO("initialConfigurationTable...version: %d\n", confVersion);
 	//start_t = clock();
@@ -18015,6 +18032,20 @@ int initialConfigurationTable(void)
 
 		fprintf(outfile,"{\"key\":\"%s\",\"readonly\":%s,\"value\":\"%s\"}\n","AuthDownloadlinkCertificate", "false", ShmOCPP16Data->ConfigurationTable.CoreProfile[AuthDownloadlinkCertificate].ItemData);
 
+		// RFID endian type
+		ShmOCPP16Data->ConfigurationTable.CoreProfile[RfidEndianType].ItemAccessibility = 1;
+		strcpy((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[RfidEndianType].ItemName, "RfidEndianType");
+		sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[RfidEndianType].ItemData, ShmSysConfigAndInfo->SysConfig.RfidCardNumEndian==1?"BIG":"LITTLE");
+
+		fprintf(outfile,"{\"key\":\"%s\",\"readonly\":%s,\"value\":\"%s\"}\n","RfidEndianType", "false", ShmOCPP16Data->ConfigurationTable.CoreProfile[RfidEndianType].ItemData);
+
+		// Authorization timeout
+		ShmOCPP16Data->ConfigurationTable.CoreProfile[AuthorizeTimeout].ItemAccessibility = 1;
+		strcpy((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[AuthorizeTimeout].ItemName, "AuthorizeTimeout");
+		sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[AuthorizeTimeout].ItemData, "15");
+
+		fprintf(outfile,"{\"key\":\"%s\",\"readonly\":%s,\"value\":\"%s\"}\n","AuthorizeTimeout", "false", ShmOCPP16Data->ConfigurationTable.CoreProfile[AuthorizeTimeout].ItemData);
+
 		//* Local Auth List Management Profile*/
 		#if 0
 			//For OCTT Test Case
@@ -18497,6 +18528,18 @@ int initialConfigurationTable(void)
 					sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[AuthDownloadlinkCertificate].ItemData, "%s", valuestr);
 				}
 
+				if(strcmp(keystr, "RfidEndianType") == 0)
+				{
+					ShmOCPP16Data->ConfigurationTable.CoreProfile[RfidEndianType].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
+					sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[RfidEndianType].ItemData, ShmSysConfigAndInfo->SysConfig.RfidCardNumEndian==1?"BIG":"LITTLE");
+				}
+
+				if(strcmp(keystr, "AuthorizeTimeout") == 0)
+				{
+					ShmOCPP16Data->ConfigurationTable.CoreProfile[AuthorizeTimeout].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
+					sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[AuthorizeTimeout].ItemData, "%s", valuestr);
+				}
+
 				if(strcmp(keystr, "LocalAuthListEnabled") == 0)
 				{
 					ShmOCPP16Data->ConfigurationTable.LocalAuthListManagementProfile[LocalAuthListEnabled].ItemAccessibility = (strcmp(readonlystr, "true")==0) ? 0 : 1;
@@ -18939,8 +18982,6 @@ void StoreConfigurationTable(void)
 		json_object_object_add(target, "readonly", (ShmOCPP16Data->ConfigurationTable.CoreProfile[DefaultPrice].ItemAccessibility?json_object_new_boolean(0):json_object_new_boolean(1)));
 		json_object_object_add(target, "value", json_object_new_string((char*)ShmOCPP16Data->ConfigurationTable.CoreProfile[DefaultPrice].ItemData));
 
-
-
 	   fprintf(outfile, "%s\n", json_object_to_json_string_ext(target, JSON_C_TO_STRING_PLAIN));
 		json_object_put(target);
 	}
@@ -19151,6 +19192,24 @@ void StoreConfigurationTable(void)
 
 	fprintf(outfile,"{\"key\":\"%s\",\"readonly\":%s,\"value\":\"%s\"}\n","AuthDownloadlinkCertificate", "false", (char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[AuthDownloadlinkCertificate].ItemData);
 
+	// RfidEndianType
+	/*
+	ShmOCPP16Data->ConfigurationTable.CoreProfile[RfidEndianType].ItemAccessibility = 1;
+	strcpy((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[RfidEndianType].ItemName, "RfidEndianType");
+	strcpy((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[RfidEndianType].ItemData, "BIG" );
+	*/
+
+	fprintf(outfile,"{\"key\":\"%s\",\"readonly\":%s,\"value\":\"%s\"}\n","RfidEndianType", "false", (char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[RfidEndianType].ItemData);
+
+	// AuthorizeTimeout
+	/*
+	ShmOCPP16Data->ConfigurationTable.CoreProfile[AuthorizeTimeout].ItemAccessibility = 1;
+	strcpy((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[AuthorizeTimeout].ItemName, "AuthorizeTimeout");
+	strcpy((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[AuthorizeTimeout].ItemData, "60" );
+	*/
+
+	fprintf(outfile,"{\"key\":\"%s\",\"readonly\":%s,\"value\":\"%s\"}\n","AuthorizeTimeout", "false", (char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[AuthorizeTimeout].ItemData);
+
 	//* Local Auth List Management Profile*/
 	//LocalAuthListEnabled
 	/*
@@ -20347,6 +20406,42 @@ void getKeyValue(char *keyReq)
 			  isKnowKey = TRUE;
 		  }
 
+		  if(isEmpty ||  strcmp(keyReq, "RfidEndianType") == 0 )
+		  {
+			  strcpy((char *)ShmOCPP16Data->GetConfiguration.Key[GetConfiguration_RfidEndianType].Item, "RfidEndianType");
+			  strcpy((char *)ShmOCPP16Data->GetConfiguration.ResponseConfigurationKey[GetConfiguration_RfidEndianType].Key, "RfidEndianType");
+
+			  if(ShmOCPP16Data->ConfigurationTable.CoreProfile[RfidEndianType].ItemAccessibility == 1)
+			  {
+				  strcpy((char *)ShmOCPP16Data->GetConfiguration.ResponseConfigurationKey[GetConfiguration_RfidEndianType].ReadOnly, "0"/*"FALSE"*/);
+			  }
+			  else
+			  {
+				  strcpy((char *)ShmOCPP16Data->GetConfiguration.ResponseConfigurationKey[GetConfiguration_RfidEndianType].ReadOnly, "1"/*"TRUE"*/);
+			  }
+
+			  strcpy((char *)ShmOCPP16Data->GetConfiguration.ResponseConfigurationKey[GetConfiguration_RfidEndianType].Value, ShmSysConfigAndInfo->SysConfig.RfidCardNumEndian==1?"BIG":"LITTLE");
+			  isKnowKey = TRUE;
+		  }
+
+		  if(isEmpty ||  strcmp(keyReq, "AuthorizeTimeout") == 0 )
+		  {
+			  strcpy((char *)ShmOCPP16Data->GetConfiguration.Key[GetConfiguration_AuthorizeTimeout].Item, "AuthorizeTimeout");
+			  strcpy((char *)ShmOCPP16Data->GetConfiguration.ResponseConfigurationKey[GetConfiguration_AuthorizeTimeout].Key, "AuthorizeTimeout");
+
+			  if(ShmOCPP16Data->ConfigurationTable.CoreProfile[AuthorizeTimeout].ItemAccessibility == 1)
+			  {
+				  strcpy((char *)ShmOCPP16Data->GetConfiguration.ResponseConfigurationKey[GetConfiguration_AuthorizeTimeout].ReadOnly, "0"/*"FALSE"*/);
+			  }
+			  else
+			  {
+				  strcpy((char *)ShmOCPP16Data->GetConfiguration.ResponseConfigurationKey[GetConfiguration_AuthorizeTimeout].ReadOnly, "1"/*"TRUE"*/);
+			  }
+
+			  strcpy((char *)ShmOCPP16Data->GetConfiguration.ResponseConfigurationKey[GetConfiguration_AuthorizeTimeout].Value, (const char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[AuthorizeTimeout].ItemData);
+			  isKnowKey = TRUE;
+		  }
+
 #if 1
 	      if(isEmpty ||  strcmp(keyReq, "LocalAuthListEnabled") == 0 )
 	      {
@@ -21785,6 +21880,55 @@ int setKeyValue(char *key, char *value)
 		}
 	}
 
+	if(strcmp(key, "RfidEndianType") == 0)
+	{
+		if(ShmOCPP16Data->ConfigurationTable.CoreProfile[RfidEndianType].ItemAccessibility == 1)
+		{
+			strcpy(str, (const char*)value);
+			if((strcmp(str, "BIG")==0) || (strcmp(str, "LITTLE")==0))
+			{
+				sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[RfidEndianType].ItemData, "%s", str );
+				ShmSysConfigAndInfo->SysConfig.RfidCardNumEndian = (strcmp(str, "BIG")==0)?1:0;
+				isSuccess = ConfigurationStatus_Accepted;
+			}
+			else
+				isSuccess = ConfigurationStatus_Rejected;
+		}
+		else
+		{
+			isSuccess = ConfigurationStatus_Rejected;
+		}
+	}
+
+	if(strcmp(key, "AuthorizeTimeout") == 0)
+	{
+		if(ShmOCPP16Data->ConfigurationTable.CoreProfile[AuthorizeTimeout].ItemAccessibility == 1)
+		{
+			strcpy(str, (const char*)value);
+			check_ascii = value[0];
+			if((check_ascii < 48) || (check_ascii > 57))
+			{
+				isSuccess = ConfigurationStatus_Rejected;
+			}
+			else
+			{
+				if((atoi(value) >= 10) && (atoi(value) <= 300))
+				{
+					sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[AuthorizeTimeout].ItemData, "%s", str );
+					isSuccess = ConfigurationStatus_Accepted;
+				}
+				else
+				{
+					isSuccess = ConfigurationStatus_Rejected;
+				}
+			}
+		}
+		else
+		{
+			isSuccess = ConfigurationStatus_Rejected;
+		}
+	}
+
 #if 0
     //For OCPP Test Case
     if(strcmp(key, "LocalAuthorizationListEnabled") == 0)

+ 2 - 0
EVSE/Modularization/ocppfiles/MessageHandler.h

@@ -421,6 +421,8 @@ enum GetConfigurationKey {
 	GetConfiguration_CpoName,
 	GetConfiguration_OcppSoftwareVersion,
 	GetConfiguration_AuthDownloadlinkCertificate,
+	GetConfiguration_RfidEndianType,
+	GetConfiguration_AuthorizeTimeout,
 	_GetConfiguration_CNT
 };
 

+ 2 - 2
EVSE/Modularization/ocppfiles/Module_OcppBackend.c

@@ -29,7 +29,7 @@ void ReceivedMessage(void *in, size_t len);
 int SendBufLen=0;//(1024*4);//(1024*3);
 unsigned char SendBuffer[WEBSOCKET_BUFFER_SIZE]={0};
 static int ConnectionEstablished=0;
-int defaultWaitingTime = 10; //10 second
+int defaultWaitingTime = 60; //10 second
 
 char OcppPath[384]={0};
 char OcppProtocol[10]={0},OcppHost[128]={0}, OcppTempPath[256]={0};
@@ -1368,7 +1368,7 @@ int main(void)
 	queueOpInfo.TransactionMessageResend = 0;
 
 	DEBUG_INFO("Module_OcppBackend task initialization...\n");
-	DEBUG_INFO("Git update date: 2022/11/16 \n");
+	DEBUG_INFO("Git update date: 2022/12/27 \n");
 	//lws_set_log_level(LLL_PARSER | LLL_HEADER | LLL_ERR | LLL_WARN | LLL_NOTICE | LLL_INFO | LLL_DEBUG | LLL_EXT | LLL_CLIENT | LLL_LATENCY  , NULL);
 
 	if(ProcessShareMemory()== FAIL)

+ 3 - 1
EVSE/Projects/define.h

@@ -348,6 +348,8 @@ enum CoreProfile {
 	 CpoName,
 	 OcppSoftwareVersion,
 	 AuthDownloadlinkCertificate,
+	 RfidEndianType,
+	 AuthorizeTimeout,
 	 _CoreProfile_CNT
 };
 
@@ -1211,7 +1213,7 @@ struct SysInfoData
     struct BAZEL8           bazel8;                     // Bazel8 payment used
     struct Enegate          enegate;                    // Enegate payment used
     unsigned char           PsuLostQuantity;
-    unsigned char			isDispenserLog;				// 0: off	1: on
+    unsigned char           isDispenserLog;             // 0: off       1: on
 };
 
 struct SysConfigAndInfo