소스 검색

[Add][Modularization][Module_OcppBackend]

2021.12.01 / Folus Wen

Actions:
1. DataTransafer add ID_TxEnergy for provide present charged energy by period to server.

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 년 전
부모
커밋
b06d673b33

+ 213 - 4
EVSE/Modularization/ocppfiles/MessageHandler.c

@@ -10022,12 +10022,187 @@ void createFirmwareVersionByDataTransfer(void)
 		json_object_object_add(FirmwareDataTransfer, "TelcomModemFwRev", json_object_new_string((char*)ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomSoftwareVer));
 	}
 
-	sprintf((char*)ShmOCPP16Data->DataTransfer[0].VendorId, "%s", ShmSysConfigAndInfo->SysConfig.chargePointVendor);
-	sprintf((char*)ShmOCPP16Data->DataTransfer[0].MessageId, "ID_FirmwareVersion");
-	sprintf((char*)ShmOCPP16Data->DataTransfer[0].Data, json_object_to_json_string_ext(FirmwareDataTransfer, JSON_C_TO_STRING_PLAIN));
+	sprintf((char*)ShmOCPP16Data->DataTransfer[0].ResponseData, json_object_to_json_string_ext(FirmwareDataTransfer, JSON_C_TO_STRING_PLAIN));
 	json_object_put(FirmwareDataTransfer);
 }
 
