|
@@ -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");
|