Эх сурвалжийг харах

[Improve][Modularization][Module_OcppBackend]

2021.08.30 / Folus Wen

Actions:
1. sendGetConfigurationConfirmation() extend message array size.

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 жил өмнө
parent
commit
9e8f918e39

+ 1 - 6
EVSE/Modularization/ocppfiles/MessageHandler.c

@@ -7774,14 +7774,12 @@ int sendGetConfigurationConfirmation(char *uuid)
 	int MaxKeySupported = 0;
 	int sentConfigurationNumber= 0;
 	int sentunConfigurationNumber= 0;
-	char message[4000]={0};
+	char message[1024*10]={0};
 
 	DEBUG_INFO("sendGetConfigurationConfirmation...\n");
 
 	MaxKeySupported = atoi((const char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[GetConfigurationMaxKeys].ItemData);
 
-	//DEBUG_INFO("MaxKeySupported=%d\n",MaxKeySupported);
-
 	sprintf(message,"[%d,\"%s\",{\"configurationKey\":["
 			,MESSAGE_TYPE_CALLRESULT
 			,uuid );
@@ -7808,7 +7806,6 @@ int sendGetConfigurationConfirmation(char *uuid)
 
 			sentConfigurationNumber = sentConfigurationNumber + 1;
 		}
-
 	}
 
 
@@ -7836,11 +7833,9 @@ int sendGetConfigurationConfirmation(char *uuid)
 						, ShmOCPP16Data->GetConfiguration.ResponseUnknownKey[idx_sample].Item );
 			}
 			sentunConfigurationNumber = sentunConfigurationNumber + 1;
-
 		}
 
 		sprintf(message + strlen(message), "]");
-
 	}
 
 	sprintf(message + strlen(message), "}]");

+ 1 - 1
EVSE/Modularization/ocppph/MessageHandler.c

@@ -7498,7 +7498,7 @@ int sendGetConfigurationConfirmation(char *uuid)
 	int MaxKeySupported = 0;
 	int sentConfigurationNumber= 0;
 	int sentunConfigurationNumber= 0;
-	char message[4000]={0};
+	char message[1024*10]={0};
 
 	DEBUG_INFO("sendGetConfigurationConfirmation...\n");
 

+ 1 - 1
EVSE/Projects/define.h

@@ -4293,7 +4293,7 @@ struct OCPP16ConfigurationItem
 {
 	unsigned char 		ItemName[64];
 	unsigned char 		ItemAccessibility;//0:RO, 1:RW
-	unsigned char 		ItemData[128];
+	unsigned char 		ItemData[500];
 };
 
 struct OCPP16ConfigurationTable