+int createPresetChargingedEnergyByDataTransfer(uint8_t gun_index, int transactionId)
+{
+	int result = FAIL;
+	int tempIndex;
+	json_object *EnergyDataTransfer = json_object_new_object();
+	json_object *periodEnergys = json_object_new_object();
+
+	if(gunType[gun_index] == GUN_TYPE_CHAdeMO)
+	{
+		if(ShmSysConfigAndInfo->SysConfig.ModelName[8] != '0')
+		{
+			tempIndex = ((gun_index==2) ? 1: 0);
+		}
+		else
+		{
+			tempIndex = gun_index;
+		}
+
+		for (int index = 0; index < CHAdeMO_QUANTITY; index++)
+		{
+			if ((ShmSysConfigAndInfo->SysInfo.ChademoChargingData[index].Index == tempIndex))
+			{
+				if(ShmOCPP16Data->StartTransaction[gun_index].ResponseTransactionId == transactionId)
+				{
+					json_object_object_add(EnergyDataTransfer, "txId", json_object_new_int(transactionId));
+
+					for(uint8_t idxPeriod=0;idxPeriod<ARRAY_SIZE(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[index].presentChargedEnergyPeriod);idxPeriod++)
+					{
+						uint8_t period[3];
+						sprintf((char*)period, "%d", idxPeriod);
+
+						json_object_object_add(periodEnergys, (const char *)period, json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[index].presentChargedEnergyPeriod[idxPeriod]));
+					}
+
+					json_object_object_add(EnergyDataTransfer, "periodEnergy", json_object_new_string(json_object_to_json_string_ext(periodEnergys, JSON_C_TO_STRING_PLAIN)));
+
+					result = PASS;
+				}
+			} //end of the same index
+		}//end of for CHAdeMO_QUANTITY
+	}
+	else if(gunType[gun_index] == GUN_TYPE_CCS)
+	{
+		if(ShmSysConfigAndInfo->SysConfig.ModelName[8] != '0')
+		{
+			tempIndex = ((gun_index==2) ? 1: 0);
+		}
+		else
+		{
+			tempIndex = gun_index;
+		}
+
+		for (int index = 0; index < CCS_QUANTITY; index++)
+		{
+			if(ShmSysConfigAndInfo->SysInfo.CcsChargingData[index].Index == tempIndex)
+			{
+				if(ShmOCPP16Data->StartTransaction[gun_index].ResponseTransactionId == transactionId)
+				{
+					json_object_object_add(EnergyDataTransfer, "txId", json_object_new_int(transactionId));
+
+					for(uint8_t idxPeriod=0;idxPeriod<ARRAY_SIZE(ShmSysConfigAndInfo->SysInfo.CcsChargingData[index].presentChargedEnergyPeriod);idxPeriod++)
+					{
+						uint8_t period[3];
+						sprintf((char*)period, "%d", idxPeriod);
+
+						json_object_object_add(periodEnergys, (const char *)period, json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[index].presentChargedEnergyPeriod[idxPeriod]));
+					}
+
+					json_object_object_add(EnergyDataTransfer, "periodEnergy", json_object_new_string(json_object_to_json_string_ext(periodEnergys, JSON_C_TO_STRING_PLAIN)));
+
+					result = PASS;
+				}
+			} //end of the same index
+		} // end of for CCS_QUANTITY
+	}
+	else if(gunType[gun_index] == GUN_TYPE_GBT)
+	{
+		if(ShmSysConfigAndInfo->SysConfig.ModelName[8] != '0')
+		{
+			tempIndex = ((gun_index==2) ? 1: 0);
+		}
+		else
+		{
+			tempIndex = gun_index;
+		}
+
+		for (int index = 0; index < GB_QUANTITY; index++)
+		{
+			if(ShmSysConfigAndInfo->SysInfo.GbChargingData[index].Index == tempIndex)
+			{
+				if(ShmOCPP16Data->StartTransaction[gun_index].ResponseTransactionId == transactionId)
+				{
+					json_object_object_add(EnergyDataTransfer, "txId", json_object_new_int(transactionId));
+
+					for(uint8_t idxPeriod=0;idxPeriod<ARRAY_SIZE(ShmSysConfigAndInfo->SysInfo.GbChargingData[index].presentChargedEnergyPeriod);idxPeriod++)
+					{
+						uint8_t period[3];
+						sprintf((char*)period, "%d", idxPeriod);
+
+						json_object_object_add(periodEnergys, (const char *)period, json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[index].presentChargedEnergyPeriod[idxPeriod]));
+					}
+
+					json_object_object_add(EnergyDataTransfer, "periodEnergy", json_object_new_string(json_object_to_json_string_ext(periodEnergys, JSON_C_TO_STRING_PLAIN)));
+
+					result = PASS;
+				}
+			} //end of the same index
+		} // end of for GB_QUANTITY
+	}
+	else if(gunType[gun_index] == GUN_TYPE_DO)
+	{
+		tempIndex = gun_index;
+
+		for (int index = 0; index < GENERAL_GUN_QUANTITY; index++)
+		{
+			if(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[index].GeneralChargingData.Index == tempIndex)
+			{
+				if(ShmOCPP16Data->StartTransaction[gun_index].ResponseTransactionId == transactionId)
+				{
+					json_object_object_add(EnergyDataTransfer, "txId", json_object_new_int(transactionId));
+
+					for(uint8_t idxPeriod=0;idxPeriod<ARRAY_SIZE(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[index].GeneralChargingData.presentChargedEnergyPeriod);idxPeriod++)
+					{
+						uint8_t period[3];
+						sprintf((char*)period, "%d", idxPeriod);
+
+						json_object_object_add(periodEnergys, (const char *)period, json_object_new_double(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[index].GeneralChargingData.presentChargedEnergyPeriod[idxPeriod]));
+					}
+
+					json_object_object_add(EnergyDataTransfer, "periodEnergy", json_object_new_string(json_object_to_json_string_ext(periodEnergys, JSON_C_TO_STRING_PLAIN)));
+
+					result = PASS;
+				}
+			} //end of the same index
+		}
+	}
+	else
+	{
+		if(ShmSysConfigAndInfo->SysConfig.ModelName[0]=='D')
+		{
+			tempIndex = 2;
+		}
+		else
+		{
+			tempIndex = gun_index;
+		}
+
+		for (int index = 0; index < AC_QUANTITY; index++)
+		{
+			if(ShmSysConfigAndInfo->SysInfo.AcChargingData[index].Index == tempIndex)
+			{
+				if(ShmOCPP16Data->StartTransaction[gun_index].ResponseTransactionId == transactionId)
+				{
+					json_object_object_add(EnergyDataTransfer, "txId", json_object_new_int(transactionId));
+
+					for(uint8_t idxPeriod=0;idxPeriod<ARRAY_SIZE(ShmSysConfigAndInfo->SysInfo.AcChargingData[index].presentChargedEnergyPeriod);idxPeriod++)
+					{
+						uint8_t period[3];
+						sprintf((char*)period, "%d", idxPeriod);
+
+						json_object_object_add(periodEnergys, (const char *)period, json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[index].presentChargedEnergyPeriod[idxPeriod]));
+					}
+
+					json_object_object_add(EnergyDataTransfer, "periodEnergy", json_object_new_string(json_object_to_json_string_ext(periodEnergys, JSON_C_TO_STRING_PLAIN)));
+
+					result = PASS;
+				}
+			}//end of the same index
+		}//end of for AC_QUANTITY
+	}
+
+	sprintf((char*)ShmOCPP16Data->DataTransfer[0].ResponseData, json_object_to_json_string_ext(EnergyDataTransfer, JSON_C_TO_STRING_PLAIN));
+	json_object_put(EnergyDataTransfer);
+
+	return result;
+}
+
 int handleDataTransferRequest(char *uuid, char *payload)
 {
 	mtrace();
@@ -10066,7 +10241,7 @@ int handleDataTransferRequest(char *uuid, char *payload)
 			// Send all moudle firmware version on EVSE
 			createFirmwareVersionByDataTransfer();
 			json_object_object_add(response, "status", json_object_new_string("Accepted"));
-			json_object_object_add(response, "data", json_object_new_string((char*)ShmOCPP16Data->DataTransfer[0].Data));
+			json_object_object_add(response, "data", json_object_new_string((char*)ShmOCPP16Data->DataTransfer[0].ResponseData));
 			sprintf(message,"[%d,\"%s\",%s]",MESSAGE_TYPE_CALLRESULT, uuid, json_object_to_json_string_ext(response, JSON_C_TO_STRING_PLAIN));
 			json_object_put(response);
 		}
