Browse Source

2020-05-04 /Kathy Yeh
1. modify StopTransaction transactionData value
2. add function: filter packet's space
3. modiify Smart Charging Profile issue
4. modify reservation issue: system status adjudgement

Kathy_Yeh 5 years ago
parent
commit
73bd5f84c3

File diff suppressed because it is too large
+ 263 - 153
EVSE/Modularization/ocppfiles/MessageHandler.c


+ 14 - 12
EVSE/Modularization/ocppfiles/MessageHandler.h

@@ -106,18 +106,18 @@ void handleError(char *id, char *errorCode, char *errorDescription,char *payload
 //===============================================
 // Common routine
 //===============================================
- void getKeyValue(char *keyReq);
- int  setKeyValue(char *key, char *value);
- int updateSetting(char *key, char *value);
- int httpDownLoadFile(char *location, char *path, char *filename,char *url);
- int ftpDownLoadFile(char *location, char *user, char *password, int port, char *path, char *filename,char *url);
- void *UpdateFirmwareProcess(void* data);
- void* GetDiagnosticsProcess(void* data);
- int httpUploadFile(char *location, char *path, char *filename,char *url);
- int ftpFile(char *location, char *user, char *password, int port, char *path, char *fnamePlusPath,char *filename);
- int get_file_contents(const char* filename, char** outbuffer);
- //void Send(struct json_object *message);
- void LWS_Send(char * str);
+void getKeyValue(char *keyReq);
+int  setKeyValue(char *key, char *value);
+int updateSetting(char *key, char *value);
+int httpDownLoadFile(char *location, char *path, char *filename,char *url);
+int ftpDownLoadFile(char *location, char *user, char *password, int port, char *path, char *filename,char *url);
+void *UpdateFirmwareProcess(void* data);
+void* GetDiagnosticsProcess(void* data);
+int httpUploadFile(char *location, char *path, char *filename,char *url);
+int ftpFile(char *location, char *user, char *password, int port, char *path, char *fnamePlusPath,char *filename);
+int get_file_contents(const char* filename, char** outbuffer);
+//void Send(struct json_object *message);
+void LWS_Send(char * str);
 extern int queue_operation(int type, char *frontUUID, char *frontData);
 int GetOcppServerURL();
 int GetOcppPath();
@@ -133,6 +133,8 @@ int GetServerSign(void);
 void SetServerSign(int value);
 int GetBootNotificationInterval(void);
 void InitialSystemValue(void);
+void checkTempStopTransaction(int gun_index);
+void storeTempStopTransaction(int gun_index);
  //===============================================
  // sqlite related routine
  //===============================================

+ 3 - 1
EVSE/Modularization/ocppfiles/Module_OcppBackend.c

@@ -34,6 +34,7 @@
 #include	"sqlite3.h"
 
 
+
 #ifndef SPEC_LATEST_SUPPORTED
 #define SPEC_LATEST_SUPPORTED 13
 #endif
@@ -307,7 +308,7 @@ char * strtrim( char * s )
 	char * p2 = s;
 	while(*p1 != '\0')
 	{
-		while(*p1 == ' ' || *p1 == '\t' || *p1 == '\n' || *p1 == '\r')
+		while(*p1 == '\t' || *p1 == '\n' || *p1 == '\r') //while(*p1 == ' ' || *p1 == '\t' || *p1 == '\n' || *p1 == '\r')
 		{
 			p1 ++;
 
@@ -1798,6 +1799,7 @@ int main(void)
 
 			if((changeChageWebSocketPingInterval == TRUE) || (GetInternetConn() == 0)) // Check InternetConn 0: disconnected, 1: connected
 			{
+				DEBUG_INFO("GetInternetConn()=%d\n",GetInternetConn());
 				changeChageWebSocketPingInterval = FALSE;
 				lws_context_destroy(context);
 				ConnectionEstablished=0;

Some files were not shown because too many files changed in this diff