소스 검색

2022-09-28/Jerry Wang
[OCPP 1.6]
Action:
1. Improve TCCI occupancy related logic.
2. Modify StopTransaction related logics for matching aligned data requirement.
3. Modify AuthorizationKey changeConfiguration logic for transferring hexadecimal represented data to string.
4. Improve checkCompositeSchedule() logic.

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

Jerry Wang 2 년 전
부모
커밋
bf028c1da1

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 461 - 295
EVSE/Modularization/ocppfiles/MessageHandler.c


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

@@ -121,6 +121,13 @@ static char *sqlReportOccupancyDeduct = "create table if not exists report_occup
 							   "approvalNo text,"
 							   "isUploaded text);";
 
+static char *sqlMeterValueBuffer = "create table if not exists meterValuesBuffer( idx integer primary key,"
+		                       "occurDatetime text,"
+							   "gun_index text,"
+							   "transactionId text,"
+							   "ReadingContext text,"
+							   "meterValue text);";
+
 //=================================
 // Common routine
 //=================================
@@ -1369,7 +1376,7 @@ int main(void)
 	queueOpInfo.TransactionMessageResend = 0;
 
 	DEBUG_INFO("Module_OcppBackend task initialization...\n");
-	DEBUG_INFO("Git update date: 2022/09/19 \n");
+	DEBUG_INFO("Git update date: 2022/09/28 \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)
@@ -1483,6 +1490,17 @@ int main(void)
 		DEBUG_INFO( "Opened report_occupancyDeduct_info table successfully\n");
 	}
 
+	// Create meter values buffer table
+	if(sqlite3_exec(db, sqlMeterValueBuffer, 0, 0, &errMsg) != SQLITE_OK)
+	{
+		DEBUG_INFO( "Create Table meterValuesBuffer error %s\n",errMsg);
+		return 0;
+	}
+	else
+	{
+		DEBUG_INFO( "Opened meterValuesBuffer table successfully\n");
+	}
+
 	if(initialConfigurationTable() != PASS)
 	{
 		DEBUG_WARN("OCPPConfiguration version mismatch, upgrade it.\n");

+ 1 - 1
EVSE/Modularization/ocppfiles/Module_OcppBackend.h

@@ -91,7 +91,7 @@
 #define QUEUE_OPERATION_SENT		3
 #define QUEUE_OPERATION_ADD			4
 #define QUEUE_OPERATION_STORE		5
-#define QUEUE_MESSAGE_LENGTH		3584
+#define QUEUE_MESSAGE_LENGTH		(1024*495)
 
 // Websocket TX/RX buffer size
 #define WEBSOCKET_BUFFER_SIZE		(1024*500)

+ 1 - 0
EVSE/Projects/define.h

@@ -6034,6 +6034,7 @@ struct StructGetOccupancyFee
 
 	int   response_duration;
 	float response_occupancyFee;
+	unsigned char response_status[10];
     unsigned char response_occupancySN[37];
     unsigned char response_startTime[64];
 

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.