@@ -10564,6 +10739,40 @@ int handleDataTransferRequest(char *uuid, char *payload)
 			sprintf(message,"[%d,\"%s\",%s]",MESSAGE_TYPE_CALLRESULT, uuid, json_object_to_json_string_ext(response, JSON_C_TO_STRING_PLAIN));
 			json_object_put(response);
 		}
+		else if(strstr(tempmessageId, "ID_TxEnergy") != NULL)
+		{
+			json_object *data;
+			data = json_tokener_parse(tempdata);
+			if(!is_error(data))
+			{
+				if((json_object_object_get(data, "ConnectorId") != NULL) && (json_object_object_get(data, "txId") != NULL))
+				{
+					if(createPresetChargingedEnergyByDataTransfer((json_object_get_int(json_object_object_get(data, "ConnectorId"))-1), json_object_get_int(json_object_object_get(data, "txId"))) == PASS)
+					{
+						json_object_object_add(response, "status", json_object_new_string("Accepted"));
+						json_object_object_add(response, "data", json_object_new_string((char*)ShmOCPP16Data->DataTransfer[0].ResponseData));
+					}
+					else
+					{
+						json_object_object_add(response, "status", json_object_new_string("Rejected"));
+						json_object_object_add(response, "data", json_object_new_string("Present charged energy data can not get."));
+					}
+				}
+				else
+				{
+					json_object_object_add(response, "status", json_object_new_string("Rejected"));
+					json_object_object_add(response, "data", json_object_new_string("Configuration content something wrong."));
+				}
+			}
+			else
+			{
+				json_object_object_add(response, "status", json_object_new_string("Rejected"));
+				json_object_object_add(response, "data", json_object_new_string("Configuration content something wrong."));
+			}
+
+			sprintf(message,"[%d,\"%s\",%s]",MESSAGE_TYPE_CALLRESULT, uuid, json_object_to_json_string_ext(response, JSON_C_TO_STRING_PLAIN));
+			json_object_put(response);
+		}
 		else
 		{
 			// Can not find valid message id

+ 2 - 4
EVSE/Modularization/ocppph/MessageHandler.c

@@ -9760,9 +9760,7 @@ void createFirmwareVersionByDataTransfer(void)
 		json_object_object_add(FirmwareDataTransfer, "TelcomModemFwRev", json_object_new_string((char*)ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomSoftwareVer));
 	}
 
-	sprintf((char*)ShmOCPP16DataPH->DataTransfer[0].VendorId, "%s", ShmSysConfigAndInfo->SysConfig.chargePointVendor);
-	sprintf((char*)ShmOCPP16DataPH->DataTransfer[0].MessageId, "ID_FirmwareVersion");
-	sprintf((char*)ShmOCPP16DataPH->DataTransfer[0].Data, json_object_to_json_string_ext(FirmwareDataTransfer, JSON_C_TO_STRING_PLAIN));
+	sprintf((char*)ShmOCPP16DataPH->DataTransfer[0].ResponseData, json_object_to_json_string_ext(FirmwareDataTransfer, JSON_C_TO_STRING_PLAIN));
 	json_object_put(FirmwareDataTransfer);
 }
 
@@ -9804,7 +9802,7 @@ int handleDataTransferRequest(char *uuid, char *payload)
 			// Send all moudle firmware version on EVSE
 			createFirmwareVersionByDataTransfer();
 			json_object_object_add(response, "status", json_object_new_string("Accepted"));
-			json_object_object_add(response, "data", json_object_new_string((char*)ShmOCPP16DataPH->DataTransfer[0].Data));
+			json_object_object_add(response, "data", json_object_new_string((char*)ShmOCPP16DataPH->DataTransfer[0].ResponseData));
 			sprintf(message,"[%d,\"%s\",%s]",MESSAGE_TYPE_CALLRESULT, uuid, json_object_to_json_string_ext(response, JSON_C_TO_STRING_PLAIN));
 			json_object_put(response);
 		}

+ 4 - 4
EVSE/Projects/AX80/Apps/Module_InternalComm.c

@@ -943,7 +943,7 @@ unsigned char Query_Power_Consumption(unsigned char fd, unsigned char targetAddr
 
 #else	//SIMULATION
 			tsNow = current_timestamp();
-			tmpPowerConsumption += (uint64_t)((ShmSysConfigAndInfo->SysInfo.AcChargingData[0].PresentChargingVoltage*ShmSysConfigAndInfo->SysInfo.AcChargingData[0].PresentChargingCurrent)*((tsNow-tsLast)/360000.0));
+			tmpPowerConsumption += (uint64_t)((ShmDispenser->gun_info.inputVoltage.L1N_L12*ShmDispenser->gun_info.outputCurrent.L1N_L12[0])*((tsNow-tsLast)/360000.0));
 			Ret_Buf_T-> power_consumption = tmpPowerConsumption;
 			tsLast = tsNow;
 #endif	//SIMULATION
@@ -2370,11 +2370,11 @@ int main(void)
 						ShmDispenser->gun_info.acCcsInfo.EVSEPresentCurrent[1] = (float)ShmDispenser->gun_info.outputCurrent.L1N_L12[0];
 						ShmDispenser->gun_info.acCcsInfo.EVSEPresentCurrent[2] = (float)ShmDispenser->gun_info.outputCurrent.L1N_L12[0];
 #else	//SIMULATION
-						ShmDispenser->AcChargingData.PresentChargingCurrent = (float)(ShmDispenser->AcChargingData.SystemStatus==SYS_MODE_CHARGING?(((rand()%10)+((ShmDispenser->gun_info.targetCurrent*10)-5))/10.0):0);
+						ShmDispenser->gun_info.outputCurrent.L1N_L12[0] = (float)(ShmDispenser->gun_info.SystemStatus==SYS_MODE_CHARGING?(((rand()%10)+((ShmDispenser->gun_info.targetCurrent*10)-5))/10.0):0);
 						if(ShmDispenser->ConfigData.AcPhaseCount == 3)
 						{
-							ShmDispenser->AcChargingData.PresentChargingCurrentL2 = (float)(ShmDispenser->AcChargingData.SystemStatus==SYS_MODE_CHARGING?(((rand()%10)+((ShmDispenser->gun_info.targetCurrent*10)-5))/10.0):0);
-							ShmDispenser->AcChargingData.PresentChargingCurrentL3 = (float)(ShmDispenser->AcChargingData.SystemStatus==SYS_MODE_CHARGING?(((rand()%10)+((ShmDispenser->gun_info.targetCurrent*10)-5))/10.0):0);
+							ShmDispenser->gun_info.outputCurrent.L2N_L23[0] = (float)(ShmDispenser->gun_info.SystemStatus==SYS_MODE_CHARGING?(((rand()%10)+((ShmDispenser->gun_info.targetCurrent*10)-5))/10.0):0);
+							ShmDispenser->gun_info.outputCurrent.L3N_L31[0] = (float)(ShmDispenser->gun_info.SystemStatus==SYS_MODE_CHARGING?(((rand()%10)+((ShmDispenser->gun_info.targetCurrent*10)-5))/10.0):0);
 						}
 #endif	//SIMULATION
 						failCount = 0;

+ 13 - 13
EVSE/Projects/AX80/Apps/main.c

@@ -1422,17 +1422,17 @@ int getReceiptInfo(uint8_t gun_index, char *receiptInfo)
 	json_object *receipt = json_object_new_object();
 	json_object *receiptAry = json_object_new_array();
 
-	for(uint8_t idxHour=0;idxHour<ARRAY_SIZE(ShmCharger->gun_info[gun_index].presentChargedEnergyPeriod);idxHour++)
+	for(uint8_t idxHour=0;idxHour<ARRAY_SIZE(ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].presentChargedEnergyPeriod);idxHour++)
 	{
 		json_object *receiptDetail = json_object_new_object();
 
 		json_object_object_add(receiptDetail, "hour", json_object_new_int(idxHour));
-		json_object_object_add(receiptDetail, "chargedEnergy", json_object_new_double(ShmCharger->gun_info[gun_index].presentChargedEnergyPeriod[idxHour]));
+		json_object_object_add(receiptDetail, "chargedEnergy", json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].presentChargedEnergyPeriod[idxHour]));
 		json_object_object_add(receiptDetail, "unitPrice", json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[idxHour]));
-		json_object_object_add(receiptDetail, "periodPrice", json_object_new_double(ShmCharger->gun_info[gun_index].presentChargedEnergyPeriod[idxHour]*ShmSysConfigAndInfo->SysConfig.BillingData.Fee[idxHour]));
+		json_object_object_add(receiptDetail, "periodPrice", json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].presentChargedEnergyPeriod[idxHour]*ShmSysConfigAndInfo->SysConfig.BillingData.Fee[idxHour]));
 
-		totalEnergy += ShmCharger->gun_info[gun_index].presentChargedEnergyPeriod[idxHour];
-		totalPrice += ShmCharger->gun_info[gun_index].presentChargedEnergyPeriod[idxHour]*ShmSysConfigAndInfo->SysConfig.BillingData.Fee[idxHour];
+		totalEnergy += ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].presentChargedEnergyPeriod[idxHour];
+		totalPrice += ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].presentChargedEnergyPeriod[idxHour]*ShmSysConfigAndInfo->SysConfig.BillingData.Fee[idxHour];
 
 		json_object_array_add(receiptAry, receiptDetail);
 	}
@@ -2790,7 +2790,7 @@ int presentChargedEnergyClear(unsigned char gun_index)
 	int result = FAIL;
 
 	ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PresentChargedEnergy = 0;
-	memset(ShmCharger->gun_info[gun_index].presentChargedEnergyPeriod, 0x00, ARRAY_SIZE(ShmCharger->gun_info[gun_index].presentChargedEnergyPeriod)*sizeof(float));
+	memset(ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].presentChargedEnergyPeriod, 0x00, ARRAY_SIZE(ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].presentChargedEnergyPeriod)*sizeof(float));
 	result = PASS;
 
 	return result;
@@ -2800,9 +2800,9 @@ float presentChargedEnergyTotal(unsigned char gun_index)
 {
 	float result = 0.0f;
 
-	for(int idx=0;idx<ARRAY_SIZE(ShmCharger->gun_info[gun_index].presentChargedEnergyPeriod);idx++)
+	for(int idx=0;idx<ARRAY_SIZE(ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].presentChargedEnergyPeriod);idx++)
 	{
-		result += ShmCharger->gun_info[gun_index].presentChargedEnergyPeriod[idx];
+		result += ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].presentChargedEnergyPeriod[idx];
 	}
 
 	return result;
@@ -2820,16 +2820,16 @@ int presentChargedEnergyUpdate(unsigned char gun_index)
 	if(ShmSysConfigAndInfo->SysConfig.AcPhaseCount==1)
 	{
 		// Resolution: 0.0001 kwh
-		ShmCharger->gun_info[gun_index].presentChargedEnergyPeriod[tm->tm_hour] += (((float)(ShmCharger->gun_info[gun_index].powerConsumptionTotal.power_consumption - ShmCharger->gun_info[gun_index].powerConsumptionTotal.power_consumption_at_start))/10000.0) - presentChargedEnergyTotal(gun_index);
+		ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].presentChargedEnergyPeriod[tm->tm_hour] += (((float)(ShmCharger->gun_info[gun_index].powerConsumptionTotal.power_consumption - ShmCharger->gun_info[gun_index].powerConsumptionTotal.power_consumption_at_start))/10000.0) - presentChargedEnergyTotal(gun_index);
 
 	}
 	else
 	{
 		// Resolution: 0.0001 kwh
-		ShmCharger->gun_info[gun_index].presentChargedEnergyPeriod[tm->tm_hour] += ((((float)(ShmCharger->gun_info[gun_index].powerConsumption[0].power_consumption - ShmCharger->gun_info[gun_index].powerConsumption[0].power_consumption_at_start))/10000.0) +
-																				    (((float)(ShmCharger->gun_info[gun_index].powerConsumption[1].power_consumption - ShmCharger->gun_info[gun_index].powerConsumption[1].power_consumption_at_start))/10000.0) +
-																				    (((float)(ShmCharger->gun_info[gun_index].powerConsumption[2].power_consumption - ShmCharger->gun_info[gun_index].powerConsumption[2].power_consumption_at_start))/10000.0))
-																					- presentChargedEnergyTotal(gun_index);
+		ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].presentChargedEnergyPeriod[tm->tm_hour] += ((((float)(ShmCharger->gun_info[gun_index].powerConsumption[0].power_consumption - ShmCharger->gun_info[gun_index].powerConsumption[0].power_consumption_at_start))/10000.0) +
+																											(((float)(ShmCharger->gun_info[gun_index].powerConsumption[1].power_consumption - ShmCharger->gun_info[gun_index].powerConsumption[1].power_consumption_at_start))/10000.0) +
+																											(((float)(ShmCharger->gun_info[gun_index].powerConsumption[2].power_consumption - ShmCharger->gun_info[gun_index].powerConsumption[2].power_consumption_at_start))/10000.0))
+																											- presentChargedEnergyTotal(gun_index);
 	}
 
 	ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PresentChargedEnergy = presentChargedEnergyTotal(gun_index);

+ 2 - 1
EVSE/Projects/define.h

@@ -583,6 +583,7 @@ struct ChargingInfoData
 	float PresentChargingCurrent;   // unit: 1A
 	float PresentChargingPower;		//0~6553.5 kW
 	float PresentChargedEnergy;		//0~6553.5 kWh
+	float presentChargedEnergyPeriod[24];		// Session present charged energy at each period
 	int PresentChargedDuration;	// second
 	int RemainChargingDuration;	// second
 	float EvBatteryMaxVoltage;		// 0~6553.5 volt
@@ -4260,7 +4261,7 @@ struct StructDataTransfer
 	unsigned char MessageId[52];
 	unsigned char Data[512];
 	unsigned char ResponseStatus[18];	//Accepted, Rejected,UnknownMessageId,UnknownVendorId
-	unsigned char ResponseData[256];
+	unsigned char ResponseData[512];
 };
 struct StructDiagnosticsStatusNotification
 {

+ 2 - 2
Makefile

@@ -1187,7 +1187,7 @@ AW-CCS-uboot:
 	@echo    Building U-boot
 	@echo ===================================
 	@cp -f board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/arch/arm/dts/[AW-CCS]am335x-evm.dts board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/arch/arm/dts/am335x-evm.dts
-	$(MAKE) -j $(MAKE_JOBS) -C $(TI_SDK_PATH)/board-support/u-boot-* CROSS_COMPILE=$(CROSS_COMPILE) FLASH_IC=MT29F8G08_BCH16 DDR_IC=MT41K256M16HA125E_400
+	$(MAKE) -j $(MAKE_JOBS) -C $(TI_SDK_PATH)/board-support/u-boot-* CROSS_COMPILE=$(CROSS_COMPILE) FLASH_IC=MT29F8G08_BCH16 DDR_IC=MT41K256M16HA125E_303
 	@cp -f board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/MLO EVSE/Projects/AW-CCS/Images/
 	@cp -f board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/u-boot.img EVSE/Projects/AW-CCS/Images/
 	@cp -f board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/spl/u-boot-spl.bin EVSE/Projects/AW-CCS/Images/
@@ -1726,7 +1726,7 @@ AX80-uboot:
 	@echo    Building U-boot
 	@echo ===================================
 	@cp -f board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/arch/arm/dts/[AX80]am335x-evm.dts board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/arch/arm/dts/am335x-evm.dts
-	$(MAKE) -j $(MAKE_JOBS) -C $(TI_SDK_PATH)/board-support/u-boot-* CROSS_COMPILE=$(CROSS_COMPILE) FLASH_IC=MT29F8G08_BCH16 DDR_IC=MT41K256M16HA125E_400
+	$(MAKE) -j $(MAKE_JOBS) -C $(TI_SDK_PATH)/board-support/u-boot-* CROSS_COMPILE=$(CROSS_COMPILE) FLASH_IC=MT29F8G08_BCH16 DDR_IC=MT41K256M16HA125E_303
 	@cp -f board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/MLO EVSE/Projects/AX80/Images/
 	@cp -f board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/u-boot.img EVSE/Projects/AX80/Images/
 	@cp -f board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/spl/u-boot-spl.bin EVSE/Projects/AX80/Images/